Configuration
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:
- Iterate over all configured authentication handlers.
- Attempt to authenticate a credential if a handler supports it.
- On success attempt to resolve a principal.
- Check whether a resolver is configured for the handler that authenticated the credential.
- If a suitable resolver is found, attempt to resolve the principal.
- If a suitable resolver is not found, use the principal resolved by the authentication handler.
- Check whether the security policy (e.g. any, all) is satisfied.
- If security policy is met return immediately.
- Continue if security policy is not met.
- 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.
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:
cas.authn.accept.password-encoder.encoding-algorithm=
The encoding algorithm to use such as
|
cas.authn.accept.password-encoder.type=NONE
Define the password encoder type to use. Type may be specified as blank or
|
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. In the event the configured resource is a Groovy script, specially if the script set to reload on changes, you may need to adjust the total number ofinotify instances. On Linux, you may need to add the following line to /etc/sysctl.conf : fs.inotify.max_user_instances = 256 . You can check the current value via cat /proc/sys/fs/inotify/max_user_instances .
|
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. In the event the configured resource is a Groovy script, specially if the script set to reload on changes, you may need to adjust the total number ofinotify instances. On Linux, you may need to add the following line to /etc/sysctl.conf : fs.inotify.max_user_instances = 256 . You can check the current value via cat /proc/sys/fs/inotify/max_user_instances .
|
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:
|
cas.authn.accept.enabled=true
Indicates whether the authentication strategy is enabled. The strategy may also be disabled explicitly if the
|
cas.authn.accept.name=
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
|
cas.authn.accept.password-encoder.hash-length=16
When used by
|
cas.authn.accept.password-encoder.secret=
Secret to use with
|
cas.authn.accept.password-encoder.strength=16
Strength or number of iterations to use for password hashing. Usually relevant when dealing with
|
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
|
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:
|
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
|
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.
|
cas.authn.accept.principal-transformation.case-conversion=NONE
Indicate whether the principal identifier should be transformed into upper-case, lower-case, etc. Available values are as follows:
|
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. Available values are as follows:
|
cas.authn.accept.users=
Accepted users for authentication, in the syntax of
|