FIDO2 WebAuthn Multifactor Authentication

WebAuthn is an API that makes it very easy for a relying party, such as a web service, to integrate strong authentication into applications using support built in to all leading browsers and platforms. This means that web services can now easily offer their users strong authentication with a choice of authenticators such as security keys or built-in platform authenticators such as biometric readers.

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

1
2
3
4
5
<dependency>
    <groupId>org.apereo.cas</groupId>
    <artifactId>cas-server-support-webauthn</artifactId>
    <version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-webauthn:${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-webauthn"
}
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-webauthn"
}

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.mfa.web-authn.core.trusted-device-metadata.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.

  • cas.authn.mfa.web-authn.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.

  • cas.authn.mfa.web-authn.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.

  • cas.authn.mfa.web-authn.core.application-id=
  • The extension input to set for the appid extension when initiating authentication operations. If this member is set, starting an assertion op will automatically set the appid extension input, and finish assertion op will adjust its verification logic to also accept this AppID as an alternative to the RP ID. By default, this is not set.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

  • cas.authn.mfa.web-authn.core.relying-party-id=
  • The id that will be set as the rp parameter when initiating registration operations, and which id hash will be compared against. This is a required parameter. A successful registration or authentication operation requires rp id hash to exactly equal the SHA-256 hash of this id member. Alternatively, it may instead equal the SHA-256 hash of application id if the latter is present.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

  • cas.authn.mfa.web-authn.core.relying-party-name=
  • The human-palatable name of the Relaying Party.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

    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.mfa.web-authn.crypto.alg=
  • The signing/encryption algorithm to use.

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

  • cas.authn.mfa.web-authn.crypto.enabled=true
  • Whether crypto operations are enabled.

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

  • cas.authn.mfa.web-authn.crypto.encryption.key-size=512
  • The encryption key size.

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

  • cas.authn.mfa.web-authn.crypto.signing.key-size=512
  • The signing key size.

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

  • cas.authn.mfa.web-authn.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.

  • cas.authn.mfa.web-authn.core.allow-primary-authentication=false
  • Configure the authentication flow to allow web-authn to be used as the first primary factor for authentication. Registered accounts with a valid webauthn registration record can choose to login using their device as the first step.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

  • cas.authn.mfa.web-authn.core.allow-untrusted-attestation=false
  • If false finish registration op will only allow registrations where the attestation signature can be linked to a trusted attestation root. This excludes self attestation and none attestation. Regardless of the value of this option, invalid attestation statements of supported formats will always be rejected. For example, a "packed" attestation statement with an invalid signature will be rejected even if this option is set to true.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

  • cas.authn.mfa.web-authn.core.allowed-origins=
  • The allowed origins that returned authenticator responses will be compared against. The default is set to the server name. A successful registration or authentication operation requires origins to exactly equal one of these values.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

  • cas.authn.mfa.web-authn.core.attestation-conveyance-preference=DIRECT
  • Accepted values are: DIRECT, INDIRECT, NONE. The argument for the attestation parameter in registration operations. Unless your application has a concrete policy for authenticator attestation, it is recommended to leave this parameter undefined.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

  • cas.authn.mfa.web-authn.core.display-name-attribute=displayName
  • Name of the principal attribute that indicates the principal's display name, primarily used for device registration.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

  • cas.authn.mfa.web-authn.core.enabled=true
  • Whether WebAuthn functionality should be activated and enabled.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

  • cas.authn.mfa.web-authn.core.expire-devices=30
  • Expire and forget device registration records after this period.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

  • cas.authn.mfa.web-authn.core.expire-devices-time-unit=
  • Device registration record expiration time unit.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

  • cas.authn.mfa.web-authn.core.trusted-device-enabled=false
  • Indicates whether this provider should support trusted devices.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.

  • cas.authn.mfa.web-authn.core.validate-signature-counter=true
  • If true, finish assertion op will fail if the signature counter value in the response is not strictly greater than the stored signature counter value.

    org.apereo.cas.configuration.model.support.mfa.webauthn.WebAuthnMultifactorAuthenticationCoreProperties.