com.iplanet.trustbase.initiator.config
Class PropertyConfigAdapter

java.lang.Object
  |
  +--com.iplanet.trustbase.initiator.config.PropertyConfigAdapter
All Implemented Interfaces:
ConfigAdapter
Direct Known Subclasses:
ErrorConfigAdapter

public class PropertyConfigAdapter
extends java.lang.Object
implements ConfigAdapter

Implementation of ConfigAdapter using a Properties object

See Also:
ConfigAdapter, ConfigAdapterException, ExceptionCodes

Constructor Summary
  PropertyConfigAdapter()
          Create a blank PropertyConfigAdapter
  PropertyConfigAdapter(java.util.Properties properties, java.util.Map objectProperties, java.security.PrivateKey signingKey, java.security.cert.X509Certificate[] signerPath, java.security.cert.X509Certificate[][] vertificationPaths)
          Create a PropertyConfigAdapter.
  PropertyConfigAdapter(java.util.Properties properties, java.util.Map objectProperties, java.lang.String signingName, java.lang.String[] verificationNames, TokenKeyStore store)
          Create a PropertyConfigAdapter.
protected PropertyConfigAdapter(java.util.Properties properties, java.util.Map objectProperties, java.lang.String signingName, java.lang.String sslsigningName, java.lang.String[] verificationNames, TokenKeyStore store)
           
  PropertyConfigAdapter(java.util.Properties properties, java.security.PrivateKey signingKey, java.security.cert.X509Certificate[] signerPath, java.security.cert.X509Certificate[][] vertificationPaths)
          Create a PropertyConfigAdapter.
  PropertyConfigAdapter(java.util.Properties properties, java.lang.String signingName, java.lang.String[] verificationNames, TokenKeyStore store)
          Create a PropertyConfigAdapter.
  PropertyConfigAdapter(java.util.Properties properties, java.lang.String signingName, java.lang.String sslsigningName, java.lang.String[] verificationNames, TokenKeyStore store)
          Create a PropertyConfigAdapter.
 
Method Summary
protected  java.security.cert.X509Certificate[] completeChain(TokenKeyStore store, java.util.Collection c)
           
 java.security.cert.X509Certificate[] completeChain(java.security.cert.X509Certificate certificate)
          Completes a chain given a supplied certificate.
 java.lang.Object getObjectProperty(java.lang.String property)
          Returns an object with the given property name from the system.
 java.lang.String getProperty(java.lang.String property)
          Get a property from the system.
 java.security.PrivateKey getSignerKey()
          Get the private key used to sign the request message.
 java.security.cert.X509Certificate[] getSignerPath()
          Get the certificate path that will be included in the request as the signer's certificate path.
 java.security.PrivateKey getSSLSignerKey()
          Get the private key used in SSL Transactions.
 java.security.cert.X509Certificate[] getSSLSignerPath()
          Get the SSL certificate path to be used in SSL Transactions.
 java.security.cert.X509Certificate[][] getVerificationPaths()
          Get the set of certificate paths that will be used to verify the response message.
 void validateChain(java.security.cert.X509Certificate[] chain)
          Validate a supplied certificate chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyConfigAdapter

public PropertyConfigAdapter(java.util.Properties properties,
                             java.util.Map objectProperties,
                             java.security.PrivateKey signingKey,
                             java.security.cert.X509Certificate[] signerPath,
                             java.security.cert.X509Certificate[][] vertificationPaths)
Create a PropertyConfigAdapter.
Parameters:
properties - the properties object to use
objectProperties - the object properties to use.
signingKey - the private key used to sign the request
signerPath - the certificate path to be included in a request
verificationPaths - the set of certificate paths used to verify the response

PropertyConfigAdapter

public PropertyConfigAdapter(java.util.Properties properties,
                             java.security.PrivateKey signingKey,
                             java.security.cert.X509Certificate[] signerPath,
                             java.security.cert.X509Certificate[][] vertificationPaths)
Create a PropertyConfigAdapter.
Parameters:
properties - the properties object to use
signingKey - the private key used to sign the request
signerPath - the certificate path to be included in a request
verificationPaths - the set of certificate paths used to verify the response

PropertyConfigAdapter

public PropertyConfigAdapter(java.util.Properties properties,
                             java.util.Map objectProperties,
                             java.lang.String signingName,
                             java.lang.String[] verificationNames,
                             TokenKeyStore store)
                      throws ConfigAdapterException
Create a PropertyConfigAdapter.
Parameters:
properties - the properties object to use.
signingName - the name of the certificate and key pair to use for signing.
verificationName - the names of the certificate chains to use for verification.
store - the token key store to retrieve the keys and certificates from.
Throws:
ConfigAdapterException - if it cannot access a certificate or key it needs.

