Class EmbeddedAuthorizer
java.lang.Object
io.confluent.security.authorizer.EmbeddedAuthorizer
- All Implemented Interfaces:
Authorizer,Closeable,AutoCloseable,org.apache.kafka.common.Configurable,org.apache.kafka.server.authorizer.ProviderGetter
public class EmbeddedAuthorizer
extends Object
implements Authorizer, org.apache.kafka.server.authorizer.ProviderGetter
Cross-component embedded authorizer that implements common authorization logic. This
authorizer loads configured providers and uses them to perform authorization.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessRuleProvider(String providerName) org.apache.kafka.server.audit.AuditLogProviderauthorize(RequestContext requestContext, List<Action> actions) Performs authorization for each of the provided `actions` and returns the result of each authorization.static voidvoidclose()voidvoidconfigureServerInfo(org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo) Optional<org.apache.kafka.server.authorizer.Authorizer> static voidremoveFromAuthorizerProvidersMap(String sessionUuid) start(org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo, Runnable initTask) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.confluent.security.authorizer.Authorizer
authorize, authorize, authorize
-
Constructor Details
-
EmbeddedAuthorizer
public EmbeddedAuthorizer()
-
-
Method Details
-
configure
-
configureServerInfo
public void configureServerInfo(org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo) -
authorize
Description copied from interface:AuthorizerPerforms authorization for each of the provided `actions` and returns the result of each authorization.- Specified by:
authorizein interfaceAuthorizer- Parameters:
requestContext- Request context including principal and additional context for auditingactions- 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
-
accessRuleProvider
-
metadataProvider
-
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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
removeFromAuthorizerProvidersMap
-
getRbacGroupProvider
- Specified by:
getRbacGroupProviderin interfaceorg.apache.kafka.server.authorizer.ProviderGetter
-
clearAuthorizerProvidersMap
public static void clearAuthorizerProvidersMap()
-