SmartFrog 3.10.000

org.smartfrog.sfcore.security
Class SFSecurityEnvironmentImpl

java.lang.Object
  extended by org.smartfrog.sfcore.security.SFSecurityEnvironmentImpl
All Implemented Interfaces:
SFSecurityEnvironment

public class SFSecurityEnvironmentImpl
extends java.lang.Object
implements SFSecurityEnvironment

A security environment composed of SF private keys, certificates and trust assumptions in a way that JSSE can use them to configure a secure connection.


Constructor Summary
SFSecurityEnvironmentImpl()
          Constructs SFSecurityEnvironmentImpl.
 
Method Summary
 java.rmi.server.RMIClientSocketFactory getEmptyRMIClientSocketFactory()
          Gets a RMI wrapper factory to the client's SSL factory (without initialized).
 java.rmi.server.RMIClientSocketFactory getRMIClientSocketFactory()
          Gets a RMI wrapper factory to the client's SSL factory.
 java.rmi.server.RMIServerSocketFactory getRMIServerSocketFactory()
          Gets a RMI wrapper factory to the server's SSL factory.
 java.rmi.server.RMISocketFactory getRMISocketFactory()
          Gets an RMISocketFactory that is "safe" enough for the default case.
 javax.net.ssl.SSLSocketFactory getSSLSocketFactory(boolean useClientMode)
          Returns a socket factory that can be used by RMI to establish a JSSE secure channnel.
 void handleSocket(SFSocket sfs)
          Handles a SFSocket with a SSL socket attached to it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFSecurityEnvironmentImpl

public SFSecurityEnvironmentImpl()
                          throws SFGeneralSecurityException
Constructs SFSecurityEnvironmentImpl. Initializes key store, key managers,trust managers, contexts, SSL socket factories and RMI socket factories

Throws:
SFGeneralSecurityException - if error during initalization
Method Detail

getSSLSocketFactory

public javax.net.ssl.SSLSocketFactory getSSLSocketFactory(boolean useClientMode)
Returns a socket factory that can be used by RMI to establish a JSSE secure channnel.

Specified by:
getSSLSocketFactory in interface SFSecurityEnvironment
Parameters:
useClientMode - If the factory generates SSL sockets that initiate the handshake.
Returns:
A socket factory that can be used by RMI to establish a JSSE secure channnel.

getRMIClientSocketFactory

public java.rmi.server.RMIClientSocketFactory getRMIClientSocketFactory()
Gets a RMI wrapper factory to the client's SSL factory.

Specified by:
getRMIClientSocketFactory in interface SFSecurityEnvironment
Returns:
A RMI wrapper factory to the client's SSL factory.

getEmptyRMIClientSocketFactory

public java.rmi.server.RMIClientSocketFactory getEmptyRMIClientSocketFactory()
Gets a RMI wrapper factory to the client's SSL factory (without initialized).

Specified by:
getEmptyRMIClientSocketFactory in interface SFSecurityEnvironment
Returns:
A RMI wrapper factory to the client's SSL factory (without initialized).

getRMIServerSocketFactory

public java.rmi.server.RMIServerSocketFactory getRMIServerSocketFactory()
Gets a RMI wrapper factory to the server's SSL factory.

Specified by:
getRMIServerSocketFactory in interface SFSecurityEnvironment
Returns:
A RMI wrapper factory to the server's SSL factory.

getRMISocketFactory

public java.rmi.server.RMISocketFactory getRMISocketFactory()
Gets an RMISocketFactory that is "safe" enough for the default case. This will be installed as part of the security initialization. However, this default factory will be overwritten by the one specified in the object reference, so we should not expect that this "minimum security" will always be enforced.

Specified by:
getRMISocketFactory in interface SFSecurityEnvironment
Returns:
An RMISocketFactory that is "safe" enough for the default case, i.e., when the object reference does not specify otherwise.

handleSocket

public void handleSocket(SFSocket sfs)
                  throws java.io.IOException
Handles a SFSocket with a SSL socket attached to it. This process includes configuring it depending on use mode and possibly waiting until the secure session gets established, and take an action according to the resulting peer characteristics.

Specified by:
handleSocket in interface SFSecurityEnvironment
Parameters:
sfs - A SFSocket with a SSL socket attached.
Throws:
java.io.IOException - Failure while configuring or establishing secure session.

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP