Class S2SConnectionLevelAuthZProvider
java.lang.Object
io.confluent.security.auth.s2s.S2SConnectionLevelAuthZProvider
- All Implemented Interfaces:
io.confluent.security.authorizer.provider.AccessRuleProvider, io.confluent.security.authorizer.provider.Provider, Closeable, AutoCloseable, org.apache.kafka.common.Configurable, org.apache.kafka.common.Reconfigurable
public class S2SConnectionLevelAuthZProvider
extends Object
implements io.confluent.security.authorizer.provider.AccessRuleProvider, org.apache.kafka.common.Reconfigurable
L2 connection-level S2S AuthZ GATE: evaluates the calling service's SPIRE-mTLS cert SPIFFE-ID
against the
L2 Cedar policy category and emits a S2SDenyRule on a veto. Never
grants -- see S2SConnectionLevelDecisionSource for the deny-overlay semantics.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMatchingRules(io.confluent.security.authorizer.provider.ResourceAuthorizeRules matchingRules, org.apache.kafka.common.security.auth.KafkaPrincipal sessionPrincipal, Set<org.apache.kafka.common.security.auth.KafkaPrincipal> groupPrincipals, String host, io.confluent.security.roledefinitions.Operation operation, io.confluent.security.authorizer.Scope resourceScope, io.confluent.security.roledefinitions.ResourceType resourceType) voidclose()voidRuns once at provider construction.io.confluent.security.authorizer.provider.AuthorizeRulefindRule(org.apache.kafka.common.security.auth.KafkaPrincipal sessionPrincipal, Set<org.apache.kafka.common.security.auth.KafkaPrincipal> groupPrincipals, String host, io.confluent.security.authorizer.Action action) booleanisSuperUser(org.apache.kafka.common.security.auth.KafkaPrincipal principal, io.confluent.security.authorizer.Scope scope) booleanmayDeny()voidreconfigure(Map<String, ?> configs) start(org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo) Invoked once by the authorizer framework afterconfigure(Map)and after all providers have been instantiated.booleanvoidvalidateReconfiguration(Map<String, ?> configs) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.confluent.security.authorizer.provider.AccessRuleProvider
asAuthorizer
-
Field Details
-
PROVIDER_NAME
- See Also:
-
-
Constructor Details
-
S2SConnectionLevelAuthZProvider
public S2SConnectionLevelAuthZProvider()
-
-
Method Details
-
configure
Runs once at provider construction. Builds the store + source and loads the initial policy snapshot. A malformed initial bundle throwsConfigExceptionout ofpolicyStore.configure()here (fail-closed) and propagates to fail broker startup, rather than silently coming up with no L2 enforcement. SRJ handoff is deferred tostart(ConfluentAuthorizerServerInfo).- Specified by:
configurein interfaceorg.apache.kafka.common.Configurable
-
start
public CompletionStage<Void> start(org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo) Invoked once by the authorizer framework afterconfigure(Map)and after all providers have been instantiated. Hands the policy snapshot to SRJ for parse + validate.- Specified by:
startin interfaceio.confluent.security.authorizer.provider.Provider
-
isSuperUser
public boolean isSuperUser(org.apache.kafka.common.security.auth.KafkaPrincipal principal, io.confluent.security.authorizer.Scope scope) - Specified by:
isSuperUserin interfaceio.confluent.security.authorizer.provider.AccessRuleProvider
-
findRule
public io.confluent.security.authorizer.provider.AuthorizeRule findRule(org.apache.kafka.common.security.auth.KafkaPrincipal sessionPrincipal, Set<org.apache.kafka.common.security.auth.KafkaPrincipal> groupPrincipals, String host, io.confluent.security.authorizer.Action action) - Specified by:
findRulein interfaceio.confluent.security.authorizer.provider.AccessRuleProvider
-
addMatchingRules
public void addMatchingRules(io.confluent.security.authorizer.provider.ResourceAuthorizeRules matchingRules, org.apache.kafka.common.security.auth.KafkaPrincipal sessionPrincipal, Set<org.apache.kafka.common.security.auth.KafkaPrincipal> groupPrincipals, String host, io.confluent.security.roledefinitions.Operation operation, io.confluent.security.authorizer.Scope resourceScope, io.confluent.security.roledefinitions.ResourceType resourceType) - Specified by:
addMatchingRulesin interfaceio.confluent.security.authorizer.provider.AccessRuleProvider
-
reconfigurableConfigs
-
validateReconfiguration
-
reconfigure
-
mayDeny
public boolean mayDeny()- Specified by:
mayDenyin interfaceio.confluent.security.authorizer.provider.AccessRuleProvider
-
providerName
- Specified by:
providerNamein interfaceio.confluent.security.authorizer.provider.Provider
-
usesMetadataFromThisKafkaCluster
public boolean usesMetadataFromThisKafkaCluster()- Specified by:
usesMetadataFromThisKafkaClusterin interfaceio.confluent.security.authorizer.provider.Provider
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-