org.jboss.security.srp
Class SRPService

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.security.srp.SRPService
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src) , SRPServerListener (src) , SRPServiceMBean (src)

public class SRPService
extends ServiceMBeanSupport (src)
implements SRPServiceMBean (src) , SRPServerListener (src)

The JMX mbean interface for the SRP service. This mbean sets up an RMI implementation of the 'Secure Remote Password' cryptographic authentication system described in RFC2945.


Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
SRPService()
           
 
Method Summary
 void closedUserSession(SRPSessionKey (src)  key)
          Called when a user requests that a session be closed
 java.lang.String getAuthenticationCacheJndiName()
          Get the jndi name under which the SRPServerInterface proxy should be bound
 int getAuthenticationCacheResolution()
          Get the auth cache resolution period in seconds
 int getAuthenticationCacheTimeout()
          Get the auth cache timeout period in seconds
 java.lang.String getClientSocketFactory()
          Get the RMIClientSocketFactory implementation class.
 java.lang.String getJndiName()
          Get the jndi name under which the SRPServerInterface proxy should be bound
 java.lang.String getName()
          Use the short class name as the default for the service name.
 boolean getOverwriteSessions()
          A flag indicating if a successful user auth for an existing session should overwrite the current session.
 boolean getRequireAuxChallenge()
          Get if the client must supply an auxillary challenge as part of the verify phase.
 int getServerPort()
          Get the RMI port for the SRPServerInterface
 java.lang.String getServerSocketFactory()
          Get the RMIServerSocketFactory implementation class.
 java.lang.String getVerifierSourceJndiName()
          Get the jndi name for the SRPVerifierSource implementation binding.
 java.lang.Object invoke(Invocation (src)  invocation)
          Expose the Invoker signature via JMX
 void setAuthenticationCacheJndiName(java.lang.String jndiName)
          Set the jndi name under which the SRPServerInterface proxy should be bound
 void setAuthenticationCacheResolution(int resInSecs)
          Set the auth cache resolution period in seconds
 void setAuthenticationCacheTimeout(int timeoutInSecs)
          Set the auth cache timeout period in seconds
 void setClientSocketFactory(java.lang.String factoryClassName)
          Set the RMIClientSocketFactory implementation class.
 void setJndiName(java.lang.String jndiName)
          Set the jndi name under which the SRPServerInterface proxy should be bound
 void setOverwriteSessions(boolean flag)
          Set the flag indicating if a successful user auth for an existing session should overwrite the current session.
 void setRequireAuxChallenge(boolean flag)
          Set if the client must supply an auxillary challenge as part of the verify phase.
 void setServerPort(int serverPort)
          Get the RMI port for the SRPServerInterface
 void setServerSocketFactory(java.lang.String factoryClassName)
          Set the RMIServerSocketFactory implementation class.
 void setVerifierSourceJndiName(java.lang.String jndiName)
          set the jndi name for the SRPVerifierSource implementation binding.
protected  void startService()
          Sub-classes should override this method to provide custum 'start' logic.
protected  void stopService()
          Sub-classes should override this method to provide custum 'stop' logic.
 void verifiedUser(SRPSessionKey (src)  key, SRPServerSession (src)  session)
          Called when username has sucessfully completed the SRP login.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, getLog, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean (src)
getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Constructor Detail

SRPService

public SRPService()
Method Detail

getVerifierSourceJndiName

public java.lang.String getVerifierSourceJndiName()
Get the jndi name for the SRPVerifierSource implementation binding.

Specified by:
getVerifierSourceJndiName in interface SRPServiceMBean (src)

setVerifierSourceJndiName

public void setVerifierSourceJndiName(java.lang.String jndiName)
set the jndi name for the SRPVerifierSource implementation binding.

Specified by:
setVerifierSourceJndiName in interface SRPServiceMBean (src)

getJndiName

public java.lang.String getJndiName()
Get the jndi name under which the SRPServerInterface proxy should be bound

Specified by:
getJndiName in interface SRPServiceMBean (src)

setJndiName

public void setJndiName(java.lang.String jndiName)
Set the jndi name under which the SRPServerInterface proxy should be bound

Specified by:
setJndiName in interface SRPServiceMBean (src)

getAuthenticationCacheJndiName

public java.lang.String getAuthenticationCacheJndiName()
Get the jndi name under which the SRPServerInterface proxy should be bound

Specified by:
getAuthenticationCacheJndiName in interface SRPServiceMBean (src)

setAuthenticationCacheJndiName

public void setAuthenticationCacheJndiName(java.lang.String jndiName)
Set the jndi name under which the SRPServerInterface proxy should be bound

Specified by:
setAuthenticationCacheJndiName in interface SRPServiceMBean (src)

getAuthenticationCacheTimeout

