WORKERS AHEAD!
You are viewing the development documentation for the Apereo CAS server. The functionality presented here is not officially released yet. This is a work in progress and will be continually updated as development moves forward. You are most encouraged to test the changes presented.
Password Policy Enforcement
Password policy enforcement attempts to:
- Detect a number of scenarios that would otherwise prevent user authentication based on user account status.
- Warn users whose account status is near a configurable expiration date and redirect the flow to an external identity management system.
LDAP
The below scenarios are by default considered errors preventing authentication in a generic manner through the normal CAS login flow. LPPE intercepts the authentication flow, detecting the above standard error codes. Error codes are then translated into proper messages in the CAS login flow and would allow the user to take proper action, fully explaining the nature of the problem.
ACCOUNT_LOCKED
ACCOUNT_DISABLED
ACCOUNT_EXPIRED
INVALID_LOGON_HOURS
INVALID_WORKSTATION
PASSWORD_MUST_CHANGE
PASSWORD_EXPIRED
The translation of LDAP errors into CAS workflow is all handled by ldaptive.
The following settings and properties are available from the CAS configuration catalog:
cas.authn.ldap[0].password-policy.groovy.location=
Handle password policy via Groovy script. 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.ldap[0].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.ldap[0].password-policy.custom-policy-class=
An implementation of a policy class that knows how to handle LDAP responses.
The class must be an implementation of |
cas.authn.ldap[0].password-policy.display-warning-on-match=true
Indicates if warning should be displayed, when the ldap attribute value
matches the |
cas.authn.ldap[0].password-policy.enabled=true
Whether password policy should be enabled. |
cas.authn.ldap[0].password-policy.login-failures=5
When dealing with FreeIPA, indicates the number of allows login failures. |
cas.authn.ldap[0].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.ldap[0].password-policy.strategy=DEFAULT
Decide how authentication should handle password policy changes. Available values are as follows:
|
cas.authn.ldap[0].password-policy.type=GENERIC
LDAP type. |
cas.authn.ldap[0].password-policy.warn-all=
Always display the password expiration warning regardless. |
cas.authn.ldap[0].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.ldap[0].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.ldap[0].password-policy.warning-days=30
This is used to calculate a warning period to see if account expiry is within the calculated window. |