issrg.pba.management.agent
Class PAConfigurationBase

java.lang.Object
  extended by issrg.pba.management.agent.PAConfigurationBase
All Implemented Interfaces:
PAConfiguration
Direct Known Subclasses:
FilePAConfiguration, TestEgPAConfiguration

public abstract class PAConfigurationBase
extends java.lang.Object
implements PAConfiguration

PERMIS Agent configuration class.

an instance of this class will encapsulate the entire configuration for the PERMIS agent (PAgent class).

the configuration consists entirely of SSL related settings used in the SSL configuration of the PERMIS Agent generic connector JMXMP connector-server.

the settings are held in a java.util.Properties object

Version:
0.3.2008.03.21
Author:
mfb4@kent.ac.uk

Constructor Summary
PAConfigurationBase()
          construct a PERMIS agent configuration set.
PAConfigurationBase(int port)
          construct a PERMIS agent configuration set.
 
Method Summary
protected static java.lang.String getChangeConfigErrorMsg()
          Get the standard error message used when the configuration has been used to create the JMX Server in the PERMIS Agent.
 java.lang.String getIdentityStoreInit()
          get the identity key store init method.
 java.lang.String getIdentityStoreProvider()
          get the identity key store provider.
 java.lang.String getIdentityStoreService()
          get the identity key store service (type).
 java.lang.String getPort()
          get the port number the agent will listening on.
 java.lang.String getSSLContextProvider()
          get the SSL context provider.
 java.lang.String getSSLContextService()
          get the SSL context service (type or version).
 java.lang.String getSSLEnabledCipherSuites()
          get the SSL enables cipher suites.
 java.lang.String getSSLEnabledProtocols()
          get the SSL enabled protocols.
 java.lang.String getSSLKeyManagerFactoryProvider()
          get the key manager factory provider.
 java.lang.String getSSLKeyManagerFactoryService()
          get the key manager factory service.
 java.lang.String getSSLSecureRandomNumberProvider()
          get the secure random number provider.
 java.lang.String getSSLSecureRandomNumberService()
          get the secure random number service.
 java.lang.String getSSLTrustManagerFactoryProvider()
          get the trust manager factory provider.
 java.lang.String getSSLTrustManagerFactoryService()
          get the trust manager factory service.
 java.lang.String getTrustStoreProvider()
          get the trust key store provider.
 java.lang.String getTrustStoreService()
          get the trust key store service (type).
 boolean isUsed()
          get the configuration used flag.
 void setIdentityStoreProvider(java.lang.String value)
          set the identity key store provider.
 void setIdentityStoreService(java.lang.String value)
          set the identity key store service (type).
 void setPort(int port)
          set the port number this agent is listening on.
 void setSSLContextProvider(java.lang.String value)
          set the SSL context provider.
 void setSSLContextService(java.lang.String value)
          set the SSL context service (type or version).
 void setSSLEnabledCipherSuites(java.lang.String value)
          set the SSL enables cipher suites.
 void setSSLEnabledProtocols(java.lang.String value)
          set the SSL enabled protocols.
 void setSSLKeyManagerFactoryProvider(java.lang.String value)
          set the key manager factory provider.
 void setSSLKeyManagerFactoryService(java.lang.String value)
          set the key manager factory service.
 void setSSLSecureRandomNumberProvider(java.lang.String value)
          set the secure random number provider.
 void setSSLSecureRandomNumberService(java.lang.String value)
          set the secure random number service.
 void setSSLTrustManagerFactoryProvider(java.lang.String value)
          set the trust manager factory provider.
 void setSSLTrustManagerFactoryService(java.lang.String value)
          set the trust manager factory service.
 void setTrustStoreProvider(java.lang.String value)
          set the trust key store provider.
 void setTrustStoreService(java.lang.String value)
          set the trust key store service (type).
 void setUsed(boolean usedParam)
          configuration used flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface issrg.pba.management.agent.PAConfiguration
getIdentityStoreInputStream, getIdentityStorePassword, getTrustStoreInputStream, getTrustStorePassword
 

Constructor Detail

PAConfigurationBase

public PAConfigurationBase()
construct a PERMIS agent configuration set.

Since:
0.1.2008.03.20

PAConfigurationBase

public PAConfigurationBase(int port)
                    throws PbaException
construct a PERMIS agent configuration set. this convenience version of constructor will set the port number.

