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.
Note that the functionality presented here should also be compatible with the likes of LastPass Authenticator, 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"
}
The following settings and properties are available from the CAS configuration catalog:
cas.authn.mfa.gauth.core.issuer=CASIssuer
Issuer used in the barcode when dealing with device registration events. Used in the registration URL to identify CAS. |
cas.authn.mfa.gauth.core.label=CASLabel
Label used in the barcode when dealing with device registration events. Used in the registration URL to identify CAS. |
cas.authn.mfa.gauth.core.code-digits=6
Length of the generated code. |
cas.authn.mfa.gauth.core.multiple-device-registration-enabled=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. |
cas.authn.mfa.gauth.core.time-step-size=30
The expiration time of the generated code in seconds. |
cas.authn.mfa.gauth.core.trusted-device-enabled=false
Indicates whether this provider should support trusted devices. |
cas.authn.mfa.gauth.core.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. |