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.roledefinitions.Operation operation,
io.confluent.security.authorizer.Scope scope,
io.confluent.security.roledefinitions.ResourceType resourceType)
Adds RBAC or ACL rules for the specified principals that match the provided parameters
to `matchingRules`.
|
default Collection<CertIdentityPool> |
findCertIdentityPools(Map<String,String> parsedCertMetadata,
String organizationId,
String providerId)
Return the cert identity pools that match the given certificate metadata and organization id.
|
default Collection<CertIdentityPool> |
findCertIdentityPools(X509Certificate cert,
String organizationId,
String providerId)
Return the cert identity pools that match the given certificate metadata and organization id.
|
default Collection<CaCertificatesKey> |
findCertIdentityProviders(Certificate[] certificates,
String organizationId)
Return the collections of identity providers that match the provided certificate chain.
|
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 sessionPrincipal)
Returns the groups of the provided session principal.
|
AuthCache.Result |
healthcheck()
health check method which returns the health of the underlying auth store
|
default boolean |
isRevoked(Certificate[] certificates,
String organizationId,
String providerId)
Given a chain of certificates from leaf up to root, return whether any cert in the chain is revoked.
|
default boolean |
isRevoked(X509Certificate certificate,
String organizationId,
String providerId)
Return whether the certificate is revoked.
|
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.roledefinitions.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 sessionPrincipal)
sessionPrincipal - User principal of the session which may contains groupsSet<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.roledefinitions.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.roledefinitions.Operation operation,
io.confluent.security.authorizer.Scope scope,
io.confluent.security.roledefinitions.ResourceType resourceType)
default Collection<CertIdentityPool> findCertIdentityPools(X509Certificate cert, String organizationId, String providerId)
cert - X509 certificate of the clientorganizationId - organization id, must not be null or emptyproviderId - provider id or null if not availabledefault Collection<CertIdentityPool> findCertIdentityPools(Map<String,String> parsedCertMetadata, String organizationId, String providerId)
parsedCertMetadata - parsed certificate metadata of the client, as Common Expression Language (CEL) variablesorganizationId - organization id, must not be null or emptyproviderId - provider id or null if not availabledefault Collection<CaCertificatesKey> findCertIdentityProviders(Certificate[] certificates, String organizationId)
certificates - Certificate chain, it must not be null or empty
(the first certificate is the end-entity certificate)organizationId - Organization ID, it must not be null or emptydefault boolean isRevoked(X509Certificate certificate, String organizationId, String providerId)
certificate - X509 certificate to check for revocationorganizationId - organization id, must not be null or emptyproviderId - provider id, must not be null or emptydefault boolean isRevoked(Certificate[] certificates, String organizationId, String providerId)
certificates - X509 certificate chain to check for revocationorganizationId - organization id, must not be null or emptyproviderId - provider id, must not be null or emptyAuthCache.Result healthcheck()