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 Management
If authentication fails due to a rejected password policy, CAS is able to intercept that request and allow the user to update the account password in place. The password management features of CAS are rather modest, and alternatively should the functionality provide inadequate for your policy, you may always redirect CAS to use a separate and standalone application that is fully in charge of managing the account password and associated flows.
CAS may also allow users to reset their passwords voluntarily. Those who have forgotten their account password may receive a secure link with a time-based expiration policy at their registered email address and/or phone. The link will allow the user to provide answers to his/her pre-defined security questions, which if successfully done, will allow the user to next reset their password and login again. You may also specify a pattern for accepted passwords.
By default, after a user has successfully changed their password they will be redirected to the login screen to enter their new password and log in. CAS can also be configured to automatically log the user in after a successful change. This behavior can be altered via CAS settings.
CAS login requests also accept a special doChangePassword
query parameter that allows one to forcefully launch into the
password reset flow. Specifying this parameter with a value of true
can be particularly useful in the presence
of existing single sign-on sessions when the user who already has logged in wants to change their password.
Support is enabled by including the following dependency in the WAR overlay:
1
2
3
4
5
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-pm-webflow</artifactId>
<version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-pm-webflow:${project.'cas.version'}"
1
2
3
4
5
6
7
8
9
dependencyManagement {
imports {
mavenBom "org.apereo.cas:cas-server-support-bom:${project.'cas.version'}"
}
}
dependencies {
implementation "org.apereo.cas:cas-server-support-pm-webflow"
}
1
2
3
4
5
6
dependencies {
implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")
implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
implementation "org.apereo.cas:cas-server-support-pm-webflow"
}

You do not need to explicitly include this module in your configuration and overlays. This is just to teach you that it exists.
Account Management
CAS may also allow individual end-users to update certain aspects of their account that relate to password management in a mini portal like setup, such as resetting the password or updating security questions, etc. Please see this guide for more details.
Configuration
To learn more about available notification options, please see this guide or this guide.
The following settings and properties are available from the CAS configuration catalog:
cas.authn.pm.core.enabled=false
Flag to indicate if password management facility is enabled. |
cas.authn.pm.core.password-policy-pattern=^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,10}
A String value representing password policy regex pattern. Minimum 8 and Maximum 10 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character. This settings supports regular expression patterns. [?]. |
cas.authn.pm.webflow.enabled=true
Whether webflow auto-configuration should be enabled. |
cas.authn.pm.webflow.order=0
The order in which the webflow is configured. |
cas.authn.pm.core.auto-login=false
Flag to indicate whether successful password change should trigger login automatically. |
cas.authn.pm.core.password-policy-character-set=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789![]{}()%&*$#^<>~@|
The character set that CAS may use to generate and suggest new passwords. |
cas.authn.pm.core.password-policy-password-length=10
The password length used by CAS when suggesting generated passwords. |
cas.authn.pm.history.core.enabled=false
Flag to indicate if password history tracking is enabled. |