Class OAuthBearerPrincipalResolver

java.lang.Object
io.confluent.kafka.security.authenticator.OAuthBearerPrincipalResolver

public class OAuthBearerPrincipalResolver extends Object
Resolves a SASL/OAUTHBEARER authentication context into a principal name and the set of groups carried by the JWT. Shared by OAuthKafkaPrincipalBuilder and CpcPrincipalBuilder.

Behavior (unchanged from the original OAuthKafkaPrincipalBuilder implementation):

  • Parses the negotiated OAuthBearer token as JWT claims.
  • Validates impersonation: if the JWT has a cp_proxy claim and client auth is REQUIRED with validation enabled, the claim must match the mTLS cert identity.
  • Selects the groups claim by issuer: Confluent issuer uses groups, otherwise the configured claim name (empty by default → no groups).
  • Field Details

    • CONFLUENT_IMPERSONATED_BY_CLAIM_NAME

      public static final String CONFLUENT_IMPERSONATED_BY_CLAIM_NAME
      See Also:
  • Constructor Details

    • OAuthBearerPrincipalResolver

      public OAuthBearerPrincipalResolver()
  • Method Details