Enum Class Auth

java.lang.Object
java.lang.Enum<Auth>
google.registry.request.auth.Auth
All Implemented Interfaces:
Serializable, Comparable<Auth>, Constable

public enum Auth extends Enum<Auth>
Enum used to configure authentication settings for Actions.
  • Enum Constant Details

    • AUTH_PUBLIC_LEGACY

      public static final Auth AUTH_PUBLIC_LEGACY
      Allows anyone to access.

      If a user is logged in, will authenticate (and return) them. Otherwise, access is still granted, but NOT_AUTHENTICATED is returned.

      User-facing legacy console endpoints (those that extend HtmlAction) use it. They need to allow requests from signed-out users so that they can redirect users to the login page. After a user is logged in, they check if the user actually has access to the specific console using AuthenticatedRegistrarAccessor.

      See Also:
    • AUTH_PUBLIC_LOGGED_IN

      public static final Auth AUTH_PUBLIC_LOGGED_IN
      Allows anyone to access, as long as they are logged in.

      This is used by legacy registrar console programmatic endpoints (those that extend JsonGetAction), which are accessed via XHR requests sent from a logged-in user when performing actions on the console.

    • AUTH_PUBLIC

      public static final Auth AUTH_PUBLIC
      Allows anyone to access.

      This is used for public HTML endpoints like RDAP, the check API, and web WHOIS.

    • AUTH_API_ADMIN

      public static final Auth AUTH_API_ADMIN
      Allows only the app itself (via service accounts) or admins to access.

      This applies to the majority of the endpoints. For APP level authentication to work, the associated service account needs to be allowlisted in the auth.allowedServiceAccountEmails field in the config YAML file.

  • Method Details

    • values

      public static Auth[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Auth valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • authSettings

      public AuthSettings authSettings()