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"
}
:information_source: YAGNI

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:

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.pm.core.enabled=false
  • Flag to indicate if password management facility is enabled.

    org.apereo.cas.configuration.model.support.pm.PasswordManagementCoreProperties.

  • 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. [?].

    org.apereo.cas.configuration.model.support.pm.PasswordManagementCoreProperties.

    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. In other words, you should only include this field in your configuration if you need to modify the default value or if you need to turn on the feature controlled by the setting.

  • cas.authn.pm.webflow.enabled=true
  • Whether webflow auto-configuration should be enabled.

    org.apereo.cas.configuration.model.core.web.flow.WebflowAutoConfigurationProperties.

  • cas.authn.pm.webflow.order=0
  • The order in which the webflow is configured.

    org.apereo.cas.configuration.model.core.web.flow.WebflowAutoConfigurationProperties.

  • cas.authn.pm.core.auto-login=false
  • Flag to indicate whether successful password change should trigger login automatically.

    org.apereo.cas.configuration.model.support.pm.PasswordManagementCoreProperties.

  • cas.authn.pm.core.password-policy-character-set=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789![]{}()%&*$#^<>~@|
  • The character set that CAS may use to generate and suggest new passwords.

    org.apereo.cas.configuration.model.support.pm.PasswordManagementCoreProperties.

  • cas.authn.pm.core.password-policy-password-length=10
  • The password length used by CAS when suggesting generated passwords.

    org.apereo.cas.configuration.model.support.pm.PasswordManagementCoreProperties.

  • cas.authn.pm.history.core.enabled=false
  • Flag to indicate if password history tracking is enabled.

    org.apereo.cas.configuration.model.support.pm.PasswordHistoryCoreProperties.