Account (Self-Service) Registration

CAS provides a modest workflow to handle self-service account registration. Once enabled, the account registration workflow allows users to register accounts with CAS to:

  • Provide an initial, customizable set of details such as first name, last name, email to kickstart the account creation request.
  • Receive an activation link with instructions via email or text message to verify the account creation request.
  • Finalize the account creation request, choose a password, security questions, etc.
  • Ultimately, submit the account registration request to an identity manager system for provisioning and follow-up processes.
Usage Note

CAS is NOT, as of this writing, an identity management solution and does not intend to provide features or support capabilities that are typically found in such systems, such as complex provisioning workflows, account lifecycle management, inbound/outbound attribute mappings, etc. While all open-source software can be customized to no end, the capabilities described here ultimately expect one or more systems of record to hold and manage user accounts.

Account registration and sign-up functionality 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-account-mgmt</artifactId>
    <version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-account-mgmt:${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-account-mgmt"
}
1
2
3
4
5
6
7
8
9
10
dependencies {
    /*
    The following platform references should be included automatically and are listed here for reference only.
            
    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-account-mgmt"
}

Configuration

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.account-registration.core.crypto.encryption.key=
  • The encryption key is a JWT whose length is defined by the encryption key size setting.

    org.apereo.cas.configuration.model.core.util.EncryptionJwtCryptoProperties.

    How can I configure this property?

  • cas.account-registration.core.crypto.signing.key=
  • The signing key is a JWT whose length is defined by the signing key size setting.

    org.apereo.cas.configuration.model.core.util.SigningJwtCryptoProperties.

    How can I configure this property?

  • cas.account-registration.core.registration-properties.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 of inotify 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.

    org.apereo.cas.configuration.model.SpringResourceProperties.

    How can I configure this property?

  • cas.account-registration.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.

    org.apereo.cas.configuration.model.support.account.AccountManagementRegistrationCoreProperties.

    How can I configure this property?

    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. You should only include this field in your configuration if you need to modify the default value.

  • cas.account-registration.core.crypto.alg=
  • The signing/encryption algorithm to use.

    org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties.

    How can I configure this property?

  • cas.account-registration.core.crypto.enabled=true
  • Whether crypto operations are enabled.

    org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties.

    How can I configure this property?

  • cas.account-registration.core.crypto.encryption.key-size=512
  • The encryption key size.

    org.apereo.cas.configuration.model.core.util.EncryptionJwtCryptoProperties.

    How can I configure this property?

  • cas.account-registration.core.crypto.signing.key-size=512
  • The signing key size.

    org.apereo.cas.configuration.model.core.util.SigningJwtCryptoProperties.

    How can I configure this property?

  • cas.account-registration.core.crypto.strategy-type=ENCRYPT_AND_SIGN
  • Control the cipher sequence of operations. The accepted values are:

    • ENCRYPT_AND_SIGN: Encrypt the value first, and then sign.
    • SIGN_AND_ENCRYPT: Sign the value first, and then encrypt.

    org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties.

    How can I configure this property?

  • cas.account-registration.core.expiration=PT1M
  • How long in minutes should the registration link remain valid.

    This settings supports the java.time.Duration syntax [?].

    org.apereo.cas.configuration.model.support.account.AccountManagementRegistrationCoreProperties.

    How can I configure this property?

  • cas.account-registration.core.include-client-ip-address=true
  • Whether the registration token will contain the client IP Address.

    org.apereo.cas.configuration.model.support.account.AccountManagementRegistrationCoreProperties.

    How can I configure this property?

  • cas.account-registration.core.include-server-ip-address=true
  • Whether the registration token will contain the server IP Address.

    org.apereo.cas.configuration.model.support.account.AccountManagementRegistrationCoreProperties.

    How can I configure this property?

  • cas.account-registration.core.security-questions-count=2
  • Whether account registration should present security questions and how many, to complete the registration process.

    org.apereo.cas.configuration.model.support.account.AccountManagementRegistrationCoreProperties.

    How can I configure this property?