<!--
Copyright 2022 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<!--
This file is used to generate a comprehensive list of Kerberos histograms along
with a detailed description for each histogram.

For best practices on writing histogram descriptions, see
https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md

Please follow the instructions in the OWNERS file in this directory to find a
reviewer. If no OWNERS file exists, please consider signing up at
go/reviewing-metrics (Googlers only), as all subdirectories are expected to
have an OWNERS file. As a last resort you can send the CL to
chromium-metrics-reviews@google.com.
-->

<histogram-configuration>

<histograms>

<histogram name="Kerberos.AcquireKerberosTgtTime" units="ms"
    expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Time in milliseconds to acquire a Kerberos ticket. The value is recorded no
    matter if the operation was successful or not.
  </summary>
</histogram>

<histogram name="Kerberos.DailyActiveUsers" enum="KerberosUserType"
    expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Type of the Chrome OS login user (primary user) who requests Kerberos
    tickets. Reported at most once a day by the Kerberos daemon when a Kebreros
    ticket is acquired or Kerberos files are requested, which happens e.g. on
    Chrome startup.
  </summary>
</histogram>

<histogram name="Kerberos.EncryptionTypesAcquireKerberosTgt"
    enum="KerberosEncryptionTypes" expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    The Kerberos encryption types used while succesfully creating or refreshing
    a Kerberos TGT. This value is derived from the Kerberos configuration
    'enctypes' fields.
  </summary>
</histogram>

<histogram name="Kerberos.NumberOfAccounts.Managed" units="units"
    expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Number of managed Kerberos accounts owned by the current Chrome OS user. A
    managed account is an account that got added via the KerberosAccounts
    policy. Reported at most once a day similar to Kerberos.DailyActiveUsers.
  </summary>
</histogram>

<histogram name="Kerberos.NumberOfAccounts.RememberedPassword" units="units"
    expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Number of Kerberos accounts owned by the current Chrome OS user that use the
    'Remember password' feature, i.e. the account password is stored by the
    Kerberos daemon. Reported at most once a day similar to
    Kerberos.DailyActiveUsers.
  </summary>
</histogram>

<histogram name="Kerberos.NumberOfAccounts.Total" units="units"
    expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Total number of Kerberos accounts owned by the current Chrome OS user.
    Reported at most once a day similar to Kerberos.DailyActiveUsers.
  </summary>
</histogram>

<histogram name="Kerberos.NumberOfAccounts.Unmanaged" units="units"
    expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Number of unmanaged Kerberos accounts owned by the current Chrome OS user.
    An unmanaged account is an account that was added manually by the user.
    Reported at most once a day similar to Kerberos.DailyActiveUsers.
  </summary>
</histogram>

<histogram name="Kerberos.NumberOfAccounts.UseLoginPassword" units="units"
    expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Number of Kerberos accounts owned by the current Chrome OS user that use the
    login password for authentication. These accounts were added via the
    KerberosAccounts policy, using the '${PASSWORD}' placeholder as password.
    Reported at most once a day similar to Kerberos.DailyActiveUsers.
  </summary>
</histogram>

<histogram name="Kerberos.Result.AcquireKerberosTgt" enum="KerberosErrorType"
    expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Result from an attempt to acquire a Kerberos ticket. This happens whenever a
    new ticket is added or an existing ticket is reauthenticated.
  </summary>
</histogram>

<histogram name="Kerberos.Result.AddAccount" enum="KerberosErrorType"
    expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Result from an attempt to add a new Kerberos account, either through the
    Kerberos Tickets settings page or via the KerberosAccounts policy.
  </summary>
</histogram>

<histogram name="Kerberos.Result.ClearAccounts" enum="KerberosErrorType"
    expires_after="2024-02-25">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Result from an attempt to clear Kerberos accounts, usually through toggling
    Kerberos related policies. For instance, disabling the KerberosEnabled
    policy clears all accounts.
  </summary>
</histogram>

<histogram name="Kerberos.Result.GetKerberosFiles" enum="KerberosErrorType"
    expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Result from an attempt to retrieve a Kerberos ticket from the Kerberos
    daemon. Systems using Kerberos (Chrome, SMB file shares) perform this action
    during startup and when they get notified that the files changed.
  </summary>
</histogram>

<histogram name="Kerberos.Result.ListAccounts" enum="KerberosErrorType"
    expires_after="2024-02-20">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Result from an attempt to list Kerberos accounts, usually through opening
    the Kerberos Tickets settings page or making changes to accounts.
  </summary>
</histogram>

<histogram name="Kerberos.Result.RemoveAccount" enum="KerberosErrorType"
    expires_after="M120">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Result from an attempt to remove a new Kerberos account through the Kerberos
    Tickets settings page.
  </summary>
</histogram>

<histogram name="Kerberos.Result.SetConfig" enum="KerberosErrorType"
    expires_after="2024-01-21">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Result from an attempt to set Kerberos configuration. This happens right
    before acquiring a Kerberos ticket.
  </summary>
</histogram>

<histogram name="Kerberos.Result.ValidateConfig" enum="KerberosErrorType"
    expires_after="2024-02-20">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Result from an attempt to validate Kerberos configuration. This happens when
    the user tries to set configuration in the Advanced section of the dialog to
    add new Kerberos tickets.
  </summary>
</histogram>

<histogram name="Kerberos.ValidateConfigErrorCode"
    enum="KerberosConfigErrorCode" expires_after="2024-02-20">
  <owner>fsandrade@chromium.org</owner>
  <owner>src/chrome/browser/ash/kerberos/OWNERS</owner>
  <summary>
    Error code from an attempt validate Kerberos configuration. Contains more
    specific information than KerberosErrorType about the result of the
    validation.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
