The CAS authentication process is primarily controlled by an authentication manager, which orchestrates a collection of authentication handlers.

Authentication Manager

CAS ships with a single yet flexible authentication manager which performs authentication according to the following contract.

For any given credential the manager does the following:

  1. Iterate over all configured authentication handlers.
  2. Attempt to authenticate a credential if a handler supports it.
  3. On success attempt to resolve a principal.
  4. Check whether a resolver is configured for the handler that authenticated the credential.
  5. If a suitable resolver is found, attempt to resolve the principal.
  6. If a suitable resolver is not found, use the principal resolved by the authentication handler.
  7. Check whether the security policy (e.g. any, all) is satisfied.
  8. If security policy is met return immediately.
  9. Continue if security policy is not met.
  10. After all credentials have been attempted check security policy again and throw AuthenticationException if not satisfied.

There is an implicit security policy that requires at least one handler to successfully authenticate a credential.

Authentication Handlers

There are a variety of authentication handlers and methods supported by CAS. Use the menu to navigate around the site and choose. By default, CAS is configured to accept a pre-defined set of credentials that are supplied via the CAS configuration.

Default Credentials

To test the default authentication scheme in CAS, use casuser and Mellon as the username and password respectively. These are automatically configured via the static authentication handler, and MUST be removed from the configuration prior to production rollouts.

The following settings and properties are available from the CAS configuration catalog:

