Module org.elasticsearch.xcore
Class IndicesPermission.IsResourceAuthorizedPredicate
java.lang.Object
org.elasticsearch.xpack.core.security.authz.permission.IndicesPermission.IsResourceAuthorizedPredicate
- Enclosing class:
IndicesPermission
This encapsulates the authorization test for resources.
There is an additional test for resources that are missing or that are not a datastream or a backing index.
-
Constructor Summary
ConstructorsConstructorDescriptionIsResourceAuthorizedPredicate(StringMatcher dataResourceNameMatcher, StringMatcher failuresResourceNameMatcher, StringMatcher additionalNonDatastreamNameMatcher) -
Method Summary
Modifier and TypeMethodDescriptionGiven anotherIndicesPermission.IsResourceAuthorizedPredicateinstance in , return a newIndicesPermission.IsResourceAuthorizedPredicateinstance that is equivalent to the conjunction of authorization tests of that other instance and this one.booleantest(String name, IndexAbstraction indexAbstraction, IndexComponentSelector selector) Verifies if access is authorized to the resource with the given .booleantest(IndexAbstraction indexAbstraction) booleantest(IndexAbstraction indexAbstraction, IndexComponentSelector selector) Verifies if access is authorized to the given resource.
-
Constructor Details
-
IsResourceAuthorizedPredicate
public IsResourceAuthorizedPredicate(StringMatcher dataResourceNameMatcher, StringMatcher failuresResourceNameMatcher, StringMatcher additionalNonDatastreamNameMatcher)
-
-
Method Details
-
and
public final IndicesPermission.IsResourceAuthorizedPredicate and(IndicesPermission.IsResourceAuthorizedPredicate other) Given anotherIndicesPermission.IsResourceAuthorizedPredicateinstance in , return a newIndicesPermission.IsResourceAuthorizedPredicateinstance that is equivalent to the conjunction of authorization tests of that other instance and this one. -
test
-
test
Verifies if access is authorized to the given resource. The resource must exist. Otherwise, use thetest(String, IndexAbstraction, IndexComponentSelector)method. Returnstrueif access to the given resource is authorized orfalseotherwise. -
test
public boolean test(String name, @Nullable IndexAbstraction indexAbstraction, IndexComponentSelector selector) Verifies if access is authorized to the resource with the given . The , which is the resource to be accessed, must be supplied if the resource exists or benullif it doesn't. Returnstrueif access to the given resource is authorized orfalseotherwise.
-