Class AbstractWebAuthnAction<T>
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.plugin.authn.webauthn.impl.AbstractWebAuthnAction<T>
- Type Parameters:
T- the WebAuthn context type
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
- Direct Known Subclasses:
AbstractWebAuthnAuditingAction,AddAttestationConveyancePreference,AddAuthenticatorAttachmentRequirement,AddDisplayName,AddResidentKeyRequirement,AddUserId,AddUserName,AddUserVerificationRequirement,CheckCredentialPolicy,CheckRegistrationPolicy,CreatePublicKeyCredentialCreationOptions,CreatePublicKeyCredentialRequestOptions,EnsureAllowedCredentialsIsEmpty,ExtractPublicKeyCredentialAssertionFromFormRequest,ExtractPublicKeyCredentialAttestationFromFormRequest,ExtractUsernameSearchFromFormRequest,GenerateServerChallenge,InitializeAdminSubjectCanonicalizationContext,InitializeSubjectCanonicalizationContext,LookupCredentialsForUser,LookupRegisteredCredentials,LookupRegisteredCredentialsFromUserHandle,UpdateAdminContextWithC14nPrincipal,UpdateWebAuthnContextWithC14nPrincipal,ValidateAuthenticatorAttestationResponse
A base class for WebAuthn actions. Makes available the WebAuthn client, credential repository, and metadata service
In addition to the work performed by AbstractProfileAction, this action also looks up
and makes available a WebAuthn context.
WebAuthn implementations should override the doExecute(ProfileRequestContext, T) method.
- Event:
EventIds.INVALID_PROFILE_CTX- Precondition:
ProfileRequestContext.getSubcontext(ProfileRequestContext.class) != null
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PasskeyAaguidMetadataServiceSupplementary description and icon information for passkey providers not in the MDS feed (mostly software providers).private WebAuthnCredentialRepositoryThe credential repository to store valid credentials in.private com.yubico.fido.metadata.FidoMetadataServiceOptional FIDO metadata service resolver.private final org.slf4j.LoggerClass logger.private WebAuthnAuthenticationClientThe WebAuthn client to use.private TThe WebAuthn Context.private Function<ProfileRequestContext,T> Lookup strategy to locate the WebAuthn context. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractWebAuthnAction(Function<ProfileRequestContext, T> defaultStrategy) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected final voiddoExecute(ProfileRequestContext profileRequestContext) Delegates todoExecute(ProfileRequestContext, Object).protected voiddoExecute(ProfileRequestContext profileRequestContext, T context) Performs this WebAuthn authentication action using the supplied WebAuthn context.protected voidprotected final booleandoPreExecute(ProfileRequestContext profileRequestContext) protected booleandoPreExecute(ProfileRequestContext profileRequestContext, T context) Performs this authentication action's pre-execute step.protected Collection<EnhancedCredentialRecord>enhancedCredentialRecord(Collection<CredentialRecord> credentials) CreateEnhancedCredentialRecordsfrom the givenCredentialRecordsand add any appropriate metadata to each record.protected AaguidEntrygetAaguidMetadata(com.yubico.fido.metadata.AAGUID aaguid) Get basic authenticator/provider information from the AAGUID.Get the supplementary description service which contains descriptions and icons for passkey providers not in the MDS feed.protected Set<com.yubico.fido.metadata.MetadataBLOBPayloadEntry>getAuthenticatorMetadata(com.yubico.webauthn.data.ByteArray authenticatorId) Find FIDO2 MDS metadata for the authenticator.protected WebAuthnCredentialRepositoryGet the credential repository used to store WebAuthn credentials.protected com.yubico.fido.metadata.FidoMetadataServiceGet the FIDO Alliance metadata service resolver to use as the attestation trust source.protected WebAuthnAuthenticationClientGet the WebAuthn client used to handle registration and authentication ceremonies.voidSet the supplementary description service which contains descriptions and icons for passkey providers not in the MDS feed.voidsetCredentialRepository(WebAuthnCredentialRepository repository) Set the credential repository used to store WebAuthn credentials.voidsetFidoMetadataService(com.yubico.fido.metadata.FidoMetadataService service) Set the FIDO Alliance metadata service resolver to use as the attestation trust source.voidSet the WebAuthn client used to handle registration and authentication ceremonies.voidSet the WebAuthn context lookup strategy to use.Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
Class logger. -
webauthnContextLookupStrategy
Lookup strategy to locate the WebAuthn context. -
webauthnContext
The WebAuthn Context. -
webAuthnClient
The WebAuthn client to use. -
credentialRepository
The credential repository to store valid credentials in. -
fidoMetadataService
@Nullable private com.yubico.fido.metadata.FidoMetadataService fidoMetadataServiceOptional FIDO metadata service resolver. -
aaguidService
Supplementary description and icon information for passkey providers not in the MDS feed (mostly software providers). Enhances the UI.
-
-
Constructor Details
-
AbstractWebAuthnAction
Constructor.- Parameters:
defaultStrategy- the default WebAuthn context lookup strategy to use
-
-
Method Details
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
setWebAuthnClient
Set the WebAuthn client used to handle registration and authentication ceremonies.- Parameters:
client- The WebAuthn client to set.
-
getWebAuthnClient
Get the WebAuthn client used to handle registration and authentication ceremonies.- Returns:
- the WebAuthn client.
-
setAaguidService
Set the supplementary description service which contains descriptions and icons for passkey providers not in the MDS feed.- Parameters:
service- The AAGUID service to set.
-
getAaguidService
Get the supplementary description service which contains descriptions and icons for passkey providers not in the MDS feed.- Returns:
- the AAGUID service.
-
setFidoMetadataService
public void setFidoMetadataService(@Nullable com.yubico.fido.metadata.FidoMetadataService service) Set the FIDO Alliance metadata service resolver to use as the attestation trust source.- Parameters:
service- The FIDO metadata service to set.
-
getFidoMetadataService
@Nullable protected com.yubico.fido.metadata.FidoMetadataService getFidoMetadataService()Get the FIDO Alliance metadata service resolver to use as the attestation trust source.- Returns:
- the FIDO metadata service.
-
setCredentialRepository
Set the credential repository used to store WebAuthn credentials.- Parameters:
repository- The respository to set.
-
getCredentialRepository
Get the credential repository used to store WebAuthn credentials.- Returns:
- the credential repository.
-
setWebAuthnContextLookupStrategy
Set the WebAuthn context lookup strategy to use.- Parameters:
strategy- lookup strategy
-
doPreExecute
- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
Delegates todoExecute(ProfileRequestContext, Object). Implementations can not override this method.- Overrides:
doExecutein classAbstractProfileAction- Parameters:
profileRequestContext- the current IdP profile request context
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull T context) Performs this authentication action's pre-execute step. Default implementation just returns true.- Parameters:
profileRequestContext- the current IdP profile request contextcontext- the WebAuthn context- Returns:
- true iff execution should continue
-
doExecute
Performs this WebAuthn authentication action using the supplied WebAuthn context. Implementations should override this method.- Parameters:
profileRequestContext- the current IdP profile request contextcontext- the WebAuthn context
-
getAuthenticatorMetadata
@Nonnull @NotLive @NonnullElements protected Set<com.yubico.fido.metadata.MetadataBLOBPayloadEntry> getAuthenticatorMetadata(com.yubico.webauthn.data.ByteArray authenticatorId) Find FIDO2 MDS metadata for the authenticator.- Parameters:
authenticatorId- the authenticator attestation GUID- Returns:
- the attestation metadata relating to the authenticator attestation GUID
-
getAaguidMetadata
Get basic authenticator/provider information from the AAGUID. Contains providers not in the FIDO2 MDS feed, for example, software authenticators.- Parameters:
aaguid- the authenticator attestation GUID- Returns:
- the aaguid metadata, or null if not found.
-
enhancedCredentialRecord
@NotLive @Unmodifiable @Nonnull protected Collection<EnhancedCredentialRecord> enhancedCredentialRecord(Collection<CredentialRecord> credentials) CreateEnhancedCredentialRecordsfrom the givenCredentialRecordsand add any appropriate metadata to each record.- Parameters:
credentials- the credentials to convert toEnhancedCredentialRecords.- Returns:
- a collection of enhanced credential records
-