SmartFrog 3.10.000

org.smartfrog.sfcore.security
Class SFSecurity

java.lang.Object
  extended by org.smartfrog.sfcore.security.SFSecurity

public class SFSecurity
extends java.lang.Object

Provides basic security functionality to SF, i.e., triggers the initialization of all the security mechanisms (this should be called right at the beginning of SF startup) or returns information about the security environment. We assume JDK 1.4 so crypto and JSSE is already fully integrated.


Constructor Summary
SFSecurity()
           
 
Method Summary
static void checkSFCommunity()
          Checks that the calling stack has the SFCommunityPermission, i.e., all the code involved is signed by a trusted key.
static java.rmi.registry.Registry createRegistry(int port)
          Creates and exports a Registry on the local host that accepts requests on the specified port.
static java.lang.String getPeerAuthenticatedSubjects()
          Used inside a method call invoked by the RMI Server to find out authenticated information of our peer that called this function remotely.
static java.rmi.registry.Registry getRegistry(java.lang.String host, int port)
          Returns a reference to the remote object Registry on the specified host and port.
static void initSecurity()
          Initializes the security using system properties to decide on the level of security required.
static boolean isSecurityOn()
          Returns whether the SF security checks are active or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFSecurity

public SFSecurity()
Method Detail

initSecurity

public static void initSecurity()
                         throws SFGeneralSecurityException
Initializes the security using system properties to decide on the level of security required.

Throws:
SFGeneralSecurityException - if error initializing security.

checkSFCommunity

public static void checkSFCommunity()
Checks that the calling stack has the SFCommunityPermission, i.e., all the code involved is signed by a trusted key.


isSecurityOn

public static boolean isSecurityOn()
Returns whether the SF security checks are active or not. This can only be changed once at initialization time for security reasons.

Returns:
whether the SF security is active.

createRegistry

public static java.rmi.registry.Registry createRegistry(int port)
                                                 throws java.rmi.RemoteException
Creates and exports a Registry on the local host that accepts requests on the specified port.

Parameters:
port - the port on which the registry accepts requests
Returns:
the registry
Throws:
java.rmi.RemoteException - if the registry could not be exported
Since:
JDK1.1

getRegistry

public static java.rmi.registry.Registry getRegistry(java.lang.String host,
                                                     int port)
                                              throws java.rmi.RemoteException
Returns a reference to the remote object Registry on the specified host and port. If host is null, the local host is used.

Parameters:
host - host for the remote registry
port - port on which the registry accepts requests
Returns:
reference (a stub) to the remote object registry
Throws:
java.rmi.RemoteException - if the reference could not be created
Since:
JDK1.1

getPeerAuthenticatedSubjects

public static java.lang.String getPeerAuthenticatedSubjects()
Used inside a method call invoked by the RMI Server to find out authenticated information of our peer that called this function remotely.

Returns:
Authenticated information about our peer.

SmartFrog CORE 3.10.000

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