Module org.elasticsearch.xcore
Class IndicesPermission.IsResourceAuthorizedPredicate
java.lang.Object
org.elasticsearch.xpack.core.security.authz.permission.IndicesPermission.IsResourceAuthorizedPredicate
- All Implemented Interfaces:
BiPredicate<String,IndexAbstraction>
- Enclosing class:
IndicesPermission
public static class IndicesPermission.IsResourceAuthorizedPredicate
extends Object
implements BiPredicate<String,IndexAbstraction>
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 resourceNameMatcher, StringMatcher additionalNonDatastreamNameMatcher) -
Method Summary
Modifier and TypeMethodDescriptionand(BiPredicate<? super String, ? super IndexAbstraction> 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.booleantest(String name, IndexAbstraction indexAbstraction) Verifies if access is authorized to the resource with the given .final booleantest(IndexAbstraction indexAbstraction) Verifies if access is authorized to the given resource.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiPredicate
negate, or
-
Constructor Details
-
IsResourceAuthorizedPredicate
public IsResourceAuthorizedPredicate(StringMatcher resourceNameMatcher, StringMatcher additionalNonDatastreamNameMatcher)
-
-
Method Details
-
and
public final IndicesPermission.IsResourceAuthorizedPredicate and(BiPredicate<? super String, ? super IndexAbstraction> 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.- Specified by:
andin interfaceBiPredicate<String,IndexAbstraction>
-
test
Verifies if access is authorized to the given resource. The resource must exist. Otherwise, use thetest(String, IndexAbstraction)method. Returnstrueif access to the given resource is authorized orfalseotherwise. -
test
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.- Specified by:
testin interfaceBiPredicate<String,IndexAbstraction>
-