Module org.elasticsearch.xcore
Class IndicesAccessControl
java.lang.Object
org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl
Encapsulates the field and document permissions per concrete index based on the current request.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classEncapsulates the field and document permissions for an index. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IndicesAccessControlstatic final IndicesAccessControl -
Constructor Summary
ConstructorsModifierConstructorDescriptionIndicesAccessControl(boolean granted, Supplier<Map<String, IndicesAccessControl.IndexAccessControl>> indexPermissionsSupplier) IndicesAccessControl(boolean granted, Map<String, IndicesAccessControl.IndexAccessControl> indexPermissions) protected -
Method Summary
Modifier and TypeMethodDescriptionstatic IndicesAccessControlallowAll()getIndexPermissions(String index) booleanhasIndexPermissions(String index) booleanlimitIndicesAccessControl(IndicesAccessControl limitedByIndicesAccessControl) Returns a instance ofIndicesAccessControl, where the privileges forthisobject are constrained by the privileges contained in the provided parameter.toString()
-
Field Details
-
ALLOW_NO_INDICES
-
DENIED
-
-
Constructor Details
-
IndicesAccessControl
public IndicesAccessControl(boolean granted, Map<String, IndicesAccessControl.IndexAccessControl> indexPermissions) -
IndicesAccessControl
public IndicesAccessControl(boolean granted, Supplier<Map<String, IndicesAccessControl.IndexAccessControl>> indexPermissionsSupplier) -
IndicesAccessControl
-
-
Method Details
-
getIndexPermissions
- Returns:
- The document and field permissions for an index if they exist, otherwise
nullis returned. Ifnullis being returned this means that there are no field or document level restrictions.
-
hasIndexPermissions
-
isGranted
public boolean isGranted()- Returns:
- Whether any role / permission group is allowed to access all indices.
-
getFieldAndDocumentLevelSecurityUsage
-
getIndicesWithFieldOrDocumentLevelSecurity
-
getIndicesWithFieldLevelSecurity
-
getIndicesWithDocumentLevelSecurity
-
limitIndicesAccessControl
public IndicesAccessControl limitIndicesAccessControl(IndicesAccessControl limitedByIndicesAccessControl) Returns a instance ofIndicesAccessControl, where the privileges forthisobject are constrained by the privileges contained in the provided parameter.- Parameters:
limitedByIndicesAccessControl-IndicesAccessControl- Returns:
IndicesAccessControl
-
toString
-
allowAll
-