com.continuent.tungsten.common.security
Class AuthenticationInfo

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

public final class AuthenticationInfo
extends java.lang.Object

Information class holding Authentication and Encryption parameters Some of the properties may be left null depending on how and when this is used

Version:
1.0
Author:
Ludovic Launer

Field Summary
static java.lang.String AUTHENTICATION_INFO_PROPERTY
           
static java.lang.String KEYSTORE_LOCATION
           
static java.lang.String KEYSTORE_PASSWORD
           
static java.lang.String PASSWORD
           
static java.lang.String SECURITY_CONFIG_FILE_LOCATION
           
static java.lang.String TRUSTSTORE_LOCATION
           
static java.lang.String TRUSTSTORE_PASSWORD
           
static java.lang.String TUNGSTEN_AUTHENTICATION_REALM
           
static java.lang.String USERNAME
           
 
Constructor Summary
AuthenticationInfo()
           
AuthenticationInfo(java.lang.String parentPropertiesFileLocation)
          Creates a new AuthenticationInfo object
 
Method Summary
 void checkAuthenticationInfo()
          Check Authentication information consistency
 java.lang.String getAccessFileLocation()
           
 TungstenProperties getAsTungstenProperties()
          Get the AuthenticationInfo as a TungstenProperties
 java.lang.String getDecryptedPassword()
          Returns the decrypted password
 java.lang.String getKeystoreLocation()
           
 java.lang.String getKeystorePassword()
           
 java.lang.String getParentPropertiesFileLocation()
           
 java.lang.String getPassword()
          TODO: getEncryptedPassword definition.
 java.lang.String getPasswordFileLocation()
           
 java.lang.String getTruststoreLocation()
           
 java.lang.String getTruststorePassword()
           
 java.lang.String getUsername()
           
 boolean isAuthenticationNeeded()
           
 boolean isEncryptionNeeded()
           
 boolean isUseEncryptedPasswords()
           
 boolean isUseTungstenAuthenticationRealm()
           
 void setAccessFileLocation(java.lang.String accessFileLocation)
           
 void setAuthenticationNeeded(boolean authenticationNeeded)
           
 void setEncryptionNeeded(boolean encryptionNeeded)
           
 void setKeystore(java.lang.String keyStoreLocation, java.lang.String keystorePassword)
           
 void setKeystoreLocation(java.lang.String keystoreLocation)
           
 void setKeystorePassword(java.lang.String keystorePassword)
           
 void setParentPropertiesFileLocation(java.lang.String parentPropertiesFileLocation)
           
 void setPassword(java.lang.String password)
           
 void setPasswordFileLocation(java.lang.String passwordFileLocation)
           
 void setTruststore(java.lang.String truststoreLocation, java.lang.String truststorePassword)
           
 void setTruststoreLocation(java.lang.String truststoreLocation)
           
 void setTruststorePassword(java.lang.String truststorePassword)
           
 void setUseEncryptedPasswords(boolean useEncryptedPasswords)
           
 void setUsername(java.lang.String username)
           
 void setUseTungstenAuthenticationRealm(boolean useTungstenAuthenticationRealm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTHENTICATION_INFO_PROPERTY

public static final java.lang.String AUTHENTICATION_INFO_PROPERTY
See Also:
Constant Field Values

TUNGSTEN_AUTHENTICATION_REALM

public static final java.lang.String TUNGSTEN_AUTHENTICATION_REALM
See Also:
Constant Field Values

USERNAME

public static final java.lang.String USERNAME
See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
See Also:
Constant Field Values

KEYSTORE_LOCATION

public static final java.lang.String KEYSTORE_LOCATION
See Also:
Constant Field Values

KEYSTORE_PASSWORD

public static final java.lang.String KEYSTORE_PASSWORD
See Also:
Constant Field Values

TRUSTSTORE_LOCATION

public static final java.lang.String TRUSTSTORE_LOCATION
See Also:
Constant Field Values

TRUSTSTORE_PASSWORD

public static final java.lang.String TRUSTSTORE_PASSWORD
See Also:
Constant Field Values

SECURITY_CONFIG_FILE_LOCATION

public static final java.lang.String SECURITY_CONFIG_FILE_LOCATION
See Also:
Constant Field Values
Constructor Detail

AuthenticationInfo

public AuthenticationInfo(java.lang.String parentPropertiesFileLocation)
Creates a new AuthenticationInfo object


AuthenticationInfo

public AuthenticationInfo()
Method Detail

checkAuthenticationInfo

public void checkAuthenticationInfo()
                             throws ServerRuntimeException,
                                    ConfigurationException
Check Authentication information consistency

Throws:
ConfigurationException
ServerRuntimeException

getAsTungstenProperties

public TungstenProperties getAsTungstenProperties()
Get the AuthenticationInfo as a TungstenProperties

Returns:
TungstenProperties

getDecryptedPassword

public java.lang.String getDecryptedPassword()
                                      throws ConfigurationException
Returns the decrypted password

Returns:
String containing the (if needed) decrypted password
Throws:
ConfigurationException

getPassword

public java.lang.String getPassword()
TODO: getEncryptedPassword definition.

Returns:
the encrypted password if useEncryptedPasswords==true or the clear text password otherwise

setKeystore

public void setKeystore(java.lang.String keyStoreLocation,
                        java.lang.String keystorePassword)

setTruststore

public void setTruststore(java.lang.String truststoreLocation,
                          java.lang.String truststorePassword)

isAuthenticationNeeded

public boolean isAuthenticationNeeded()

setAuthenticationNeeded

public void setAuthenticationNeeded(boolean authenticationNeeded)

isEncryptionNeeded

public boolean isEncryptionNeeded()

setEncryptionNeeded

public void setEncryptionNeeded(boolean encryptionNeeded)

getKeystoreLocation

public java.lang.String getKeystoreLocation()

setKeystoreLocation

public void setKeystoreLocation(java.lang.String keystoreLocation)

getUsername

public java.lang.String getUsername()

setUsername

public void setUsername(java.lang.String username)

setPassword

public void setPassword(java.lang.String password)

getPasswordFileLocation

public java.lang.String getPasswordFileLocation()

setPasswordFileLocation

public void setPasswordFileLocation(java.lang.String passwordFileLocation)

getAccessFileLocation

public java.lang.String getAccessFileLocation()

setAccessFileLocation

public void setAccessFileLocation(java.lang.String accessFileLocation)

getKeystorePassword

public java.lang.String getKeystorePassword()

setKeystorePassword

public void setKeystorePassword(java.lang.String keystorePassword)

getTruststoreLocation

public java.lang.String getTruststoreLocation()

setTruststoreLocation

public void setTruststoreLocation(java.lang.String truststoreLocation)

getTruststorePassword

public java.lang.String getTruststorePassword()

setTruststorePassword

public void setTruststorePassword(java.lang.String truststorePassword)

isUseTungstenAuthenticationRealm

public boolean isUseTungstenAuthenticationRealm()

setUseTungstenAuthenticationRealm

public void setUseTungstenAuthenticationRealm(boolean useTungstenAuthenticationRealm)

isUseEncryptedPasswords

public boolean isUseEncryptedPasswords()

setUseEncryptedPasswords

public void setUseEncryptedPasswords(boolean useEncryptedPasswords)

getParentPropertiesFileLocation

public java.lang.String getParentPropertiesFileLocation()

setParentPropertiesFileLocation

public void setParentPropertiesFileLocation(java.lang.String parentPropertiesFileLocation)