Apereo CAS - Multifactor Authentication w/ WebAuthn FIDO2

Posted by Misagh Moayyed on May 18, 2023 · 7 mins read ·
Content Unavailable
Your browser is blocking content on this website. Please check your browser settings and try again.

WebAuthn/FIDO2 is a set of open standards developed by the FIDO (Fast Identity Online) Alliance, a consortium of leading technology companies aiming to eliminate password-based authentication and strengthen online security. This technology offers a standardized framework for secure and convenient authentication on the web, enabling users to log in to websites and applications using stronger methods, such as biometrics and hardware tokens, instead of traditional passwords. WebAuthn/FIDO2 is supported by major web browsers, platforms, and devices, making it a universal authentication standard. This interoperability ensures that users can enjoy the benefits of passwordless authentication across various online services, irrespective of the device or operating system they use.

WebAuthn support in Apereo CAS comes in two flavors: one that can act as a multifactor authentication provider in combination and in addition to the typical primary authentication flow, and one that can itself act as the primary mode of authentication for a passwordless experience. In this blog post, we will briefly review the configuration required to turn on WebAuthnin Apereo CAS and walk through the usual configuration options and nuances.

Our starting position is as follows:

  • CAS 7.0.x
  • Java 21


Once you have the right module in place, your starting set of configuration options should be as follows:

cas.authn.mfa.web-authn.core.relying-party-name=CAS WebAuthn

Devices and browsers need to be registered with CAS before they can present credentials and authenticate. The registration flow is baked into CAS automatically, and for the most part, you should just decide how and where the device registration records should be stored and managed. One option is to use a simple JSON file:


That should be sufficient. Next, when you navigate to https://sso.example.org/cas/login?authn_method=mfa-webauthn, you should be asked to register your browser/device after the initial primary authentication step.

Attestation Trust

To manage device attestation trust, CAS by default ships with a set of trust metadata offered by Yubico, for a series of devices that are also primarily offered by Yubico. You could of course load your trust metadata as a JSON file via the following setting:


Or you might feel lucky and want to disable attestation trust altogether:


Recent versions of CAS also support downloading attestation trust metadata blogs from the FIDO website. For this to activate, you need to accept the terms and conditions of FIDO service via:

# Optionally, specify the URL...
# cas.authn.mfa.web-authn.core.trust-source.fido.metadata-blob-url=https://mds.fidoalliance.org/

cas.authn.mfa.web-authn.core.trust-source.fido.legal-header= \
    Retrieval and use of this BLOB indicates acceptance of the appropriate \
    agreement located at https://fidoalliance.org/metadata/metadata-legal-terms/

Passwordless Authentication

So far, the WebAuthn/FIDO2 flow is a secondary flow after the initial primary authentication step. For a better passwordless experience, you may allow users to directly authenticate with their FIDO2-enabled device via the following option:


This would allow CAS to present the WebAuthn/FIDO2 flow as the primary of authentication:

Note that this option only works if there is a registration entry for the device found already, which means you’d have to register devices out of band.

Remember that WebAuthn/FIDO2 is now used as the first and primary authentication strategy. Once the flow has been completed successfully, you may need to still allow CAS to fetch attributes for the authenticated user from various attribute sources. To handle this, you will need to define attribute repositories, for example, to connect to an LDAP server and fetch attributes such as displayName:


…and to complete the flow, use the following setting to instruct CAS to fetch attributes for the authenticated CAS principal/subject, and disregard the credential identifier for principal/person resolution:


Need Help?

If you have questions about the contents and the topic of this blog post, or if you need additional guidance and support, feel free to send us a note and ask about consulting and support services.


I hope this review was of some help to you and I am sure that both this post as well as the functionality it attempts to explain can be improved in any number of ways. Please feel free to engage and contribute as best as you can.

Happy Coding,

Misagh Moayyed