Class NativeRolesStore
java.lang.Object
org.elasticsearch.xpack.security.authz.store.NativeRolesStore
- All Implemented Interfaces:
BiConsumer<Set<String>,org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authz.store.RoleRetrievalResult>>
public class NativeRolesStore
extends Object
implements BiConsumer<Set<String>,org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authz.store.RoleRetrievalResult>>
NativeRolesStore is a
RolesStore that, instead of reading from a
file, reads from an Elasticsearch index instead. Unlike the file-based roles
store, ESNativeRolesStore can be used to add a role to the store by inserting
the document into the administrative index.
No caching is done by this class, it is handled at a higher level-
Constructor Summary
ConstructorsConstructorDescriptionNativeRolesStore(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.client.internal.Client client, org.elasticsearch.license.XPackLicenseState licenseState, SecurityIndexManager securityIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(Set<String> names, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authz.store.RoleRetrievalResult> listener) voiddeleteRole(org.elasticsearch.xpack.core.security.action.role.DeleteRoleRequest deleteRoleRequest, org.elasticsearch.action.ActionListener<Boolean> listener) voidgetRoleDescriptors(Set<String> names, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authz.store.RoleRetrievalResult> listener) Retrieve a list of roles, if rolesToGet is null or empty, fetch all rolesvoidputRole(org.elasticsearch.xpack.core.security.action.role.PutRoleRequest request, org.elasticsearch.xpack.core.security.authz.RoleDescriptor role, org.elasticsearch.action.ActionListener<Boolean> listener) toString()voidusageStats(org.elasticsearch.action.ActionListener<Map<String, Object>> listener) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.function.BiConsumer
andThen
-
Constructor Details
-
NativeRolesStore
public NativeRolesStore(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.client.internal.Client client, org.elasticsearch.license.XPackLicenseState licenseState, SecurityIndexManager securityIndex)
-
-
Method Details
-
accept
public void accept(Set<String> names, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authz.store.RoleRetrievalResult> listener) - Specified by:
acceptin interfaceBiConsumer<Set<String>,org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authz.store.RoleRetrievalResult>>
-
getRoleDescriptors
public void getRoleDescriptors(Set<String> names, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authz.store.RoleRetrievalResult> listener) Retrieve a list of roles, if rolesToGet is null or empty, fetch all roles -
deleteRole
public void deleteRole(org.elasticsearch.xpack.core.security.action.role.DeleteRoleRequest deleteRoleRequest, org.elasticsearch.action.ActionListener<Boolean> listener) -
putRole
public void putRole(org.elasticsearch.xpack.core.security.action.role.PutRoleRequest request, org.elasticsearch.xpack.core.security.authz.RoleDescriptor role, org.elasticsearch.action.ActionListener<Boolean> listener) -
usageStats
-
toString
-