Parameters:
port - number that the PERMIS agent will listen on.
Throws:
PbaException - if the port number is out of range.
Since:
0.1.2008.02.22
Method Detail

setUsed

public void setUsed(boolean usedParam)
configuration used flag. if set to true, then calling the modifier methods will return an exception. it is set it true via a call back call from the PERMIS agent, once it has used the configuration setting to set up the SSL connection. the call back is done even if the setup failed.

Specified by:
setUsed in interface PAConfiguration
Parameters:
usedParam - flag indicating "used configuration" or not.
Since:
0.1.2008.03.30

isUsed

public final boolean isUsed()
get the configuration used flag. If true that the configuration has been used to set up the connector server, and any changes to the configuration will have no effect.

Returns:
the used flag.

setIdentityStoreService

public final void setIdentityStoreService(java.lang.String value)
                                   throws PbaException
set the identity key store service (type).

Parameters:
value - identity key store service identifier.
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getIdentityStoreService

public java.lang.String getIdentityStoreService()
get the identity key store service (type). default value : "PKCS12"

Specified by:
getIdentityStoreService in interface PAConfiguration
Returns:
the identity key store service identifier
Since:
0.1.2008.01.28

setIdentityStoreProvider

public void setIdentityStoreProvider(java.lang.String value)
                              throws PbaException
set the identity key store provider.

Parameters:
value - the identity key store service identifier
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getIdentityStoreProvider

public java.lang.String getIdentityStoreProvider()
get the identity key store provider. default value : "SunJSSE"

Specified by:
getIdentityStoreProvider in interface PAConfiguration
Returns:
the identity key store provider identifier
Since:
0.1.2008.01.28

getIdentityStoreInit

public java.lang.String getIdentityStoreInit()
get the identity key store init method. Not implemented

Specified by:
getIdentityStoreInit in interface PAConfiguration
Returns:
the value indicating which init method is used.
Since:
0.1.2008.01.28

setTrustStoreService

public void setTrustStoreService(java.lang.String value)
                          throws PbaException
set the trust key store service (type).

Parameters:
value - the trust key store service identifier.
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getTrustStoreService

public java.lang.String getTrustStoreService()
get the trust key store service (type). default key store type "JKS"

Specified by:
getTrustStoreService in interface PAConfiguration
Returns:
the trust key store service identifier
Since:
0.1.2008.01.23

setTrustStoreProvider

public void setTrustStoreProvider(java.lang.String value)
                           throws PbaException
set the trust key store provider.

Parameters:
value - the trust key store provider identifier
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getTrustStoreProvider

public java.lang.String getTrustStoreProvider()
get the trust key store provider. default provider : "SUN"

Specified by:
getTrustStoreProvider in interface PAConfiguration
Returns:
the trust key store provider identifier
Since:
0.1.2008.01.23

setSSLKeyManagerFactoryService

public void setSSLKeyManagerFactoryService(java.lang.String value)
                                    throws PbaException
set the key manager factory service.

Parameters:
value - the key manager factory service identifier.
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getSSLKeyManagerFactoryService

public java.lang.String getSSLKeyManagerFactoryService()
get the key manager factory service. default key manager factory service is : "SunX509"

Specified by:
getSSLKeyManagerFactoryService in interface PAConfiguration
Returns:
the key manager factory service
Since:
0.1.2008.01.25

setSSLKeyManagerFactoryProvider

public void setSSLKeyManagerFactoryProvider(java.lang.String value)
                                     throws PbaException
set the key manager factory provider.

Parameters:
value - the key manager factory provider identifier
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getSSLKeyManagerFactoryProvider

public java.lang.String getSSLKeyManagerFactoryProvider()
get the key manager factory provider. Default key manager factory provider : "SunJSSE"

Specified by:
getSSLKeyManagerFactoryProvider in interface PAConfiguration
Returns:
the key manager factory provider identifier
Since:
0.1.2008.01.25

setSSLTrustManagerFactoryService

public void setSSLTrustManagerFactoryService(java.lang.String value)
                                      throws PbaException
set the trust manager factory service.

Parameters:
value - the trust manager factory service identifier
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getSSLTrustManagerFactoryService

public java.lang.String getSSLTrustManagerFactoryService()
get the trust manager factory service. default trust manager factory service : "SunX509"

Specified by:
getSSLTrustManagerFactoryService in interface PAConfiguration
Returns:
the trust manager factory service identifier
Since:
0.1.2008.01.25

