Module org.elasticsearch.xcore
Class ActionClusterPrivilege
java.lang.Object
org.elasticsearch.xpack.core.security.authz.privilege.ActionClusterPrivilege
- All Implemented Interfaces:
ClusterPrivilege,NamedClusterPrivilege
A
NamedClusterPrivilege that can be used to define an access to cluster level actions.-
Constructor Summary
ConstructorsConstructorDescriptionActionClusterPrivilege(String name, Set<String> allowedActionPatterns) Constructor forActionClusterPrivilegedefining what cluster actions are accessible for the user with this privilege.ActionClusterPrivilege(String name, Set<String> allowedActionPatterns, Set<String> excludedActionPatterns) Constructor forActionClusterPrivilegethat defines what cluster actions are accessible for the user with this privilege after excluding the action patternsexcludedActionPatternsfrom the allowed action patternsallowedActionPatterns -
Method Summary
Modifier and TypeMethodDescriptionbuildPermission(ClusterPermission.Builder builder) UsesClusterPermission.Builderto add predicate that later can be used to build aClusterPermission.name()Returns a permission that represents this privilege only.
-
Constructor Details
-
ActionClusterPrivilege
Constructor forActionClusterPrivilegedefining what cluster actions are accessible for the user with this privilege.- Parameters:
name- name for the cluster privilegeallowedActionPatterns- a set of cluster action patterns that are allowed for the user with this privilege.
-
ActionClusterPrivilege
public ActionClusterPrivilege(String name, Set<String> allowedActionPatterns, Set<String> excludedActionPatterns) Constructor forActionClusterPrivilegethat defines what cluster actions are accessible for the user with this privilege after excluding the action patternsexcludedActionPatternsfrom the allowed action patternsallowedActionPatterns- Parameters:
name- name for the cluster privilegeallowedActionPatterns- a set of cluster action patternsexcludedActionPatterns- a set of cluster action patterns
-
-
Method Details
-
name
- Specified by:
namein interfaceNamedClusterPrivilege
-
getAllowedActionPatterns
-
getExcludedActionPatterns
-
buildPermission
Description copied from interface:ClusterPrivilegeUsesClusterPermission.Builderto add predicate that later can be used to build aClusterPermission.- Specified by:
buildPermissionin interfaceClusterPrivilege- Parameters:
builder-ClusterPermission.Builder- Returns:
- an instance of
ClusterPermission.Builder
-
permission
Description copied from interface:NamedClusterPrivilegeReturns a permission that represents this privilege only. When building a role (or role-like object) that has many privileges, it is more efficient to build a shared permission using theClusterPrivilege.buildPermission(ClusterPermission.Builder)method instead. This method is intended to allow callers to interrogate the runtime permissions specifically granted by this privilege. It is acceptable (and encouraged) for implementations of this method to cache (or precompute) theClusterPermissionand return the same object on each call.- Specified by:
permissionin interfaceNamedClusterPrivilege- See Also:
-