org.mobicents.slee.resource.parlay.fw.access
Class AuthenticationHandlerImpl

java.lang.Object
  extended by org.mobicents.slee.resource.parlay.fw.access.AuthenticationHandlerImpl
All Implemented Interfaces:
AuthenticationHandler

public class AuthenticationHandlerImpl
extends java.lang.Object
implements AuthenticationHandler

For internal use only. This class is used to perform client side authenticaion with the Parlay framework.


Constructor Summary
AuthenticationHandlerImpl(TSMBean tsmBean)
           
 
Method Summary
 void abortAuthentication()
          Invokes abortAuthentication() against the gateway.
 void authenticate(java.lang.String encryptionMethod)
          Calls Authentication.authenticate() using the Authentication interface held by the TSMBean.
 void authenticationSucceeded()
          Calls Authentication.authenticationSucceeded() using the Authentication interface held by the TSMBean.
 void challenge(java.lang.String authMechanism)
          Calls Authentication.authenticate() using the Authentication interface held by the TSMBean.
 void cleanup()
          Destroys resources to enable garbage collection.
protected  byte[] encryptChallenge(byte[] challenge, java.lang.String encryptionMethod)
          Encrypts the specified challenge according to the specified method.
protected  byte[] generateRandomChallenge()
          Generates a 50 byte random array
protected  java.security.interfaces.RSAPublicKey getAppRSAPublicKey(java.lang.String encryptionMethod)
          Returns a RSA public key for the appropriate encryption method from the application vault.
protected  java.lang.String getAppRSAPublicKeyFilename(java.lang.String clientID, int keySize)
          Generates the appropriate filename for the application RSA public key file.
 void initiateAuthentication(org.csapi.fw.TpAuthDomain clientAuthDomain)
          Calls Initial.initiateAuthentication() using the Initial interface held by the TSMBean.
 void initiateAuthenticationWithVersion(org.csapi.fw.TpAuthDomain clientAuthDomain, java.lang.String version)
          Calls Initial.initiateAuthenticationWithVersion() using the Initial interface held by the TSMBean.
 org.csapi.fw.fw_access.trust_and_security.IpAccess requestAccess(org.csapi.IpInterface clientAccess)
          Invokes requestAccess() agianst the gateway.
 java.lang.String selectAuthenticationMechanism(java.lang.String authMechanismList)
          Calls Authentication.selectAuthenticationMechanism() using the Authentication interface held by the TSMBean.
 java.lang.String selectEncryptionMethod(java.lang.String authCapabilityList)
          Calls Authentication.selectEncryptionMethod() using the Authentication interface held by the TSMBean.
static void setApiLevelAuthentication(org.csapi.fw.fw_access.trust_and_security.IpAPILevelAuthentication apiLevelAuthentication)
           
 java.lang.String toString()
          Defines a method used to provide the caller with a string representation of the class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthenticationHandlerImpl

public AuthenticationHandlerImpl(TSMBean tsmBean)
Method Detail

toString

public java.lang.String toString()
Defines a method used to provide the caller with a string representation of the class.

Overrides:
toString in class java.lang.Object
Returns:
This is an developer defined representation of the class object as a string

initiateAuthentication

public void initiateAuthentication(org.csapi.fw.TpAuthDomain clientAuthDomain)
                            throws TSMBeanException
Calls Initial.initiateAuthentication() using the Initial interface held by the TSMBean.

Specified by:
initiateAuthentication in interface AuthenticationHandler
Throws:
TSMBeanException

initiateAuthenticationWithVersion

public void initiateAuthenticationWithVersion(org.csapi.fw.TpAuthDomain clientAuthDomain,
                                              java.lang.String version)
                                       throws TSMBeanException
Calls Initial.initiateAuthenticationWithVersion() using the Initial interface held by the TSMBean.

Specified by:
initiateAuthenticationWithVersion in interface AuthenticationHandler
Throws:
TSMBeanException

selectEncryptionMethod