setSSLTrustManagerFactoryProvider

public void setSSLTrustManagerFactoryProvider(java.lang.String value)
                                       throws PbaException
set the trust manager factory provider.

Parameters:
value - the trust manager factory provider identifier
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getSSLTrustManagerFactoryProvider

public java.lang.String getSSLTrustManagerFactoryProvider()
get the trust manager factory provider. default : "SunJSSE"

Specified by:
getSSLTrustManagerFactoryProvider in interface PAConfiguration
Returns:
the trust manager factory provider identifier.
Since:
0.1.2008.01.25

setSSLSecureRandomNumberService

public void setSSLSecureRandomNumberService(java.lang.String value)
                                     throws PbaException
set the secure random number service.

Parameters:
value - the secure random number service identifier
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getSSLSecureRandomNumberService

public java.lang.String getSSLSecureRandomNumberService()
get the secure random number service. default service : "SHA1PRNG"

Specified by:
getSSLSecureRandomNumberService in interface PAConfiguration
Returns:
the secure random number service identifier
Since:
0.1.2008.01.25

setSSLSecureRandomNumberProvider

public void setSSLSecureRandomNumberProvider(java.lang.String value)
                                      throws PbaException
set the secure random number provider.

Parameters:
value - the secure random number provider identifier
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getSSLSecureRandomNumberProvider

public java.lang.String getSSLSecureRandomNumberProvider()
get the secure random number provider. default provider : "SUN"

Specified by:
getSSLSecureRandomNumberProvider in interface PAConfiguration
Returns:
the secure random number provider identifier
Since:
0.1.2008.01.25

setSSLContextService

public void setSSLContextService(java.lang.String value)
                          throws PbaException
set the SSL context service (type or version).

Parameters:
value - the SSL context service identifier
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getSSLContextService

public java.lang.String getSSLContextService()
get the SSL context service (type or version). default context service : "SSLv3"

Specified by:
getSSLContextService in interface PAConfiguration
Returns:
the SSL context service identifier
Since:
0.1.2008.01.25

setSSLContextProvider

public void setSSLContextProvider(java.lang.String value)
                           throws PbaException
set the SSL context provider.

Parameters:
value - the SSL context provider
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getSSLContextProvider

public java.lang.String getSSLContextProvider()
get the SSL context provider. default context provider : "SunJSSE"

Specified by:
getSSLContextProvider in interface PAConfiguration
Returns:
the SSL context provider identifier
Since:
0.1.2008.01.25

setSSLEnabledProtocols

public void setSSLEnabledProtocols(java.lang.String value)
                            throws PbaException
set the SSL enabled protocols. a space separated list of posible SSL protocols/versions, or just the one.

Parameters:
value - the SSL enabled protocol identifiers
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getSSLEnabledProtocols

public java.lang.String getSSLEnabledProtocols()
get the SSL enabled protocols. default : "SSLv3"

Specified by:
getSSLEnabledProtocols in interface PAConfiguration
Returns:
the SSL enabled protocol identifiers
Since:
0.1.2008.01.28

setSSLEnabledCipherSuites

public void setSSLEnabledCipherSuites(java.lang.String value)
                               throws PbaException
set the SSL enables cipher suites. a space separated list of posible SSL cipher suites, or just the one.

Parameters:
value - the SSL enabled cipher suite identifiers
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.03.09

getSSLEnabledCipherSuites

public java.lang.String getSSLEnabledCipherSuites()
get the SSL enables cipher suites. default : "TLS_RSA_WITH_AES_128_CBC_SHA"

Specified by:
getSSLEnabledCipherSuites in interface PAConfiguration
Returns:
the SSL enabled cipher suite identifiers
Since:
0.1.2008.01.28

setPort

public void setPort(int port)
             throws PbaException
set the port number this agent is listening on.

Parameters:
port - the port number
Throws:
PbaException - if the configuration has already been used
Since:
0.1.2008.01.26

getPort

public final java.lang.String getPort()
get the port number the agent will listening on. default : "8080"

Specified by:
getPort in interface PAConfiguration
Returns:
the port number this agent is listening on
Since:
0.1.2008.01.26

getChangeConfigErrorMsg

protected static java.lang.String getChangeConfigErrorMsg()
Get the standard error message used when the configuration has been used to create the JMX Server in the PERMIS Agent. And any changes will have no effect.

Returns:
the changeConfigErrorMsg