Class EmbeddedAuthorizer

java.lang.Object
io.confluent.security.authorizer.EmbeddedAuthorizer
All Implemented Interfaces:
Authorizer, Closeable, AutoCloseable, org.apache.kafka.common.Configurable

public class EmbeddedAuthorizer extends Object implements Authorizer
Cross-component embedded authorizer that implements common authorization logic. This authorizer loads configured providers and uses them to perform authorization.
  • Constructor Details

    • EmbeddedAuthorizer

      public EmbeddedAuthorizer()
  • Method Details

    • configure

      public void configure(Map<String,?> configs)
      Specified by:
      configure in interface org.apache.kafka.common.Configurable
    • configureServerInfo

      public void configureServerInfo(org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo)
    • authorize

      public List<AuthorizeResult> authorize(RequestContext requestContext, List<Action> actions)
      Description copied from interface: Authorizer
      Performs authorization for each of the provided `actions` and returns the result of each authorization.
      Specified by:
      authorize in interface Authorizer
      Parameters:
      requestContext - Request context including principal and additional context for auditing
      actions - List of actions being authorized including the resource and operation for each action.
      Returns:
      List of authorization results, one for each of the provided actions, in the order they appear in `actions`.
    • groupProvider

      public GroupProvider groupProvider()
    • accessRuleProvider

      public AccessRuleProvider accessRuleProvider(String providerName)
    • metadataProvider

      public MetadataProvider metadataProvider()
    • accessRuleProviders

      public List<AccessRuleProvider> accessRuleProviders()
    • auditLogProvider

      public org.apache.kafka.server.audit.AuditLogProvider auditLogProvider()
    • start

      public CompletableFuture<Void> start(org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo, Runnable initTask)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • removeFromAuthorizerProvidersMap

      public static void removeFromAuthorizerProvidersMap(String sessionUuid)
    • clearAuthorizerProvidersMap

      public static void clearAuthorizerProvidersMap()