com.continuent.tungsten.common.security
Class SecurityHelper

java.lang.Object
  extended by com.continuent.tungsten.common.security.SecurityHelper

public class SecurityHelper
extends java.lang.Object

Helper class for security related topics

Version:
1.0
Author:
Ludovic Launer

Constructor Summary
SecurityHelper()
           
 
Method Summary
static void deleteUserFromAuthenticationInfo(AuthenticationInfo authenticationInfo)
          Delete a user and password from a file
static AuthenticationInfo loadAuthenticationInformation()
          Loads Authentication and Encryption parameters from default location for service.properties file
static AuthenticationInfo loadAuthenticationInformation(java.lang.String propertiesFileLocation)
          Loads Authentication and Encryption parameters from service.properties file
static AuthenticationInfo loadAuthenticationInformation(java.lang.String propertiesFileLocation, boolean doConsistencyChecks)
           
static TungstenProperties loadPasswordsFromAuthenticationInfo(AuthenticationInfo authenticationInfo)
          Loads passwords from a TungstenProperties from a .properties file
static void saveCredentialsFromAuthenticationInfo(AuthenticationInfo authenticationInfo)
          Save passwords from a TungstenProperties into a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityHelper

public SecurityHelper()
Method Detail

saveCredentialsFromAuthenticationInfo

public static void saveCredentialsFromAuthenticationInfo(AuthenticationInfo authenticationInfo)
                                                  throws ServerRuntimeException
Save passwords from a TungstenProperties into a file

Parameters:
authenticationInfo - containing password file location
Throws:
ServerRuntimeException

deleteUserFromAuthenticationInfo

public static void deleteUserFromAuthenticationInfo(AuthenticationInfo authenticationInfo)
                                             throws ServerRuntimeException
Delete a user and password from a file

Parameters:
authenticationInfo - containing password file location
Throws:
ServerRuntimeException

loadPasswordsFromAuthenticationInfo

public static TungstenProperties loadPasswordsFromAuthenticationInfo(AuthenticationInfo authenticationInfo)
                                                              throws ServerRuntimeException
Loads passwords from a TungstenProperties from a .properties file

Returns:
TungstenProperties containing logins as key and passwords as values
Throws:
ServerRuntimeException

loadAuthenticationInformation

public static AuthenticationInfo loadAuthenticationInformation()
                                                        throws ConfigurationException
Loads Authentication and Encryption parameters from default location for service.properties file

Returns:
AuthenticationInfo loaded from file
Throws:
ConfigurationException

loadAuthenticationInformation

public static AuthenticationInfo loadAuthenticationInformation(java.lang.String propertiesFileLocation)
                                                        throws ConfigurationException
Loads Authentication and Encryption parameters from service.properties file

Parameters:
propertiesFileLocation - Location of the security.properties file. If set to null, will try to locate default file.
authUsage -
Returns:
AuthenticationInfo
Throws:
ConfigurationException
ReplicatorException

loadAuthenticationInformation

public static AuthenticationInfo loadAuthenticationInformation(java.lang.String propertiesFileLocation,
                                                               boolean doConsistencyChecks)
                                                        throws ConfigurationException
Throws:
ConfigurationException