public class OAuthKafkaPrincipalBuilder
extends org.apache.kafka.common.security.authenticator.DefaultKafkaPrincipalBuilder
implements org.apache.kafka.common.Configurable
It ensures that additional session info is associated with the current session to allow enforcing access token lifetime, for re-authentication to operate properly, and for custom authorizers to have access to additional session state - i.e. the parsed access token. The extra information is in the form of SessionInfo object containing the OAuthBearerToken token produced by io.strimzi.kafka.oauth.server.JaasServerOauthValidatorCallbackHandler.
It is also required for OAuth over PLAIN to operate properly.
Use 'principal.builder.class=io.strimzi.kafka.oauth.server.OAuthKafkaPrincipalBuilder' property definition in server.properties to install it.
| Constructor and Description |
|---|
OAuthKafkaPrincipalBuilder() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.kafka.common.security.auth.KafkaPrincipal |
build(org.apache.kafka.common.security.auth.AuthenticationContext context) |
void |
configure(java.util.Map<java.lang.String,?> configs) |
public void configure(java.util.Map<java.lang.String,?> configs)
configure in interface org.apache.kafka.common.Configurablepublic org.apache.kafka.common.security.auth.KafkaPrincipal build(org.apache.kafka.common.security.auth.AuthenticationContext context)
build in interface org.apache.kafka.common.security.auth.KafkaPrincipalBuilderbuild in class org.apache.kafka.common.security.authenticator.DefaultKafkaPrincipalBuilderCopyright © 2021. All rights reserved.