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

    Constructors
    Constructor
    Description
    NativeRolesStore(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.client.internal.Client client, org.elasticsearch.license.XPackLicenseState licenseState, SecurityIndexManager securityIndex)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(Set<String> names, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authz.store.RoleRetrievalResult> listener)
     
    void
    deleteRole(org.elasticsearch.xpack.core.security.action.role.DeleteRoleRequest deleteRoleRequest, org.elasticsearch.action.ActionListener<Boolean> listener)
     
    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
    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)
     
     
    void
    usageStats(org.elasticsearch.action.ActionListener<Map<String,Object>> listener)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods 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:
      accept in interface BiConsumer<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

      public void usageStats(org.elasticsearch.action.ActionListener<Map<String,Object>> listener)
    • toString

      public String toString()
      Overrides:
      toString in class Object