Package net.shibboleth.idp.plugin.authn.webauthn.admin.policy.impl

# Class AllowlistAuthenticatorPolicy

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.policy.impl.AbstractAuthenticatorPolicyRule
net.shibboleth.idp.plugin.authn.webauthn.admin.policy.impl.AllowlistAuthenticatorPolicy

All Implemented Interfaces:
  `AuthenticatorPolicy`, `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`

public class AllowlistAuthenticatorPolicy extends AbstractAuthenticatorPolicyRule
A basic authenticator policy that rejects all authenticators not in the allowed list.

## Nested Class Summary

## Nested classes/interfaces inherited from interface net.shibboleth.idp.plugin.authn.webauthn.admin.policy.AuthenticatorPolicy

`AuthenticatorPolicy.AuthenticatorPolicyOutcome`

## Field Summary

Fields
Modifier and Type
Field
Description
`private Set<com.yubico.fido.metadata.AAGUID>`
`allowedAuthenticators`
A set of allowed authenticators, based on their AAGUID.
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`AllowlistAuthenticatorPolicy()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`AuthenticatorPolicy.AuthenticatorPolicyOutcome`
`doAccept(com.yubico.fido.metadata.AAGUID aaguid, ProfileRequestContext prc)`
Execute the policy.
`void`
`setAllowedAuthenticators(Set<String> allowed)`
Set the allowable authenticators based on their AAGUID.

### Methods inherited from class net.shibboleth.idp.plugin.authn.webauthn.admin.policy.impl.AbstractAuthenticatorPolicyRule

`evaluate, getFidoMetadataService, setActivationCondition, setActivationConditionStrategy, setFidoMetadataService`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

`setId`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

`doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### allowedAuthenticators

@Nonnull @NotLive @Unmodifiable private Set<com.yubico.fido.metadata.AAGUID> allowedAuthenticators
A set of allowed authenticators, based on their AAGUID.

## Constructor Details

### AllowlistAuthenticatorPolicy

public AllowlistAuthenticatorPolicy()
Constructor.

## Method Details

### setAllowedAuthenticators

public void setAllowedAuthenticators(Set<String> allowed)
Set the allowable authenticators based on their AAGUID.

Parameters:
  `allowed` - The allowed authenticators to set.

### doAccept

public AuthenticatorPolicy.AuthenticatorPolicyOutcome doAccept(@Nonnull com.yubico.fido.metadata.AAGUID aaguid, @Nullable ProfileRequestContext prc)
Execute the policy. Return true if allowed, false otherwise. Implementations should override this method.

Specified by:
  `doAccept` in class `AbstractAuthenticatorPolicyRule`
Parameters:
  `aaguid` - the authenticator attestation GUID.
  `prc` - the profile request context
Returns:
  true if the policy allows the authenticator, false otherwise.