issrg.pba.management.agent.keyStoreSource
Class FilePAConfiguration

java.lang.Object
  extended by issrg.pba.management.agent.PAConfigurationBase
      extended by issrg.pba.management.agent.keyStoreSource.FilePAConfiguration
All Implemented Interfaces:
PAConfiguration

public class FilePAConfiguration
extends PAConfigurationBase

This class extends the PERMIS agent configuration and adds the aspects that relate to the key stores existing in a file on the local file store.

This class would need to be replaced if the key stores where to exist on any other form such as a secure tamper proof smart card

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

Constructor Summary
FilePAConfiguration()
          construct a PERMIS agent configuration set.
FilePAConfiguration(int port)
          construct a PERMIS agent configuration set.
 
Method Summary
 java.io.InputStream getIdentityStoreInputStream()
          get the identity key store input stream.
 char[] getIdentityStorePassword()
          the call back "get" identity password.
 java.io.InputStream getTrustStoreInputStream()
          get the trust key store input stream.
 char[] getTrustStorePassword()
          the call back "get" trust password.
 void setIdentityStoreName(java.lang.String value)
          set the identity key store name.
 void setIdentityStorePassword(char[] password)
          set the identity password.
 void setTrustStoreName(java.lang.String value)
          set the trust key store name.
 void setTrustStorePassword(char[] password)
          set the trust password.
 void setUsed(boolean usedParam)
          called when settings have been used.
 
Methods inherited from class issrg.pba.management.agent.PAConfigurationBase
getChangeConfigErrorMsg, getIdentityStoreInit, getIdentityStoreProvider, getIdentityStoreService, getPort, getSSLContextProvider, getSSLContextService, getSSLEnabledCipherSuites, getSSLEnabledProtocols, getSSLKeyManagerFactoryProvider, getSSLKeyManagerFactoryService, getSSLSecureRandomNumberProvider, getSSLSecureRandomNumberService, getSSLTrustManagerFactoryProvider, getSSLTrustManagerFactoryService, getTrustStoreProvider, getTrustStoreService, isUsed, setIdentityStoreProvider, setIdentityStoreService, setPort, setSSLContextProvider, setSSLContextService, setSSLEnabledCipherSuites, setSSLEnabledProtocols, setSSLKeyManagerFactoryProvider, setSSLKeyManagerFactoryService, setSSLSecureRandomNumberProvider, setSSLSecureRandomNumberService, setSSLTrustManagerFactoryProvider, setSSLTrustManagerFactoryService, setTrustStoreProvider, setTrustStoreService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePAConfiguration

public FilePAConfiguration()
construct a PERMIS agent configuration set.

Since:
0.3.2008.03.21

FilePAConfiguration

public FilePAConfiguration(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.3.2008.02.21
Method Detail

setIdentityStorePassword

public void setIdentityStorePassword(char[] password)
set the identity password. e.g. setIdentityStorePassword ("password".toCharArray()); This of course is a bad example as the String is imutable and can not be explicitlly removed from memory.

Parameters:
password - the char array containing the password
Since:
0.1.2008.02.22

getIdentityStorePassword

public char[] getIdentityStorePassword()
the call back "get" identity password.

Note that after PERMIS agent calls this method and used the password, the password is cleared.

Returns:
the identity store password
Since:
0.1.2008.02.22

setTrustStorePassword

public void setTrustStorePassword(char[] password)
set the trust password. e.g. setTrustStorePassword ("password".toCharArray()); This of course is a bad example as the String is imutable and can not be explicitlly removed from memory.

Parameters:
password - - the char array containing the password
Since:
0.1.2008.02.22

getTrustStorePassword

public char[] getTrustStorePassword()
the call back "get" trust password.

Note that after PERMIS agent calls this method and used the password, the password is cleared.

Returns:
the trust store password.
Since:
0.1.2008.02.22

setUsed

public void setUsed(boolean usedParam)
called when settings have been used.

Specified by:
setUsed in interface PAConfiguration
Overrides:
setUsed in class PAConfigurationBase
Parameters:
usedParam - - flag configuration used flag
Since:
0.1.2008.02.22

setIdentityStoreName

public void setIdentityStoreName(java.lang.String value)
                          throws PbaException
set the identity key store name. takes a local file name, of the key store. and stores it for latter use with getIdentityStoreInputStream

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

getIdentityStoreInputStream

public java.io.InputStream getIdentityStoreInputStream()
                                                throws PbaException
get the identity key store input stream. creates and returns an input stream to the key store, the PERMIS agent will close the input stream once it had read the key store in.

Returns:
the identity key store input stream
Throws:
PbaException - if the file name can not be found.
Since:
0.1.2008.01.28

setTrustStoreName

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

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

getTrustStoreInputStream

public java.io.InputStream getTrustStoreInputStream()
                                             throws PbaException
get the trust key store input stream. creates and returns an input stream to the key store, the PERMIS agent will close the input stream once it had read the key store in.

Returns:
an open input stream to the trust store.
Throws:
PbaException - if the trust key store file can not be found
Since:
0.1.2008.01.23