WebAuthnCredentialRepository
Overview
A critical component of the plugin is the credential repository, which stores and loads credential registrations. The default credential repository utilizes the Shibboleth Storage Service, but it's also possible to utilize other repository implementations by extending the WebAuthnCredentialRepository interface. By default, whatever storage service referenced by the IdP property shibboleth.StorageService is used. However, you can override this by specifying a different bean in the idp.authn.webauthn.StorageService property in conf/authn/webauthn.properties.
In theory, any implementation of a storage service should be compatible, but it's important to consider its capabilities before using it. For example, for testing, you can use client-storage by referencing the bean shibboleth.ClientSessionStorageService. But that will store your credential registrations in the browser and is not portable across browsers—although the credentials will survive an IdP restart so it might be useful during initial testing.
JDBC Example
In production, you may want to consider using a JDBC storage option. Assuming you do not already have a database suitable for use with the Shibboleth Storage Service (if you do, you can skip to step 3), then:
Install the JDBC storage plugin and create a new schema/database (e.g.
webauthn
) and a new table (e.g.webauthn.StorageRecords
):
Then, configure a suitable JDBC connection by following the JDBC storage plugin documentation.
Finally, set the storage service bean you want to use for WebAuthn using the property idp.authn.webauthn.StorageService in conf/authn/webauthn.properties
Credential Registration Data Model
The credential registration data model is captured by the CredentialRecord. This record is serialized into JSON for storage. An example record is shown below.