Class AttestationBasedClientAuthenticator
java.lang.Object
org.keycloak.authentication.authenticators.client.AbstractClientAuthenticator
org.keycloak.authentication.authenticators.client.AttestationBasedClientAuthenticator
- All Implemented Interfaces:
ClientAuthenticator,ClientAuthenticatorFactory,ConfigurableAuthenticatorFactory,ConfiguredPerClientProvider,ConfiguredProvider,EnvironmentDependentProviderFactory,Provider,ProviderFactory<ClientAuthenticator>
public class AttestationBasedClientAuthenticator
extends AbstractClientAuthenticator
implements EnvironmentDependentProviderFactory
Attestation-Based Client Authentication based on Client Attestation JWT and PoP.
See specs for more details.
The current implementation aligns with HAIP Profile 1.0
specifically Attestation-Based Client Authentication - Draft07
- Author:
- Thomas Diesler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe AttestationBasedClientAuthenticator configstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe ClientAuthenticator needs to be aware of the public keys from the various Attesters it can trust.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.keycloak.authentication.authenticators.client.AbstractClientAuthenticator
loggerFields inherited from interface org.keycloak.authentication.ConfigurableAuthenticatorFactory
REQUIREMENT_CHOICES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInitial call for the authenticator.getAdapterConfiguration(KeycloakSession session, ClientModel client) Get configuration, which needs to be used for adapter ( keycloak.json ) of particular client.List of config properties for this client implementation.Friendly name for the authenticatorgetId()getProtocolAuthenticatorMethods(String loginProtocol) Get authentication methods for the specified protocolWhat requirement settings are allowed.booleanIs this authenticator configurable globally?booleanisSupported(Config.Scope config) Check if the provider is supported and should be available based on the provider configuration.Methods inherited from class org.keycloak.authentication.authenticators.client.AbstractClientAuthenticator
close, create, create, getReferenceCategory, init, isUserSetupAllowed, postInitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.authentication.ClientAuthenticatorFactory
getProtocolAuthenticatorMethod, setClientAuthenticationMethod, supportsSecretMethods inherited from interface org.keycloak.authentication.ConfigurableAuthenticatorFactory
getOptionalReferenceCategoriesMethods inherited from interface org.keycloak.provider.ConfiguredProvider
getConfigMethods inherited from interface org.keycloak.provider.ProviderFactory
dependsOn, getConfigMetadata, order
-
Field Details
-
PROVIDER_ID
- See Also:
-
OAUTH_CLIENT_ATTESTATION_HEADER
- See Also:
-
OAUTH_CLIENT_ATTESTATION_POP_HEADER
- See Also:
-
OAUTH_CLIENT_ATTESTATION_JWT_TYPE
- See Also:
-
OAUTH_CLIENT_ATTESTATION_POP_JWT_TYPE
- See Also:
-
OAUTH_CLIENT_ATTESTATION_CONFIG_ATTESTER_JWKS
The ClientAuthenticator needs to be aware of the public keys from the various Attesters it can trust. [ { "kty": "RSA", "kid": "openid-abca-attester-key", "use": "sig", "alg": "PS256", "n": "uVd8mEqXMp...aaVZNQ", "e": "AQAB" } ]- See Also:
-
-
Constructor Details
-
AttestationBasedClientAuthenticator
public AttestationBasedClientAuthenticator()
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceProviderFactory<ClientAuthenticator>
-
authenticateClient
Description copied from interface:ClientAuthenticatorInitial call for the authenticator. This method should check the current HTTP request to determine if the request satisfies the ClientAuthenticator's requirements. If it doesn't, it should send back a challenge response by calling the ClientAuthenticationFlowContext.challenge(Response).- Specified by:
authenticateClientin interfaceClientAuthenticator
-
getDisplayType
Description copied from interface:ConfigurableAuthenticatorFactoryFriendly name for the authenticator- Specified by:
getDisplayTypein interfaceConfigurableAuthenticatorFactory- Returns:
-
getHelpText
- Specified by:
getHelpTextin interfaceConfiguredProvider
-
getRequirementChoices
Description copied from interface:ConfigurableAuthenticatorFactoryWhat requirement settings are allowed.- Specified by:
getRequirementChoicesin interfaceConfigurableAuthenticatorFactory- Returns:
-
isConfigurable
public boolean isConfigurable()Description copied from interface:ClientAuthenticatorFactoryIs this authenticator configurable globally?- Specified by:
isConfigurablein interfaceClientAuthenticatorFactory- Specified by:
isConfigurablein interfaceConfigurableAuthenticatorFactory- Returns:
-
getConfigProperties
- Specified by:
getConfigPropertiesin interfaceConfiguredProvider
-
getConfigPropertiesPerClient
Description copied from interface:ConfiguredPerClientProviderList of config properties for this client implementation. Those will be shown in admin console in clients credentials tab and can be configured per client.- Specified by:
getConfigPropertiesPerClientin interfaceConfiguredPerClientProvider- Returns:
-
getAdapterConfiguration
Description copied from interface:ClientAuthenticatorFactoryGet configuration, which needs to be used for adapter ( keycloak.json ) of particular client. Some implementations may return just template and user needs to edit the values according to his environment (For example fill the location of keystore file)- Specified by:
getAdapterConfigurationin interfaceClientAuthenticatorFactory- Returns:
-
isSupported
Description copied from interface:EnvironmentDependentProviderFactoryCheck if the provider is supported and should be available based on the provider configuration.- Specified by:
isSupportedin interfaceEnvironmentDependentProviderFactory- Parameters:
config- the provider configuration- Returns:
trueif the provider is supported. Otherwise,false.
-
getProtocolAuthenticatorMethods
Description copied from interface:ClientAuthenticatorFactoryGet authentication methods for the specified protocol- Specified by:
getProtocolAuthenticatorMethodsin interfaceClientAuthenticatorFactory- Parameters:
loginProtocol- corresponds toProviderFactory.getId()- Returns:
- name of supported client authenticator methods in the protocol specific "language"
-