Class JwtAuthenticationConfig
java.lang.Object
io.confluent.security.authentication.AuthenticationConfig<BearerCredential, JwtPrincipal>
io.confluent.security.authentication.oauthbearer.JwtAuthenticationConfig
public final class JwtAuthenticationConfig
extends AuthenticationConfig<BearerCredential, JwtPrincipal>
Configure
JwtAuthenticator instance.
JwtAuthenticator instances have two primary responsibilities:
1. Manage Issuer public key material.
2. Decode JsonWebSignature tokens and validate their claims.
Key material handling is performed by the JwtAuthenticator VerificationKeyResolver.
Each JwtIssuer must be provided a name which should be the URL of the JWT issuing authority.
There are exceptions to this rule so any string value will do as long as it matches the incoming JWT iss claim value.
There may be certain scenarios where JwtAuthenticator may want to take some action in an Issuer agnostic
manner. One such use cases would be to forward the token to another trusted service for validation.
In order to support this use case register a JwtIssuer with the name '*'.
This will act as a catchall for any unrecognized issuer.
Token verification may be restricted to a specific set of keys by setting the AlgorithmWhitelist parameter.
SignatureAlgorithm.RS256 and SignatureAlgorithm.ES256 are whitelisted by default.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class io.confluent.security.authentication.AuthenticationConfig
AuthenticationConfig.Kind -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newAuthenticatorinstance.issuers()List ofJwtIssuers registered with thisJwtAuthenticator.kind()Describes theAuthenticationConfigimplementation.
-
Field Details
-
CONFLUENT_ISSUER
- See Also:
-
CONFIG_PREFIX
- See Also:
-
CONFLUENT_SPIRE_ISSUER_SUFFIX_PROP
- See Also:
-
CONFLUENT_SPIRE_ISSUER_SUFFIX
- See Also:
-
-
Method Details
-
kind
Describes theAuthenticationConfigimplementation.- Specified by:
kindin classAuthenticationConfig<BearerCredential, JwtPrincipal>- Returns:
AuthenticationConfig.Kind
-
algorithmWhitelist
-
issuers
-
spireAgentSocketEndpoint
-
createAuthenticator
Creates a newAuthenticatorinstance.- Specified by:
createAuthenticatorin classAuthenticationConfig<BearerCredential, JwtPrincipal>- Returns:
Authenticator
-
builder
-