public java.lang.String selectEncryptionMethod(java.lang.String authCapabilityList)
                                        throws TSMBeanException
Calls Authentication.selectEncryptionMethod() using the Authentication interface held by the TSMBean.

Specified by:
selectEncryptionMethod in interface AuthenticationHandler
Parameters:
authCapabilityList, - the clients auth capability list.
Returns:
the framework's chosen authentication method.
Throws:
TSMBeanException

selectAuthenticationMechanism

public java.lang.String selectAuthenticationMechanism(java.lang.String authMechanismList)
                                               throws TSMBeanException
Calls Authentication.selectAuthenticationMechanism() using the Authentication interface held by the TSMBean.

Specified by:
selectAuthenticationMechanism in interface AuthenticationHandler
Parameters:
authMechanismList, - the clients auth mechanism list.
Returns:
the framework's chosen authentication method.
Throws:
TSMBeanException

authenticate

public void authenticate(java.lang.String encryptionMethod)
                  throws TSMBeanException
Description copied from interface: AuthenticationHandler
Calls Authentication.authenticate() using the Authentication interface held by the TSMBean.

Specified by:
authenticate in interface AuthenticationHandler
Throws:
TSMBeanException

challenge

public void challenge(java.lang.String authMechanism)
               throws TSMBeanException
Description copied from interface: AuthenticationHandler
Calls Authentication.authenticate() using the Authentication interface held by the TSMBean.

Specified by:
challenge in interface AuthenticationHandler
Throws:
TSMBeanException

authenticationSucceeded

public void authenticationSucceeded()
                             throws TSMBeanException
Calls Authentication.authenticationSucceeded() using the Authentication interface held by the TSMBean.

Specified by:
authenticationSucceeded in interface AuthenticationHandler
Throws:
TSMBeanException

requestAccess

public org.csapi.fw.fw_access.trust_and_security.IpAccess requestAccess(org.csapi.IpInterface clientAccess)
                                                                 throws TSMBeanException
Invokes requestAccess() agianst the gateway.

Specified by:
requestAccess in interface AuthenticationHandler
Returns:
Throws:
TSMBeanException

cleanup

public void cleanup()
Description copied from interface: AuthenticationHandler
Destroys resources to enable garbage collection.

Specified by:
cleanup in interface AuthenticationHandler

generateRandomChallenge

protected byte[] generateRandomChallenge()
Generates a 50 byte random array

Returns:
the random array

encryptChallenge

protected byte[] encryptChallenge(byte[] challenge,
                                  java.lang.String encryptionMethod)
                           throws TSMBeanException
Encrypts the specified challenge according to the specified method.

Parameters:
challenge -
encryptionMethod -
Returns:
encrypted challenge
Throws:
TSMBeanException

getAppRSAPublicKey

protected java.security.interfaces.RSAPublicKey getAppRSAPublicKey(java.lang.String encryptionMethod)
                                                            throws RSAUtilException,
                                                                   TSMBeanException
Returns a RSA public key for the appropriate encryption method from the application vault.

Parameters:
encryptionMethod -
Returns:
PublickKey
Throws:
RSAUtilException
TSMBeanException

getAppRSAPublicKeyFilename

protected java.lang.String getAppRSAPublicKeyFilename(java.lang.String clientID,
                                                      int keySize)
Generates the appropriate filename for the application RSA public key file. Depending on the algorithm specified in Fw.propeties it will be either an X.509 Certificate stored in a pem file or a hex encoding of the PublicKeyInfo format stored directly in a file.

Parameters:
clientID -
keySize -
Returns:
fileName

abortAuthentication

public void abortAuthentication()
Invokes abortAuthentication() against the gateway.

Specified by:
abortAuthentication in interface AuthenticationHandler

setApiLevelAuthentication

public static void setApiLevelAuthentication(org.csapi.fw.fw_access.trust_and_security.IpAPILevelAuthentication apiLevelAuthentication)
Parameters:
apiLevelAuthentication - The apiLevelAuthentication to set.


Copyright © 2008. All Rights Reserved.