public int getAuthenticationCacheTimeout()
Get the auth cache timeout period in seconds

Specified by:
getAuthenticationCacheTimeout in interface SRPServiceMBean (src)

setAuthenticationCacheTimeout

public void setAuthenticationCacheTimeout(int timeoutInSecs)
Set the auth cache timeout period in seconds

Specified by:
setAuthenticationCacheTimeout in interface SRPServiceMBean (src)

getAuthenticationCacheResolution

public int getAuthenticationCacheResolution()
Get the auth cache resolution period in seconds

Specified by:
getAuthenticationCacheResolution in interface SRPServiceMBean (src)

setAuthenticationCacheResolution

public void setAuthenticationCacheResolution(int resInSecs)
Set the auth cache resolution period in seconds

Specified by:
setAuthenticationCacheResolution in interface SRPServiceMBean (src)

getRequireAuxChallenge

public boolean getRequireAuxChallenge()
Description copied from interface: SRPServiceMBean (src)
Get if the client must supply an auxillary challenge as part of the verify phase.

Specified by:
getRequireAuxChallenge in interface SRPServiceMBean (src)

setRequireAuxChallenge

public void setRequireAuxChallenge(boolean flag)
Description copied from interface: SRPServiceMBean (src)
Set if the client must supply an auxillary challenge as part of the verify phase.

Specified by:
setRequireAuxChallenge in interface SRPServiceMBean (src)

getOverwriteSessions

public boolean getOverwriteSessions()
Description copied from interface: SRPServiceMBean (src)
A flag indicating if a successful user auth for an existing session should overwrite the current session.

Specified by:
getOverwriteSessions in interface SRPServiceMBean (src)

setOverwriteSessions

public void setOverwriteSessions(boolean flag)
Description copied from interface: SRPServiceMBean (src)
Set the flag indicating if a successful user auth for an existing session should overwrite the current session.

Specified by:
setOverwriteSessions in interface SRPServiceMBean (src)

getClientSocketFactory

public java.lang.String getClientSocketFactory()
Get the RMIClientSocketFactory implementation class. If null the default RMI client socket factory implementation is used.

Specified by:
getClientSocketFactory in interface SRPServiceMBean (src)

setClientSocketFactory

public void setClientSocketFactory(java.lang.String factoryClassName)
                            throws java.lang.ClassNotFoundException,
                                   java.lang.InstantiationException,
                                   java.lang.IllegalAccessException
Set the RMIClientSocketFactory implementation class. If null the default RMI client socket factory implementation is used.

Specified by:
setClientSocketFactory in interface SRPServiceMBean (src)
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

getServerSocketFactory

public java.lang.String getServerSocketFactory()
Get the RMIServerSocketFactory implementation class. If null the default RMI server socket factory implementation is used.

Specified by:
getServerSocketFactory in interface SRPServiceMBean (src)

setServerSocketFactory

public void setServerSocketFactory(java.lang.String factoryClassName)
                            throws java.lang.ClassNotFoundException,
                                   java.lang.InstantiationException,
                                   java.lang.IllegalAccessException
Set the RMIServerSocketFactory implementation class. If null the default RMI server socket factory implementation is used.

Specified by:
setServerSocketFactory in interface SRPServiceMBean (src)
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

getServerPort

public int getServerPort()
Get the RMI port for the SRPServerInterface

Specified by:
getServerPort in interface SRPServiceMBean (src)

setServerPort

public void setServerPort(int serverPort)
Get the RMI port for the SRPServerInterface

Specified by:
setServerPort in interface SRPServiceMBean (src)

verifiedUser

public void verifiedUser(SRPSessionKey (src)  key,
                         SRPServerSession (src)  session)
Called when username has sucessfully completed the SRP login. This places the SRP session into the credential cache using a SimplePrincipal based on the username as the key.

Specified by:
verifiedUser in interface SRPServerListener (src)

closedUserSession

public void closedUserSession(SRPSessionKey (src)  key)
Description copied from interface: SRPServerListener (src)
Called when a user requests that a session be closed

Specified by:
closedUserSession in interface SRPServerListener (src)

getName

public java.lang.String getName()
Description copied from class: ServiceMBeanSupport (src)
Use the short class name as the default for the service name.

Specified by:
getName in interface ServiceMBean (src)
Overrides:
getName in class ServiceMBeanSupport (src)

invoke

public java.lang.Object invoke(Invocation (src)  invocation)
                        throws java.lang.Exception
Description copied from interface: SRPServiceMBean (src)
Expose the Invoker signature via JMX

Specified by:
invoke in interface SRPServiceMBean (src)
Throws:
java.lang.Exception

startService

protected void startService()
                     throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

stopService

protected void stopService()
                    throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'stop' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
stopService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception