public class PKCSAuthenticator extends java.lang.Object implements Authenticator
Authenticator
that uses PKCS.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PUBLIC_KEY_FILE |
static java.lang.String |
PUBLIC_KEYSTORE_PASSWORD |
Constructor and Description |
---|
PKCSAuthenticator() |
Modifier and Type | Method and Description |
---|---|
java.security.Principal |
authenticate(java.util.Properties credentials,
DistributedMember member)
Verify the credentials provided in the properties for the client/peer as specified in member ID
and returns the principal associated with the client/peer.
|
void |
close()
Called when the region containing this callback is closed or destroyed, when the cache is
closed, or when a callback is removed from a region using an
AttributesMutator . |
static Authenticator |
create() |
void |
init(java.util.Properties securityProperties,
LogWriter systemLogWriter,
LogWriter securityLogWriter)
Initialize the callback for a client/peer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
authenticate, init
initialize
public static final java.lang.String PUBLIC_KEY_FILE
public static final java.lang.String PUBLIC_KEYSTORE_PASSWORD
public static Authenticator create()
public void init(java.util.Properties securityProperties, LogWriter systemLogWriter, LogWriter securityLogWriter) throws AuthenticationFailedException
Authenticator
init
in interface Authenticator
securityProperties
- the security properties obtained using a call to
DistributedSystem.getSecurityProperties()
systemLogWriter
- LogWriter
for system logssecurityLogWriter
- LogWriter
for security logsAuthenticationFailedException
- if some exception occurs during the initializationpublic java.security.Principal authenticate(java.util.Properties credentials, DistributedMember member) throws AuthenticationFailedException
Authenticator
authenticate
in interface Authenticator
credentials
- the credentials of the client/peer as a set of property key/valuesmember
- the DistributedMember
object of the connecting client/peer member. NULL
when invoked locally on the member initiating the authentication request.AuthenticationFailedException
- If the authentication of the client/peer fails.public void close()
CacheCallback
AttributesMutator
.
Implementations should cleanup any external resources such as database connections. Any runtime exceptions this method throws will be logged.
It is possible for this method to be called multiple times on a single callback instance, so implementations must be tolerant of this.
close
in interface CacheCallback
RegionService.close()
,
Region.close()
,
Region.localDestroyRegion()
,
Region.destroyRegion()
,
AttributesMutator