PropertyConfigAdapter

public PropertyConfigAdapter(java.util.Properties properties,
                             java.lang.String signingName,
                             java.lang.String[] verificationNames,
                             TokenKeyStore store)
                      throws ConfigAdapterException
Create a PropertyConfigAdapter.
Parameters:
properties - the properties object to use.
signingName - the name of the certificate and key pair to use for signing.
verificationName - the names of the certificate chains to use for verification.
store - the token key store to retrieve the keys and certificates from.
Throws:
ConfigAdapterException - if it cannot access a certificate or key it needs.

PropertyConfigAdapter

public PropertyConfigAdapter(java.util.Properties properties,
                             java.lang.String signingName,
                             java.lang.String sslsigningName,
                             java.lang.String[] verificationNames,
                             TokenKeyStore store)
                      throws ConfigAdapterException
Create a PropertyConfigAdapter.
Parameters:
properties - the properties object to use.
signingName - the name of the certificate and key pair to use for signing.
sslsigningname - the name of the certificate and key pair to use for ssl client transactions.
verificationName - the names of the certificate chains to use for verification.
store - the token key store to retrieve the keys and certificates from.
Throws:
ConfigAdapterException - if it cannot access a certificate or key it needs.

PropertyConfigAdapter

protected PropertyConfigAdapter(java.util.Properties properties,
                                java.util.Map objectProperties,
                                java.lang.String signingName,
                                java.lang.String sslsigningName,
                                java.lang.String[] verificationNames,
                                TokenKeyStore store)
                         throws ConfigAdapterException

PropertyConfigAdapter

public PropertyConfigAdapter()
Create a blank PropertyConfigAdapter
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String property)
                             throws ConfigAdapterException
Get a property from the system.
Specified by:
getProperty in interface ConfigAdapter
Parameters:
property - the name of the property required
Returns:
the value of the property or null if it is not present

getObjectProperty

public java.lang.Object getObjectProperty(java.lang.String property)
                                   throws ConfigAdapterException
Returns an object with the given property name from the system.
Specified by:
getObjectProperty in interface ConfigAdapter
Following copied from interface: com.iplanet.trustbase.initiator.ConfigAdapter
Parameters:
property - the name of the property required.
Returns:
the value of the property or null if the property is not present in the system.
Throws:
ConfigAdapterException - if the property could not be found and processing should not continue.

getSignerPath

public java.security.cert.X509Certificate[] getSignerPath()
                                                   throws ConfigAdapterException
Get the certificate path that will be included in the request as the signer's certificate path.
Specified by:
getSignerPath in interface ConfigAdapter
Returns:
the signing certificate path

getSignerKey

public java.security.PrivateKey getSignerKey()
                                      throws ConfigAdapterException
Get the private key used to sign the request message.
Specified by:
getSignerKey in interface ConfigAdapter
Returns:
the signing key

getSSLSignerPath

public java.security.cert.X509Certificate[] getSSLSignerPath()
                                                      throws ConfigAdapterException
Get the SSL certificate path to be used in SSL Transactions.
Specified by:
getSSLSignerPath in interface ConfigAdapter
Returns:
the signing certificate path

getSSLSignerKey

public java.security.PrivateKey getSSLSignerKey()
                                         throws ConfigAdapterException
Get the private key used in SSL Transactions.
Specified by:
getSSLSignerKey in interface ConfigAdapter
Returns:
the signing key

getVerificationPaths

public java.security.cert.X509Certificate[][] getVerificationPaths()
                                                            throws ConfigAdapterException
Get the set of certificate paths that will be used to verify the response message.
Specified by:
getVerificationPaths in interface ConfigAdapter
Returns:
the verification path

validateChain

public void validateChain(java.security.cert.X509Certificate[] chain)
                   throws ConfigAdapterException
Validate a supplied certificate chain.
Specified by:
validateChain in interface ConfigAdapter
Parameters:
certificateChain - is the certificate chain to check.

completeChain

public java.security.cert.X509Certificate[] completeChain(java.security.cert.X509Certificate certificate)
                                                   throws ConfigAdapterException
Completes a chain given a supplied certificate.
Specified by:
completeChain in interface ConfigAdapter
Parameters:
certificate - The certificate to try and complete
Returns:
The chain
Throws:
ConfigException - if it is unable to complete the chain

completeChain

protected java.security.cert.X509Certificate[] completeChain(TokenKeyStore store,
                                                             java.util.Collection c)
                                                      throws ConfigAdapterException