org.jboss.identity.federation.bindings.tomcat
Class KeyStoreKeyManager

java.lang.Object
  extended by org.jboss.identity.federation.bindings.tomcat.KeyStoreKeyManager
All Implemented Interfaces:
TrustKeyManager

public class KeyStoreKeyManager
extends java.lang.Object
implements TrustKeyManager

KeyStore based Trust Key Manager

Since:
Jan 22, 2009
Author:
Anil.Saldhana@redhat.com

Field Summary
static java.lang.String KEYSTORE_PASS
           
static java.lang.String KEYSTORE_URL
           
static java.lang.String SIGNING_KEY_ALIAS
           
static java.lang.String SIGNING_KEY_PASS
           
 
Constructor Summary
KeyStoreKeyManager()
           
 
Method Summary
 javax.crypto.SecretKey getEncryptionKey(java.lang.String domain, java.lang.String encryptionAlgorithm, int keyLength)
          Given a domain, obtain a secret key
 java.security.PrivateKey getSigningKey()
          Get the Signing Key
 java.security.PublicKey getValidatingKey(java.lang.String domain)
          Get the Validating Public Key of the domain
 void setAuthProperties(java.util.List<AuthPropertyType> authList)
          Provide a set of properties used for authentication into the storage of keys - keystore, ldap, db, HSM etc
 void setValidatingAlias(java.util.List<KeyValueType> aliases)
          Set a list of (domain,alias) tuple to trust domains The alias is a string that represents the validating key stored for a domain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEYSTORE_URL

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

KEYSTORE_PASS

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

SIGNING_KEY_PASS

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

SIGNING_KEY_ALIAS

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

KeyStoreKeyManager

public KeyStoreKeyManager()
Method Detail

getSigningKey

public java.security.PrivateKey getSigningKey()
                                       throws java.lang.Exception
Description copied from interface: TrustKeyManager
Get the Signing Key

Specified by:
getSigningKey in interface TrustKeyManager
Returns:
Throws:
java.lang.Exception
See Also:
TrustKeyManager.getSigningKey()

getValidatingKey

public java.security.PublicKey getValidatingKey(java.lang.String domain)
                                         throws java.lang.Exception
Description copied from interface: TrustKeyManager
Get the Validating Public Key of the domain

Specified by:
getValidatingKey in interface TrustKeyManager
Returns:
Throws:
java.lang.Exception
See Also:
TrustKeyManager.getValidatingKey(String)

setAuthProperties

public void setAuthProperties(java.util.List<AuthPropertyType> authList)
                       throws java.lang.Exception
Description copied from interface: TrustKeyManager
Provide a set of properties used for authentication into the storage of keys - keystore, ldap, db, HSM etc

Specified by:
setAuthProperties in interface TrustKeyManager
Throws:
java.lang.Exception
See Also:
TrustKeyManager.setAuthProperties(List)

setValidatingAlias

public void setValidatingAlias(java.util.List<KeyValueType> aliases)
Description copied from interface: TrustKeyManager
Set a list of (domain,alias) tuple to trust domains The alias is a string that represents the validating key stored for a domain

Specified by:
setValidatingAlias in interface TrustKeyManager
See Also:
TrustKeyManager.setValidatingAlias(List)

getEncryptionKey

public javax.crypto.SecretKey getEncryptionKey(java.lang.String domain,
                                               java.lang.String encryptionAlgorithm,
                                               int keyLength)
                                        throws java.lang.Exception
Description copied from interface: TrustKeyManager
Given a domain, obtain a secret key

Specified by:
getEncryptionKey in interface TrustKeyManager
encryptionAlgorithm - Encryption Algorithm
keyLength - length of keys
Returns:
Throws:
java.lang.Exception
See Also:
TrustKeyManager#getEncryptionKey(String)


Copyright © 2009 JBoss Inc.. All Rights Reserved.