The configuration settings listed below are tagged as Required in the CAS configuration metadata. This flag indicates that the presence of the setting may be needed to activate or affect the behavior of the CAS feature and generally should be reviewed, possibly owned and adjusted. If the setting is assigned a default value, you do not need to strictly put the setting in your copy of the configuration, but should review it nonetheless to make sure it matches your deployment expectations.

  • cas.authn.accept.password-encoder.encoding-algorithm=
  • The encoding algorithm to use such as MD5. Relevant when the type used is DEFAULT or GLIBC_CRYPT.


  • cas.authn.accept.password-encoder.type=NONE
  • Define the password encoder type to use. Type may be specified as blank or NONE to disable password encoding. It may also refer to a fully-qualified class name that implements the Spring Security's PasswordEncoder interface if you wish you define your own encoder. The following types may be used:

    • NONE: No password encoding (i.e. plain-text) takes place.
    • DEFAULT: Use the DefaultPasswordEncoder of CAS. For message-digest algorithms via character-encoding and encoding-algorithm.
    • BCRYPT: Use the BCryptPasswordEncoder based on the strength provided and an optional secret.
    • SCRYPT: Use the SCryptPasswordEncoder.
    • PBKDF2: Use the Pbkdf2PasswordEncoder based on the strength provided and an optional secret.
    • STANDARD: Use the StandardPasswordEncoder based on the secret provided.
    • SSHA: Use the LdapShaPasswordEncoder supports Ldap SHA and SSHA (salted-SHA). The values are base-64 encoded and have the label {SHA</code> or {SSHA</code> prepended to the encoded hash.
    • GLIBC_CRYPT: Use the GlibcCryptPasswordEncoder based on the encoding-algorithm, strength provided and an optional secret.
    • org.example.MyEncoder: An implementation of PasswordEncoder of your own choosing.
    • file:///path/to/script.groovy: Path to a Groovy script charged with handling password encoding operations.


  • cas.authn.accept.password-policy.groovy.location=
  • The location of the resource. Resources can be URLS, or files found either on the classpath or outside somewhere in the file system.


  • cas.authn.accept.principal-transformation.groovy.location=
  • The location of the resource. Resources can be URLS, or files found either on the classpath or outside somewhere in the file system.


    The configuration settings listed below are tagged as Optional in the CAS configuration metadata. This flag indicates that the presence of the setting is not immediately necessary in the end-user CAS configuration, because a default value is assigned or the activation of the feature is not conditionally controlled by the setting value.

  • cas.authn.accept.credential-criteria=
  • A number of authentication handlers are allowed to determine whether they can operate on the provided credential and as such lend themselves to be tried and tested during the authentication handler selection phase. The credential criteria may be one of the following options:

    • 1) A regular expression pattern that is tested against the credential identifier.
    • 2) A fully qualified class name of your own design that implements Predicate.
    • 3) Path to an external Groovy script that implements the same interface.

  • cas.authn.accept.enabled=true
  • Indicates whether the authentication strategy is enabled. The strategy may also be disabled explicitly if the #users is left blank.

  • Name of the authentication handler.

  • cas.authn.accept.order=
  • Order of the authentication handler in the chain.

  • cas.authn.accept.password-encoder.character-encoding=UTF-8
  • The encoding algorithm to use such as 'UTF-8'. Relevant when the type used is DEFAULT.


  • cas.authn.accept.password-encoder.secret=
  • Secret to use with STANDARD, PBKDF2, BCRYPT, GLIBC_CRYPT password encoders. Secret usually is an optional setting.


  • cas.authn.accept.password-encoder.strength=16
  • Strength or number of iterations to use for password hashing. Usually relevant when dealing with PBKDF2 or BCRYPT encoders. Used by GLIBC_CRYPT encoders as well.


  • cas.authn.accept.password-policy.account-state-handling-enabled=true
  • Indicates whether account state handling should be enabled to process warnings or errors reported back from the authentication response, produced by the source.


  • cas.authn.accept.password-policy.display-warning-on-match=true
  • Indicates if warning should be displayed, when the ldap attribute value matches the #warningAttributeValue.


  • cas.authn.accept.password-policy.enabled=true
  • Whether password policy should be enabled.


  • cas.authn.accept.password-policy.login-failures=5
  • When dealing with FreeIPA, indicates the number of allows login failures.


  • cas.authn.accept.password-policy.policy-attributes=
  • Key-value structure (Map) that indicates a list of boolean attributes as keys. If either attribute value is true, indicating an account state is flagged, the corresponding error can be thrown. Example


  • cas.authn.accept.password-policy.strategy=DEFAULT
  • Decide how authentication should handle password policy changes. Available values are as follows:

    • DEFAULT: Default option to handle policy changes.
    • GROOVY: Handle account password policies via Groovy.
    • REJECT_RESULT_CODE: Strategy to only activate password policy if the authentication response code is not blocked.


  • cas.authn.accept.password-policy.warn-all=false
  • Always display the password expiration warning regardless.


  • cas.authn.accept.password-policy.warning-attribute-name=
  • Used by an account state handling policy that only calculates account warnings in case the entry carries this attribute.


  • cas.authn.accept.password-policy.warning-attribute-value=
  • Used by an account state handling policy that only calculates account warnings in case the entry carries an attribute #warningAttributeName whose value matches this field.


  • cas.authn.accept.password-policy.warning-days=30
  • This is used to calculate a warning period to see if account expiry is within the calculated window.


  • cas.authn.accept.principal-transformation.blocking-pattern=
  • A regular expression that will be used against the username to match for blocking/forbidden values. If a match is found, an exception will be thrown and principal transformation will fail.


  • Indicate whether the principal identifier should be transformed into upper-case, lower-case, etc. Available values are as follows:

    • NONE: No conversion.
    • LOWERCASE: Lowercase conversion.
    • UPPERCASE: Uppercase conversion.


  • cas.authn.accept.principal-transformation.pattern=
  • A regular expression that will be used against the provided username for username extractions. On a successful match, the first matched group in the pattern will be used as the extracted username.


  • cas.authn.accept.principal-transformation.prefix=
  • Prefix to add to the principal id prior to authentication.


  • cas.authn.accept.principal-transformation.suffix=
  • Suffix to add to the principal id prior to authentication.


  • cas.authn.accept.state=
  • Define the scope and state of this authentication handler and the lifecycle in which it can be invoked or activated.

  • cas.authn.accept.users=
  • Accepted users for authentication, in the syntax of uid::password.