Google Authenticator Authentication

Google Authenticator generates 2-step verification codes on your phone. With 2-step verification signing in will require a code generated by the Google Authenticator app in addition to primary authentication. Learn more about the topic here.

:information_source: Remember

Support for Google Authenticator is not about supporting the mobile application itself. This is about supporting the TOTP algorithm that is used by the application to generate time-based one-time passwords. Any compliant mobile application that can generate TOTP codes can be used with CAS including LastPass, Microsoft Authenticator, Authy, etc.

Configuration

Support is enabled by including the following module in the overlay:

1
2
3
4
5
<dependency>
    <groupId>org.apereo.cas</groupId>
    <artifactId>cas-server-support-gauth</artifactId>
    <version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-gauth:${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-gauth"
}
1
2
3
4
5
6
7
8
9
10
dependencies {
    /*
        The following platform references are included automatically and are listed 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-gauth"
}

The following settings and properties are available from the CAS configuration catalog:

cas.authn.mfa.gauth.core.issuerIssuer used in the barcode when dealing with device registration events.
CASIssuer
Required

Issuer used in the barcode when dealing with device registration events. Used in the registration URL to identify CAS.

Type
String
Default
CASIssuer
Defined by
CoreGoogleAuthenticatorMultifactorProperties
cas.authn.mfa.gauth.core.labelLabel used in the barcode when dealing with device registration events.
CASLabel
Required

Label used in the barcode when dealing with device registration events. Used in the registration URL to identify CAS.

Type
String
Default
CASLabel
Defined by
CoreGoogleAuthenticatorMultifactorProperties
cas.authn.mfa.gauth.core.scratch-codes.encryption.keyThe encryption key.
no default
Required

The encryption key. The encryption key by default and unless specified otherwise must be randomly-generated string whose length is defined by the encryption key size setting.

Type
String
Default
none
Defined by
EncryptionRandomizedCryptoProperties
cas.authn.mfa.gauth.crypto.encryption.keyThe encryption key is a string whose length is defined by the encryption key size setting.
no default
RequiredSpEL

The encryption key is a string whose length is defined by the encryption key size setting.

Type
String
Default
none
Defined by
EncryptionJwtCryptoProperties
Supports
Spring Expression Language
cas.authn.mfa.gauth.crypto.signing.keyThe signing key is a string whose length is defined by the signing key size setting.
no default
RequiredSpEL

The signing key is a string whose length is defined by the signing key size setting.

Type
String
Default
none
Defined by
SigningJwtCryptoProperties
Supports
Spring Expression Language
cas.authn.mfa.gauth.core.code-digitsLength of the generated code.
6

Length of the generated code.

Type
Integer
Default
6
Defined by
CoreGoogleAuthenticatorMultifactorProperties
cas.authn.mfa.gauth.core.device-registration-enabledWhen enabled, allows the user/system to register accounts and devices.
true

When enabled, allows the user/system to register accounts and devices.

Type
Boolean
Default
true
Defined by
CoreGoogleAuthenticatorMultifactorProperties
cas.authn.mfa.gauth.core.maximum-authentication-attemptsMaximum number of authentication attempts allowed for a token validation attempt.
0

Maximum number of authentication attempts allowed for a token validation attempt. If the number of attempts exceeds this value, authentication will halt. A negative or zero value (default) means no limits are enforced. Note that the user account is not locked out by default; only the CAS authentication flow is halted and user is notified and required to restart the authentication process again.

Type
Integer
Default
0
Defined by
CoreGoogleAuthenticatorMultifactorProperties
cas.authn.mfa.gauth.core.multiple-device-registration-enabledWhen enabled, allows the user/system to accept multiple accounts and device registrations per user, allowing one to switch between or register new devices/accounts automatically.
false

When enabled, allows the user/system to accept multiple accounts and device registrations per user, allowing one to switch between or register new devices/accounts automatically.

Type
Boolean
Default
false
Defined by
CoreGoogleAuthenticatorMultifactorProperties
cas.authn.mfa.gauth.core.number-of-scratch-codesNumber of scratch codes to generate for the account.
5

Number of scratch codes to generate for the account. Scratch codes are used as a backup authentication mechanism when the user is unable to access their primary device. Each scratch code is a one-time use code that can be used to authenticate the user in case they lose access to their primary device or if the device is not functioning properly. By generating multiple scratch codes, users have a higher chance of successfully authenticating even if they encounter issues with their primary device.

Type
Integer
Default
5
Defined by
CoreGoogleAuthenticatorMultifactorProperties
cas.authn.mfa.gauth.core.scratch-codes.encryption.key-sizeEncryption key size.
16

Encryption key size.

Type
Integer
Default
16
Defined by
EncryptionRandomizedCryptoProperties
cas.authn.mfa.gauth.core.time-step-sizeThe expiration time of the generated code in seconds.
30

The expiration time of the generated code in seconds.

Type
Long
Default
30
Defined by
CoreGoogleAuthenticatorMultifactorProperties
cas.authn.mfa.gauth.core.trusted-device-enabledIndicates whether this provider should support trusted devices.
false

Indicates whether this provider should support trusted devices.

Type
Boolean
Default
false
Defined by
CoreGoogleAuthenticatorMultifactorProperties
cas.authn.mfa.gauth.core.window-sizeSince TOTP passwords are time-based, it is essential that the clock of both the server and the client are synchronised within the tolerance defined here as the window size.
3

Since TOTP passwords are time-based, it is essential that the clock of both the server and the client are synchronised within the tolerance defined here as the window size.

Type
Integer
Default
3
Defined by
CoreGoogleAuthenticatorMultifactorProperties
cas.authn.mfa.gauth.crypto.algThe signing/encryption algorithm to use.
no default

The signing/encryption algorithm to use.

Type
String
Default
none
Defined by
EncryptionJwtSigningJwtCryptographyProperties
cas.authn.mfa.gauth.crypto.enabledWhether crypto operations are enabled.
true

Whether crypto operations are enabled.

Type
Boolean
Default
true
Defined by
EncryptionJwtSigningJwtCryptographyProperties
cas.authn.mfa.gauth.crypto.encryption.key-sizeThe encryption key size.
512

The encryption key size.

Type
Integer
Default
512
Defined by
EncryptionJwtCryptoProperties
cas.authn.mfa.gauth.crypto.signing.key-sizeThe signing key size.
512

The signing key size.

Type
Integer
Default
512
Defined by
SigningJwtCryptoProperties
cas.authn.mfa.gauth.crypto.strategy-typeControl the cipher sequence of operations.
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.
Type
String
Default
ENCRYPT_AND_SIGN
Defined by
EncryptionJwtSigningJwtCryptographyProperties

Required settings may be needed to activate or affect the feature; review them even when they have a default. Optional settings only need to be set to change a default or to turn on the behavior they control. Third party settings belong to libraries such as Spring Boot that CAS builds on; their own documentation may have more detail.

Signing & encryption

This CAS feature is able to accept signing and encryption crypto keys. In most scenarios if keys are not provided, CAS will auto-generate them. The following instructions apply if you wish to manually and beforehand create the signing and encryption keys.

Note that if you are asked to create a JWK of a certain size for the key, you are to use the following set of commands to generate the token:

1
2
wget https://raw.githubusercontent.com/apereo/cas/master/etc/jwk-gen.jar
java -jar jwk-gen.jar -t oct -s [size]

The outcome would be similar to:

1
2
3
4
5
{
  "kty": "oct",
  "kid": "...",
  "k": "..."
}

The generated value for k needs to be assigned to the relevant CAS settings. Note that keys generated via the above algorithm are processed by CAS using the Advanced Encryption Standard (AES) algorithm which is a specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology.


Notes on configuration

Configuration Metadata

The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.

Be Selective

This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.

YAGNI

Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.

Naming Convention

Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc.

:information_source: Note

When possible, properties should be stored in lower-case kebab format, such as cas.property-name=value. The only possible exception to this rule is when naming actuator endpoints; The name of the actuator endpoints (i.e. ssoSessions) MUST remain in camelCase mode.

Settings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.

Validation

Configuration properties are automatically validated on CAS startup to report issues with configuration binding, especially if defined CAS settings cannot be recognized or validated by the configuration schema. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.

Indexed Settings

CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.

Bypass

The following settings and properties are available from the CAS configuration catalog:

cas.authn.mfa.gauth.bypass.groovy.locationThe location of the resource.
no default
Required

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, especially if the script is 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.

In situations and scenarios where CAS is able to automatically watch the underlying resource for changes and detect updates and modifications dynamically, you may be able to specify the following setting as either an environment variable or system property with a value of false to disable the resource watcher: org.apereo.cas.util.io.PathWatcherService.

Type
Resource
Default
none
Defined by
GroovyMultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.rest.urlThe endpoint URL to contact and retrieve attributes.
no default
RequiredSpEL

The endpoint URL to contact and retrieve attributes.

Type
String
Default
none
Defined by
RestfulMultifactorAuthenticationProviderBypassProperties
Supports
Spring Expression Language
cas.authn.mfa.gauth.bypass.authentication-attribute-nameSkip multifactor authentication based on designated authentication attribute names.
no default

Skip multifactor authentication based on designated authentication attribute names.

Type
String
Default
none
Defined by
MultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.authentication-attribute-valueOptionally, skip multifactor authentication based on designated authentication attribute values.
no default
Regex

Optionally, skip multifactor authentication based on designated authentication attribute values. Multiple values may be separated by a comma.

Type
String
Default
none
Defined by
MultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.authentication-handler-nameSkip multifactor authentication depending on form of primary authentication execution.
no default
Regex

Skip multifactor authentication depending on form of primary authentication execution. Specifically, skip multifactor if the a particular authentication handler noted by its name successfully is able to authenticate credentials in the primary factor. Multiple values may be separated by a comma.

Type
String
Default
none
Defined by
MultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.authentication-method-nameSkip multifactor authentication depending on method/form of primary authentication execution.
no default
Regex

Skip multifactor authentication depending on method/form of primary authentication execution. Specifically, skip multifactor if the authentication method attribute collected as part of authentication metadata matches a certain value. Multiple values may be separated by a comma.

Type
String
Default
none
Defined by
MultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.credential-class-typeSkip multifactor authentication depending on form of primary credentials.
no default

Skip multifactor authentication depending on form of primary credentials. Value must equal the fully qualified class name of the credential type.

Type
String
Default
none
Defined by
MultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.http-request-headersSkip multifactor authentication if the http request contains the defined header names.
no default
Regex

Skip multifactor authentication if the http request contains the defined header names. Header names may be comma-separated and can be regular expressions; values are ignored.

Type
String
Default
none
Defined by
MultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.http-request-remote-addressSkip multifactor authentication if the http request's remote address or host matches the value defined here.
no default
Regex

Skip multifactor authentication if the http request's remote address or host matches the value defined here. The value may be specified as a regular expression.

Type
String
Default
none
Defined by
MultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.principal-attribute-nameSkip multifactor authentication based on designated principal attribute names.
no default

Skip multifactor authentication based on designated principal attribute names.

Type
String
Default
none
Defined by
MultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.principal-attribute-valueOptionally, skip multifactor authentication based on designated principal attribute values.
no default
Regex

Optionally, skip multifactor authentication based on designated principal attribute values.

Type
String
Default
none
Defined by
MultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.rest.basic-auth-passwordIf REST endpoint is protected via basic authentication, specify the password for authentication.
no default

If REST endpoint is protected via basic authentication, specify the password for authentication.

Type
String
Default
none
Defined by
RestfulMultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.rest.basic-auth-usernameIf REST endpoint is protected via basic authentication, specify the username for authentication.
no default

If REST endpoint is protected via basic authentication, specify the username for authentication.

Type
String
Default
none
Defined by
RestfulMultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.rest.headersHeaders, defined as a Map, to include in the request when making the REST call.
no default

Headers, defined as a Map, to include in the request when making the REST call. Will overwrite any header that CAS is pre-defined to send and include in the request. Key in the map should be the header name and the value in the map should be the header value.

Type
Map<String,String>
Default
none
Defined by
RestfulMultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.rest.maximum-retry-attemptsWhen attempting to reach the endpoint, this setting controls the number of retry attempts that CAS should execute Setting this value to a zero or negative value will disable the retry policy.
3

When attempting to reach the endpoint, this setting controls the number of retry attempts that CAS should execute Setting this value to a zero or negative value will disable the retry policy.

Type
Integer
Default
3
Defined by
RestfulMultifactorAuthenticationProviderBypassProperties
cas.authn.mfa.gauth.bypass.rest.methodHTTP method to use when contacting the rest endpoint.
GET

HTTP method to use when contacting the rest endpoint. Examples include GET, POST, etc.

Type
String
Default
GET
Defined by
RestfulMultifactorAuthenticationProviderBypassProperties

Required settings may be needed to activate or affect the feature; review them even when they have a default. Optional settings only need to be set to change a default or to turn on the behavior they control. Third party settings belong to libraries such as Spring Boot that CAS builds on; their own documentation may have more detail.

Groovy scripting

CAS takes advantage of Apache Groovy in forms of either embedded or external scripts that allow one to, by default, dynamically build constructs, attributes, access strategies and a lot more. To activate the functionality described here, you may need to prepare CAS to support and integrate with Apache Groovy.

Please review this guide to configure your build.

Notes on configuration

Configuration Metadata

The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.

Be Selective

This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.

YAGNI

Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.

Naming Convention

Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc.

:information_source: Note

When possible, properties should be stored in lower-case kebab format, such as cas.property-name=value. The only possible exception to this rule is when naming actuator endpoints; The name of the actuator endpoints (i.e. ssoSessions) MUST remain in camelCase mode.

Settings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.

Validation

Configuration properties are automatically validated on CAS startup to report issues with configuration binding, especially if defined CAS settings cannot be recognized or validated by the configuration schema. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.

Indexed Settings

CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.

Actuator Endpoints

The following endpoints are provided by CAS:

gauthCredentialRepository
CAS endpoint7 operationsNot exposed by default
base path /cas/actuator/
1

Turn the endpoint on and expose it over the web. One entry covers every operation. By default only info, health and status are exposed.

1
2
management.endpoint.gauthCredentialRepository.access=UNRESTRICTED
management.endpoints.web.exposure.include=gauthCredentialRepository

Endpoints may be mapped to other paths. For example, to serve health at healthcheck:

1
management.endpoints.web.path-mapping.health=healthcheck

Token Repository

In order to prevent reuse of tokens issued, CAS will attempt to keep track of tokens that are successfully used to authenticate the user. The repository that holds registration records and tokens is periodically scanned and cleaned up so that expired and previously used tokens may be removed.

The following settings and properties are available from the CAS configuration catalog:

cas.authn.mfa.gauth.cleaner.schedule.cron-expressionA cron-like expression, extending the usual UN*X definition to include triggers on the second, minute, hour, day of month, month, and day of week.
no default

A cron-like expression, extending the usual UN*X definition to include triggers on the second, minute, hour, day of month, month, and day of week. For example, 0 * * * * MON-FRI means once per minute on weekdays (at the top of the minute - the 0th second) or 0 0 0 * * * means every day at midnight. * Note that when cron expressions are defined, the start delay and repeat interval settings are must be removed and set to blank.

Type
String
Default
none
Defined by
SchedulingProperties
cas.authn.mfa.gauth.cleaner.schedule.cron-time-zoneA time zone for which the cron expression will be resolved.
no default

A time zone for which the cron expression will be resolved. By default, this attribute is empty (i.e. the scheduler's time zone will be used).

Type
String
Default
none
Defined by
SchedulingProperties
cas.authn.mfa.gauth.cleaner.schedule.enabledWhether scheduler should be enabled to schedule the job to run.
true

Whether scheduler should be enabled to schedule the job to run.

Type
Boolean
Default
true
Defined by
SchedulingProperties
cas.authn.mfa.gauth.cleaner.schedule.enabled-on-hostOverrides SchedulingProperties#enabled property value of true if this property does not match hostname of CAS server.
.*
Regex

Overrides SchedulingProperties#enabled property value of true if this property does not match hostname of CAS server. This can be useful if deploying CAS with an image in a statefulset where all names are predictable but where having different configurations for different servers is hard. The value can be an exact hostname or a regular expression that will be used to match the hostname.

Type
String
Default
.*
Defined by
SchedulingProperties
cas.authn.mfa.gauth.cleaner.schedule.repeat-intervalString representation of a repeat interval of re-loading data for a data store implementation.
PT2M
Duration

String representation of a repeat interval of re-loading data for a data store implementation. This is the timeout between consecutive job’s executions.

Type
String
Default
PT2M
Defined by
SchedulingProperties
cas.authn.mfa.gauth.cleaner.schedule.start-delayString representation of a start delay of loading data for a data store implementation.
PT15S
Duration

String representation of a start delay of loading data for a data store implementation. This is the delay between scheduler startup and first job’s execution

Type
String
Default
PT15S
Defined by
SchedulingProperties

Required settings may be needed to activate or affect the feature; review them even when they have a default. Optional settings only need to be set to change a default or to turn on the behavior they control. Third party settings belong to libraries such as Spring Boot that CAS builds on; their own documentation may have more detail.

Notes on configuration

Configuration Metadata

The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.

Be Selective

This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.

YAGNI

Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.

Naming Convention

Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc.

:information_source: Note

When possible, properties should be stored in lower-case kebab format, such as cas.property-name=value. The only possible exception to this rule is when naming actuator endpoints; The name of the actuator endpoints (i.e. ssoSessions) MUST remain in camelCase mode.

Settings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.

Validation

Configuration properties are automatically validated on CAS startup to report issues with configuration binding, especially if defined CAS settings cannot be recognized or validated by the configuration schema. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.

Indexed Settings

CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.

Registration

By default, an account registry implementation is included that collects user device registrations and saves them into memory. Issued tokens are also captured into a self-cleaning cache to prevent token reuse for a configurable period of time. This option should only be used for demo and testing purposes. Production deployments of this feature will require a separate implementation of the registry that is capable to register accounts into persistent storage.

Note that each individual account is allowed to register multiple devices to be used later for multifactor authentication. Duration the authentication flow, the user will be asked to select the appropriate device for authentication if multiple device registration records are found. The ability to handle multiple device registration records can be controlled via CAS settings.

Storage Description
JPA See this guide.
MongoDb See this guide.
DynamoDb See this guide.
Redis See this guide.
LDAP See this guide.
REST See this guide.
JSON See this guide.

REST Protocol Credential Extraction

In the event that the CAS REST Protocol is turned on, a special credential extractor is injected into the REST authentication engine in order to recognize credentials and authenticate them as part of the REST request. The expected parameter name in the request body is gauthotp. The account identifier may also be passed using the gauthacct parameter in the request body.

Account Profile Management

The integration with Google Authenticator is able to provide user device registration information to the account profile management feature in CAS. See this guide for better details.