public interface SecurityManager
Modifier and Type | Field and Description |
---|---|
static String |
PASSWORD
property name of the password passed in the Properties in authenticate method
|
static String |
TOKEN
property name of the token passed in the Properties in authenticate method
|
static String |
USER_NAME
property name of the username passed in the Properties in authenticate method
|
Modifier and Type | Method and Description |
---|---|
Object |
authenticate(Properties credentials)
Verify the credentials provided in the properties
Your security manager needs to validate credentials coming from all communication channels.
|
default boolean |
authorize(Object principal,
ResourcePermission permission)
Authorize the ResourcePermission for a given Principal
|
default void |
close()
Close any resources used by the SecurityManager, called when a cache is closed.
|
default void |
init(Properties securityProps)
Initialize the SecurityManager.
|
static final String USER_NAME
static final String PASSWORD
static final String TOKEN
default void init(Properties securityProps)
securityProps
- the security properties obtained using a call to
DistributedSystem.getSecurityProperties()
AuthenticationFailedException
- if some exception occurs during the initializationObject authenticate(Properties credentials) throws AuthenticationFailedException, AuthenticationExpiredException
credentials
- it contains the security-username, security-password or security-token,
as keys of the properties, also the properties generated by your AuthInitialize
interfaceAuthenticationFailedException
- if the credentials are invalid, this exception will be
seen by the client.AuthenticationExpiredException
- if credentials have expired, this will give the
client a second chance to gather new credentials and try login again once more.default boolean authorize(Object principal, ResourcePermission permission) throws AuthenticationExpiredException
principal
- The principal that's requesting the permissionpermission
- The permission requestedAuthenticationExpiredException
- if the principal has expired.default void close()