public class SimpleSecurityManager extends Object implements SecurityManager
Modifier and Type | Field and Description |
---|---|
static String |
VALID_TOKEN
the valid token string that will be authenticated.
|
PASSWORD, TOKEN, USER_NAME
Constructor and Description |
---|
SimpleSecurityManager() |
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.
|
boolean |
authorize(Object principal,
ResourcePermission permission)
Authorize the ResourcePermission for a given Principal
|
void |
close()
Close any resources used by the SecurityManager, called when a cache is closed.
|
void |
init(Properties securityProps)
Initialize the SecurityManager.
|
public static final String VALID_TOKEN
public void init(Properties securityProps)
SecurityManager
init
in interface SecurityManager
securityProps
- the security properties obtained using a call to
DistributedSystem.getSecurityProperties()
public Object authenticate(Properties credentials) throws AuthenticationFailedException
SecurityManager
authenticate
in interface SecurityManager
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.public boolean authorize(Object principal, ResourcePermission permission)
SecurityManager
authorize
in interface SecurityManager
principal
- The principal that's requesting the permissionpermission
- The permission requestedpublic void close()
SecurityManager
close
in interface SecurityManager