Class CpcAuthorizer
java.lang.Object
io.confluent.security.authorizer.EmbeddedAuthorizer
io.confluent.kafka.security.authorizer.ConfluentServerAuthorizer
io.confluent.kafka.cpc.multitenant.CpcAuthorizer
- All Implemented Interfaces:
io.confluent.security.authorizer.Authorizer, Closeable, AutoCloseable, org.apache.kafka.common.Configurable, org.apache.kafka.common.Reconfigurable, org.apache.kafka.metadata.authorizer.ClusterMetadataAuthorizer, org.apache.kafka.server.authorizer.Authorizer, org.apache.kafka.server.authorizer.ProviderGetter
Simplified tenant-aware authorizer for CPC (Confluent Private Cloud).
Works with CpcPrincipalBuilder which creates MultiTenantPrincipal
from SNI hostnames, and the TenantAclProvider (MULTI_TENANT access rule
provider) for tenant principal matching.
This is a streamlined version of the cloud MultiTenantAuthorizer, deliberately excluding resource-ID conversion, cluster-link ACL aggregation, and complex metrics. These can be added incrementally as CPC matures.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.confluent.security.authorizer.EmbeddedAuthorizer
io.confluent.security.authorizer.EmbeddedAuthorizer.AuthorizerMetrics -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIterable<org.apache.kafka.common.acl.AclBinding> acls(org.apache.kafka.common.acl.AclBindingFilter filter) voidapplyAclChanges(Map<org.apache.kafka.common.Uuid, Optional<org.apache.kafka.metadata.authorizer.ConfluentStandardAcl>> aclChanges) io.confluent.security.authorizer.ActionbuildAction(org.apache.kafka.server.authorizer.Action kafkaAction, org.apache.kafka.common.resource.ResourcePattern resourcePattern, org.apache.kafka.common.security.auth.KafkaPrincipal sessionPrincipal, io.confluent.security.authorizer.Scope scope) Optional<org.apache.kafka.server.authorizer.AuthorizerConfig> config()voidvoidconfigureAccessRuleProviders(Map<String, Object> configs) List<? extends CompletionStage<org.apache.kafka.server.authorizer.AclCreateResult>> createAcls(org.apache.kafka.server.authorizer.AuthorizableRequestContext requestContext, List<org.apache.kafka.common.acl.AclBinding> aclBindings) List<? extends CompletionStage<org.apache.kafka.server.authorizer.AclCreateResult>> createAcls(org.apache.kafka.server.authorizer.AuthorizableRequestContext requestContext, List<org.apache.kafka.common.acl.AclBinding> aclBindings, Optional<String> clusterId) List<? extends CompletionStage<org.apache.kafka.server.authorizer.AclDeleteResult>> deleteAcls(org.apache.kafka.server.authorizer.AuthorizableRequestContext requestContext, List<org.apache.kafka.common.acl.AclBindingFilter> aclBindingFilters) voidloadAclSnapshot(Map<org.apache.kafka.common.Uuid, org.apache.kafka.metadata.authorizer.ConfluentStandardAcl> acls) Methods inherited from class ConfluentServerAuthorizer
aclCount, aclMutatorOrException, acls, authorize, authorizeByResourceType, completeInitialLoad, completeInitialLoad, configureServerInfo, deleteAcls, reconfigurableConfigs, reconfigure, setAclMutator, start, validateReconfigurationMethods inherited from class io.confluent.security.authorizer.EmbeddedAuthorizer
accessRuleProvider, accessRuleProviders, auditLogProvider, authorize, clearAuthorizerProvidersMap, close, getRbacGroupProvider, groupProvider, metadataProvider, removeFromAuthorizerProvidersMap, startMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.confluent.security.authorizer.Authorizer
authorize, authorize, authorizeMethods inherited from interface org.apache.kafka.server.authorizer.Authorizer
registerAclUpdateListenerMethods inherited from interface org.apache.kafka.metadata.authorizer.ClusterMetadataAuthorizer
createAcls, createInactiveAcls, hardDeleteAcls, validateCreateAclState, validateDeleteAclState
-
Field Details
-
MAX_ACLS_PER_TENANT_PROP
- See Also:
-
-
Constructor Details
-
CpcAuthorizer
public CpcAuthorizer()
-
-
Method Details
-
configureAccessRuleProviders
-
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.Configurable- Overrides:
configurein classConfluentServerAuthorizer
-
config
-
loadAclSnapshot
public void loadAclSnapshot(Map<org.apache.kafka.common.Uuid, org.apache.kafka.metadata.authorizer.ConfluentStandardAcl> acls) - Specified by:
loadAclSnapshotin interfaceorg.apache.kafka.metadata.authorizer.ClusterMetadataAuthorizer- Overrides:
loadAclSnapshotin classConfluentServerAuthorizer
-
applyAclChanges
public void applyAclChanges(Map<org.apache.kafka.common.Uuid, Optional<org.apache.kafka.metadata.authorizer.ConfluentStandardAcl>> aclChanges) - Specified by:
applyAclChangesin interfaceorg.apache.kafka.metadata.authorizer.ClusterMetadataAuthorizer- Overrides:
applyAclChangesin classConfluentServerAuthorizer
-
buildAction
public io.confluent.security.authorizer.Action buildAction(org.apache.kafka.server.authorizer.Action kafkaAction, org.apache.kafka.common.resource.ResourcePattern resourcePattern, org.apache.kafka.common.security.auth.KafkaPrincipal sessionPrincipal, io.confluent.security.authorizer.Scope scope) - Overrides:
buildActionin classConfluentServerAuthorizer
-
createAcls
public List<? extends CompletionStage<org.apache.kafka.server.authorizer.AclCreateResult>> createAcls(org.apache.kafka.server.authorizer.AuthorizableRequestContext requestContext, List<org.apache.kafka.common.acl.AclBinding> aclBindings) - Specified by:
createAclsin interfaceorg.apache.kafka.server.authorizer.Authorizer- Specified by:
createAclsin interfaceorg.apache.kafka.metadata.authorizer.ClusterMetadataAuthorizer- Overrides:
createAclsin classConfluentServerAuthorizer
-
createAcls
public List<? extends CompletionStage<org.apache.kafka.server.authorizer.AclCreateResult>> createAcls(org.apache.kafka.server.authorizer.AuthorizableRequestContext requestContext, List<org.apache.kafka.common.acl.AclBinding> aclBindings, Optional<String> clusterId) - Specified by:
createAclsin interfaceorg.apache.kafka.server.authorizer.Authorizer- Overrides:
createAclsin classConfluentServerAuthorizer
-
deleteAcls
public List<? extends CompletionStage<org.apache.kafka.server.authorizer.AclDeleteResult>> deleteAcls(org.apache.kafka.server.authorizer.AuthorizableRequestContext requestContext, List<org.apache.kafka.common.acl.AclBindingFilter> aclBindingFilters) - Specified by:
deleteAclsin interfaceorg.apache.kafka.server.authorizer.Authorizer- Specified by:
deleteAclsin interfaceorg.apache.kafka.metadata.authorizer.ClusterMetadataAuthorizer- Overrides:
deleteAclsin classConfluentServerAuthorizer
-
acls
public Iterable<org.apache.kafka.common.acl.AclBinding> acls(org.apache.kafka.common.acl.AclBindingFilter filter) - Specified by:
aclsin interfaceorg.apache.kafka.server.authorizer.Authorizer- Overrides:
aclsin classConfluentServerAuthorizer
-