Package com.floragunn.searchguard.auth
Interface AuthorizationBackend
-
- All Known Implementing Classes:
InternalAuthenticationBackend,NoOpAuthorizationBackend
public interface AuthorizationBackendSearch Guard custom authorization backends need to implement this interface. Authorization backends populate a prior authenticatedUserwith backend roles who's the user is a member of. Implementation classes must provide a public constructorpublic MyHTTPAuthenticator(org.elasticsearch.common.settings.Settings settings, java.nio.file.Path configPath)The constructor should not throw any exception in case of an initialization problem. Instead catch all exceptions and log a appropriate error message. A logger can be instantiated like:private final Logger log = LogManager.getLogger(this.getClass());Custom authorizers is a commercial feature. To make them work you need to obtain a license here: https://floragunn.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfillRoles(User user, AuthCredentials credentials)Populate aUserwith backend roles.StringgetType()The type (name) of the authorizer.
-
-
-
Method Detail
-
getType
String getType()
The type (name) of the authorizer. Only for logging.- Returns:
- the type
-
fillRoles
void fillRoles(User user, AuthCredentials credentials) throws org.elasticsearch.ElasticsearchSecurityException
Populate aUserwith backend roles. This method will not be called for cached users. Add them by calling eitheruser.addRole()oruser.addRoles()- Parameters:
user- The authenticated user to populate with backend roles, never nullcredentials- Credentials to authenticate to the authorization backend, maybe null. This parameter is for future usage, currently always empty credentials are passed!- Throws:
org.elasticsearch.ElasticsearchSecurityException- in case when the authorization backend cannot be reached or thecredentialsare insufficient to authenticate to the authorization backend.
-
-