public class KeyStoreKeyManager extends Object implements TrustKeyManager
Modifier and Type | Field and Description |
---|---|
static String |
KEYSTORE_PASS |
static String |
KEYSTORE_URL |
static String |
SIGNING_KEY_ALIAS |
static String |
SIGNING_KEY_PASS |
Constructor and Description |
---|
KeyStoreKeyManager() |
Modifier and Type | Method and Description |
---|---|
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
|
public static final String KEYSTORE_URL
public static final String KEYSTORE_PASS
public static final String SIGNING_KEY_PASS
public static final String SIGNING_KEY_ALIAS
public PrivateKey getSigningKey() throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManager
getSigningKey
in interface TrustKeyManager
TrustKeyConfigurationException
TrustKeyProcessingException
TrustKeyManager.getSigningKey()
public KeyPair getSigningKeyPair() throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManager
Constructs a KeyPair
instance containing the signing key (PrivateKey
) and associated PublicKey
.
getSigningKeyPair
in interface TrustKeyManager
KeyPair
object.TrustKeyConfigurationException
TrustKeyProcessingException
public Certificate getCertificate(String alias) throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManager
getCertificate
in interface TrustKeyManager
TrustKeyConfigurationException
TrustKeyProcessingException
TrustKeyManager.getCertificate(String)
public PublicKey getPublicKey(String alias) throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManager
getPublicKey
in interface TrustKeyManager
TrustKeyConfigurationException
TrustKeyProcessingException
TrustKeyManager.getPublicKey(String)
public PublicKey getValidatingKey(String domain) throws TrustKeyConfigurationException, TrustKeyProcessingException
getValidatingKey
in interface TrustKeyManager
IOException
TrustKeyConfigurationException
TrustKeyProcessingException
TrustKeyManager.getValidatingKey(String)
,
TrustKeyManager.getPublicKey(String)
public void setAuthProperties(List<AuthPropertyType> authList) throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManager
setAuthProperties
in interface TrustKeyManager
TrustKeyConfigurationException
TrustKeyProcessingException
TrustKeyManager.setAuthProperties(List)
public void setValidatingAlias(List<KeyValueType> aliases) throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManager
setValidatingAlias
in interface TrustKeyManager
TrustKeyConfigurationException
TrustKeyProcessingException
TrustKeyManager.setValidatingAlias(List)
public SecretKey getEncryptionKey(String domain, String encryptionAlgorithm, int keyLength) throws TrustKeyConfigurationException, TrustKeyProcessingException
TrustKeyManager
getEncryptionKey
in interface TrustKeyManager
encryptionAlgorithm
- Encryption AlgorithmkeyLength
- length of keysGeneralSecurityException
TrustKeyConfigurationException
TrustKeyProcessingException
TrustKeyManager#getEncryptionKey(String)
public void addAdditionalOption(String key, Object value)
TrustKeyManager
addAdditionalOption
in interface TrustKeyManager
TrustKeyManager.addAdditionalOption(java.lang.String,
java.lang.Object)
public Object getAdditionalOption(String key)
TrustKeyManager
getAdditionalOption
in interface TrustKeyManager
TrustKeyManager.getAdditionalOption(java.lang.String)
Copyright © 2017 JBoss by Red Hat. All rights reserved.