GemFire 6.6.2

com.gemstone.gemfire.security
Interface Authenticator

All Superinterfaces:
CacheCallback

public interface Authenticator
extends CacheCallback

Specifies the mechanism to verify credentials for a client or peer. Implementations should register name of the static creation function as the security-peer-authenticator system property with all the locators in the distributed system for peer authentication, and as security-client-authenticator for client authentication. For P2P an object is initialized on the group coordinator for each member during the DistributedSystem.connect(Properties) call of a new member. For client-server, an object of this class is created for each connection during the client-server handshake. The static creation function should have the following signature: public static Authenticator [method-name](); i.e. it should be a zero argument function.

Since:
5.5

Method Summary
 Principal authenticate(Properties props, 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 init(Properties securityProps, LogWriter systemLogger, LogWriter securityLogger)
          Initialize the callback for a client/peer.
 
Methods inherited from interface com.gemstone.gemfire.cache.CacheCallback
close
 

Method Detail

init

void init(Properties securityProps,
          LogWriter systemLogger,
          LogWriter securityLogger)
          throws AuthenticationFailedException
Initialize the callback for a client/peer. This is invoked when a new connection from a client/peer is created with the host.

Parameters:
securityProps - the security properties obtained using a call to DistributedSystem.getSecurityProperties()
systemLogger - LogWriter for system logs
securityLogger - LogWriter for security logs
Throws:
AuthenticationFailedException - if some exception occurs during the initialization

authenticate

Principal authenticate(Properties props,
                       DistributedMember member)
                       throws AuthenticationFailedException
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.

Parameters:
props - the credentials of the client/peer as a set of property key/values
member - the DistributedMember object of the connecting client/peer member. NULL when invoked locally on the member initiating the authentication request.
Returns:
the principal for the client/peer when authentication succeeded
Throws:
AuthenticationFailedException - If the authentication of the client/peer fails.

GemFire 6.6.2

Copyright © 1997-2012 VMware, Inc. All rights reserved.