Class NoOpAuthenticationBackend
- java.lang.Object
-
- com.floragunn.searchguard.auth.internal.NoOpAuthenticationBackend
-
- All Implemented Interfaces:
AuthenticationBackend,SyncAuthenticationBackend
public class NoOpAuthenticationBackend extends Object implements SyncAuthenticationBackend
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.floragunn.searchguard.auth.api.AuthenticationBackend
AuthenticationBackend.UserCachingPolicy
-
-
Constructor Summary
Constructors Constructor Description NoOpAuthenticationBackend(org.elasticsearch.common.settings.Settings settings, Path configPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Userauthenticate(AuthCredentials credentials)Validate credentials and return an authenticated user (or throw an ElasticsearchSecurityException)booleanexists(User user)Lookup for a specific user in the authentication backendStringgetType()The type (name) of the authenticator.AuthenticationBackend.UserCachingPolicyuserCachingPolicy()Are users produced by this authentication backend allowed to be cached in a node-local heap-based cache? In most cases, ALWAYS can be returned here.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.floragunn.searchguard.auth.api.SyncAuthenticationBackend
authenticate
-
-
-
-
Constructor Detail
-
NoOpAuthenticationBackend
public NoOpAuthenticationBackend(org.elasticsearch.common.settings.Settings settings, Path configPath)
-
-
Method Detail
-
getType
public String getType()
Description copied from interface:AuthenticationBackendThe type (name) of the authenticator. Only for logging.- Specified by:
getTypein interfaceAuthenticationBackend- Returns:
- the type
-
authenticate
public User authenticate(AuthCredentials credentials)
Description copied from interface:SyncAuthenticationBackendValidate credentials and return an authenticated user (or throw an ElasticsearchSecurityException) Results of this method are normally cached so that we not need to query the backend for every authentication attempt.- Specified by:
authenticatein interfaceSyncAuthenticationBackend- Returns:
- the authenticated User, never null
-
exists
public boolean exists(User user)
Description copied from interface:AuthenticationBackendLookup for a specific user in the authentication backend- Specified by:
existsin interfaceAuthenticationBackend- Parameters:
user- The user for which the authentication backend should be queried. If the authentication backend supports user attributes in combination with impersonation the attributes needs to be added to user by callinguser.addAttributes()- Returns:
- true if the user exists in the authentication backend, false otherwise. Before return call
user.addAttributes()as explained above.
-
userCachingPolicy
public AuthenticationBackend.UserCachingPolicy userCachingPolicy()
Description copied from interface:AuthenticationBackendAre users produced by this authentication backend allowed to be cached in a node-local heap-based cache? In most cases, ALWAYS can be returned here. Return false if the user objects are not suitable for caching AND retrieval of users is fast.- Specified by:
userCachingPolicyin interfaceAuthenticationBackend
-
-