PicketLink Federation Core 2.1.6.Final-redhat-2

org.picketlink.identity.federation.core.impl
Class KeyStoreKeyManager

java.lang.Object
  extended by org.picketlink.identity.federation.core.impl.KeyStoreKeyManager
All Implemented Interfaces:
TrustKeyManager

public class KeyStoreKeyManager
extends Object
implements TrustKeyManager

KeyStore based Trust Key Manager

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

Field Summary
static String KEYSTORE_PASS
           
static String KEYSTORE_URL
           
static String SIGNING_KEY_ALIAS
           
static String SIGNING_KEY_PASS
           
 
Constructor Summary
KeyStoreKeyManager()
           
 
Method Summary
 void addAdditionalOption(String key, Object value)
          Add general options
 Object getAdditionalOption(String key)
          Get additional option
 Certificate getCertificate(String alias)
          Get the certificate given an alias
 SecretKey getEncryptionKey(String domain, String encryptionAlgorithm, int keyLength)
          Given a domain, obtain a secret key
 PublicKey getPublicKey(String alias)
          Get a Public Key given an alias
 PrivateKey getSigningKey()
          Get the Signing Key
 KeyPair getSigningKeyPair()
           Constructs a KeyPair instance containing the signing key (PrivateKey) and associated PublicKey.
 PublicKey getValidatingKey(String domain)
          Get the validating public key Note:: The domain is mapped to an alias in the keystore
 void setAuthProperties(List<AuthPropertyType> authList)
          Provide a set of properties used for authentication into the storage of keys - keystore, ldap, db, HSM etc
 void setValidatingAlias(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 String KEYSTORE_URL
See Also:
Constant Field Values

KEYSTORE_PASS

public static final String KEYSTORE_PASS
See Also:
Constant Field Values

SIGNING_KEY_PASS

public static final String SIGNING_KEY_PASS
See Also:
Constant Field Values

SIGNING_KEY_ALIAS

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

KeyStoreKeyManager

public KeyStoreKeyManager()
Method Detail

getSigningKey

public PrivateKey getSigningKey()
                         throws TrustKeyConfigurationException,
                                TrustKeyProcessingException
Description copied from interface: TrustKeyManager
Get the Signing Key

Specified by:
getSigningKey in interface TrustKeyManager
Returns:
Throws:
TrustKeyConfigurationException
TrustKeyProcessingException
See Also:
TrustKeyManager.getSigningKey()

getSigningKeyPair

public KeyPair getSigningKeyPair()
                          throws TrustKeyConfigurationException,
                                 TrustKeyProcessingException
Description copied from interface: TrustKeyManager

Constructs a KeyPair instance containing the signing key (PrivateKey) and associated PublicKey.

Specified by:
getSigningKeyPair in interface TrustKeyManager
Returns:
the constructed KeyPair object.
Throws:
TrustKeyConfigurationException
TrustKeyProcessingException

getCertificate

public Certificate getCertificate(String alias)
                           throws TrustKeyConfigurationException,
                                  TrustKeyProcessingException
Description copied from interface: TrustKeyManager
Get the certificate given an alias

Specified by:
getCertificate in interface TrustKeyManager
Returns:
Throws:
TrustKeyConfigurationException
TrustKeyProcessingException
See Also:
TrustKeyManager.getCertificate(String)

getPublicKey

public PublicKey getPublicKey(String alias)
                       throws TrustKeyConfigurationException,
                              TrustKeyProcessingException
Description copied from interface: TrustKeyManager
Get a Public Key given an alias

Specified by:
getPublicKey in interface TrustKeyManager
Returns:
Throws:
TrustKeyConfigurationException
TrustKeyProcessingException
See Also:
TrustKeyManager.getPublicKey(String)

getValidatingKey

public PublicKey getValidatingKey(String domain)
                           throws TrustKeyConfigurationException,
                                  TrustKeyProcessingException
Get the validating public key Note:: The domain is mapped to an alias in the keystore

Specified by:
getValidatingKey in interface TrustKeyManager
Returns:
Throws:
IOException
TrustKeyConfigurationException
TrustKeyProcessingException
See Also:
TrustKeyManager.getValidatingKey(String), TrustKeyManager.getPublicKey(String)

setAuthProperties

public void setAuthProperties(List<AuthPropertyType> authList)
                       throws TrustKeyConfigurationException,
                              TrustKeyProcessingException
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:
TrustKeyConfigurationException
TrustKeyProcessingException
See Also:
TrustKeyManager.setAuthProperties(List)

setValidatingAlias

public void setValidatingAlias(List<KeyValueType> aliases)
                        throws TrustKeyConfigurationException,
                               TrustKeyProcessingException
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
Throws:
TrustKeyConfigurationException
TrustKeyProcessingException
See Also:
TrustKeyManager.setValidatingAlias(List)

getEncryptionKey

public SecretKey getEncryptionKey(String domain,
                                  String encryptionAlgorithm,
                                  int keyLength)
                           throws TrustKeyConfigurationException,
                                  TrustKeyProcessingException
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:
GeneralSecurityException
TrustKeyConfigurationException
TrustKeyProcessingException
See Also:
TrustKeyManager#getEncryptionKey(String)

addAdditionalOption

public void addAdditionalOption(String key,
                                Object value)
Description copied from interface: TrustKeyManager
Add general options

Specified by:
addAdditionalOption in interface TrustKeyManager
See Also:
TrustKeyManager.addAdditionalOption(java.lang.String, java.lang.Object)

getAdditionalOption

public Object getAdditionalOption(String key)
Description copied from interface: TrustKeyManager
Get additional option

Specified by:
getAdditionalOption in interface TrustKeyManager
Returns:
See Also:
TrustKeyManager.getAdditionalOption(java.lang.String)

PicketLink Federation Core 2.1.6.Final-redhat-2

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.