Module org.elasticsearch.security
Class AbstractRoleMapperClearRealmCache
java.lang.Object
org.elasticsearch.xpack.security.authc.support.mapper.AbstractRoleMapperClearRealmCache
- All Implemented Interfaces:
UserRoleMapper
- Direct Known Subclasses:
DnRoleMapper,NativeRoleMappingStore,ProjectStateRoleMapper
This is the base class for
UserRoleMapper implementations that need to notify registered CachingRealms,
when the role mapping rules change, to invalidate their caches that could rely on the obsolete role mapping rules.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper
UserRoleMapper.DistinguishedNameNormalizer, UserRoleMapper.DistinguishedNamePredicate, UserRoleMapper.UserData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIndicates that the provided realm should have its cache cleared if this store is updated.protected voidclearRealmCachesOnAllNodes(Client client, ActionListener<Void> listener) UserRoleMapperimplementations should be calling this method after role mappings changed, in order to clear realm caches across the cluster.voidUserRoleMapperimplementations should be calling this method after role mappings changed, in order to clear realm caches on the local node only.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper
resolveRoles
-
Constructor Details
-
AbstractRoleMapperClearRealmCache
public AbstractRoleMapperClearRealmCache()
-
-
Method Details
-
clearRealmCacheOnChange
Indicates that the provided realm should have its cache cleared if this store is updated.- Specified by:
clearRealmCacheOnChangein interfaceUserRoleMapper- See Also:
-
clearRealmCachesOnAllNodes
UserRoleMapperimplementations should be calling this method after role mappings changed, in order to clear realm caches across the cluster. -
clearRealmCachesOnLocalNode
public void clearRealmCachesOnLocalNode()UserRoleMapperimplementations should be calling this method after role mappings changed, in order to clear realm caches on the local node only.
-