Class RequireStrongFreshAuthnAccessPredicate
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.plugin.authn.webauthn.admin.impl.RequireStrongFreshAuthnAccessPredicate
- All Implemented Interfaces:
Predicate<ProfileRequestContext>,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public class RequireStrongFreshAuthnAccessPredicate
extends AbstractIdentifiableInitializableComponent
implements Predicate<ProfileRequestContext>
Access control predicate, used within a WebAuthn registration flow, to check if a user with existing WebAuthn/FIDO2
credentials has performed a fresh, strong, authentication. A fresh and strong authentication is signalled by a
flag in the
WebAuthnGuardContext context. The flag is likely set inside the MFA flow logic by
the deployer indicating the expected level of authentication was performed.- Since:
- 1.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate WebAuthnCredentialRepositoryThe credential repository.private final org.slf4j.LoggerClass logger.private Function<ProfileRequestContext,SubjectContext> Strategy function to lookup SubjectContext.Lookup strategy to locate the WebAuthnGuardContext. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidsetCredentialRepository(WebAuthnCredentialRepository repository) Set the credential repository used to store WebAuthn credentials.voidSet the lookup strategy to use to locate theSubjectContext.voidsetWebAuthnGuardContextLookupStrategy(Function<ProfileRequestContext, WebAuthnGuardContext> strategy) Set the lookup strategy to use to locate theWebAuthnGuardContext.booleantest(ProfileRequestContext profileRequestContext) Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, 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.IdentifiedComponent
getId
-
Field Details
-
log
Class logger. -
webAuthnGuardContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,WebAuthnGuardContext> webAuthnGuardContextLookupStrategyLookup strategy to locate the WebAuthnGuardContext. -
subjectContextLookupStrategy
Strategy function to lookup SubjectContext. -
credentialRepository
The credential repository.
-
-
Constructor Details
-
RequireStrongFreshAuthnAccessPredicate
public RequireStrongFreshAuthnAccessPredicate()Constructor.
-
-
Method Details
-
setWebAuthnGuardContextLookupStrategy
public void setWebAuthnGuardContextLookupStrategy(Function<ProfileRequestContext, WebAuthnGuardContext> strategy) Set the lookup strategy to use to locate theWebAuthnGuardContext.- Parameters:
strategy- lookup function to use
-
setSubjectContextLookupStrategy
public void setSubjectContextLookupStrategy(@Nonnull Function<ProfileRequestContext, SubjectContext> strategy) Set the lookup strategy to use to locate theSubjectContext.- Parameters:
strategy- lookup function to use
-
setCredentialRepository
Set the credential repository used to store WebAuthn credentials.- Parameters:
repository- The repository to set.
-
doInitialize
- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
test
- Specified by:
testin interfacePredicate<ProfileRequestContext>
-