public interface AuthCache
Modifier and Type | Interface and Description |
---|---|
static class |
AuthCache.Result
The result of a health check call.
|
Modifier and Type | Method and Description |
---|---|
Collection<org.apache.kafka.common.acl.AclBinding> |
aclBindings(io.confluent.security.authorizer.Scope scope,
org.apache.kafka.common.acl.AclBindingFilter aclBindingFilter,
Predicate<io.confluent.security.authorizer.ResourcePattern> resourceAccess)
Returns ACL bindings which match the provided filter.
|
Map<io.confluent.security.authorizer.ResourcePattern,Set<io.confluent.security.authorizer.AccessRule>> |
aclRules(io.confluent.security.authorizer.Scope scope)
Returns the ACL rules for all resources of given scope
|
void |
addMatchingRules(io.confluent.security.authorizer.provider.ResourceAuthorizeRules matchingRules,
org.apache.kafka.common.security.auth.KafkaPrincipal userPrincipal,
Set<org.apache.kafka.common.security.auth.KafkaPrincipal> groupPrincipals,
String host,
io.confluent.security.authorizer.Operation operation,
io.confluent.security.authorizer.Scope scope,
io.confluent.security.authorizer.ResourceType resourceType)
Adds RBAC or ACL rules for the specified principals that match the provided parameters
to `matchingRules`.
|
io.confluent.security.authorizer.provider.AuthorizeRule |
findRule(org.apache.kafka.common.security.auth.KafkaPrincipal userPrincipal,
Set<org.apache.kafka.common.security.auth.KafkaPrincipal> groupPrincipals,
String host,
io.confluent.security.authorizer.Action action)
Returns RBAC or ACL rule that matches the specified action.
|
Set<org.apache.kafka.common.security.auth.KafkaPrincipal> |
groups(org.apache.kafka.common.security.auth.KafkaPrincipal userPrincipal)
Returns the groups of the provided user principal.
|
AuthCache.Result |
healthcheck()
health check method which returns the health of the underlying auth store
|
Set<io.confluent.security.authorizer.Scope> |
knownScopes()
Returns all Scopes known by the backend, regardless of whether or not they actually exist.
|
Set<io.confluent.security.rbac.RoleBinding> |
rbacRoleBindings(org.apache.kafka.common.security.auth.KafkaPrincipal principal)
Returns role bindings for the given principal and the principals groups across all
known scopes.
|
Set<io.confluent.security.rbac.RoleBinding> |
rbacRoleBindings(org.apache.kafka.common.security.auth.KafkaPrincipal principal,
Set<io.confluent.security.authorizer.Scope> scopes)
Returns role bindings for the given principal and the principals groups limited to the
defined set of Scopes.
|
Set<io.confluent.security.rbac.RoleBinding> |
rbacRoleBindings(io.confluent.security.rbac.RoleBindingFilter filter)
Returns role bindings that match the specified filter.
|
Set<io.confluent.security.rbac.RoleBinding> |
rbacRoleBindings(io.confluent.security.authorizer.Scope scope)
Returns the role bindings at the specified scope.
|
Set<io.confluent.security.rbac.RoleBinding> |
rbacRoleBindings(Set<io.confluent.security.authorizer.Scope> scopes)
Returns all the role bindings from a set of scopes.
|
io.confluent.security.rbac.RbacRoles |
rbacRoles()
Returns the RBAC role definitions associated with this cache.
|
io.confluent.security.authorizer.Scope |
rootScope()
Returns the root scope of this cache.
|
io.confluent.security.rbac.UserMetadata |
userMetadata(org.apache.kafka.common.security.auth.KafkaPrincipal userPrincipal)
Returns metadata for the specified user principal if available or null if user is not known.
|
Map<org.apache.kafka.common.security.auth.KafkaPrincipal,io.confluent.security.rbac.UserMetadata> |
users()
Returns user metadata for all users.
|
Set<org.apache.kafka.common.security.auth.KafkaPrincipal> groups(org.apache.kafka.common.security.auth.KafkaPrincipal userPrincipal)
userPrincipal
- User principalSet<io.confluent.security.rbac.RoleBinding> rbacRoleBindings(io.confluent.security.authorizer.Scope scope)
scope
- Scope for which role bindings are requested.Set<io.confluent.security.rbac.RoleBinding> rbacRoleBindings(Set<io.confluent.security.authorizer.Scope> scopes)
scopes
- Scopes for which role bindings are requested.Set<io.confluent.security.rbac.RoleBinding> rbacRoleBindings(io.confluent.security.rbac.RoleBindingFilter filter)
filter
- The filter used for matching role bindingsSet<io.confluent.security.rbac.RoleBinding> rbacRoleBindings(org.apache.kafka.common.security.auth.KafkaPrincipal principal)
principal
- The the principal to lookup rolebindings forSet<io.confluent.security.rbac.RoleBinding> rbacRoleBindings(org.apache.kafka.common.security.auth.KafkaPrincipal principal, Set<io.confluent.security.authorizer.Scope> scopes)
principal
- The the principal to lookup rolebindings forio.confluent.security.rbac.UserMetadata userMetadata(org.apache.kafka.common.security.auth.KafkaPrincipal userPrincipal)
userPrincipal
- KafkaPrincipal of userMap<org.apache.kafka.common.security.auth.KafkaPrincipal,io.confluent.security.rbac.UserMetadata> users()
Set<io.confluent.security.authorizer.Scope> knownScopes()
Scopes
known by this AuthCacheio.confluent.security.authorizer.Scope rootScope()
io.confluent.security.rbac.RbacRoles rbacRoles()
Map<io.confluent.security.authorizer.ResourcePattern,Set<io.confluent.security.authorizer.AccessRule>> aclRules(io.confluent.security.authorizer.Scope scope)
scope
- Scope of the resourcesCollection<org.apache.kafka.common.acl.AclBinding> aclBindings(io.confluent.security.authorizer.Scope scope, org.apache.kafka.common.acl.AclBindingFilter aclBindingFilter, Predicate<io.confluent.security.authorizer.ResourcePattern> resourceAccess)
scope
- Scope of the acl search.aclBindingFilter
- AclBindingFilter to matchresourceAccess
- predicate to check resource access permissionio.confluent.security.authorizer.provider.AuthorizeRule findRule(org.apache.kafka.common.security.auth.KafkaPrincipal userPrincipal, Set<org.apache.kafka.common.security.auth.KafkaPrincipal> groupPrincipals, String host, io.confluent.security.authorizer.Action action)
userPrincipal
- User principalgroupPrincipals
- Set of group principals of the userhost
- Client IP addressaction
- Action to match including resource pattern and operationvoid addMatchingRules(io.confluent.security.authorizer.provider.ResourceAuthorizeRules matchingRules, org.apache.kafka.common.security.auth.KafkaPrincipal userPrincipal, Set<org.apache.kafka.common.security.auth.KafkaPrincipal> groupPrincipals, String host, io.confluent.security.authorizer.Operation operation, io.confluent.security.authorizer.Scope scope, io.confluent.security.authorizer.ResourceType resourceType)
AuthCache.Result healthcheck()