public class KeyStoreConfigurationManagerImpl extends Object implements KeyStoreConfigurationManager
KeyStoreConfigurationManager
using JSON serialization. The typical
usage will be to open a JSON file in conf/keystore.json that contains the configurations
for the various keystores the application may use. For example:
{ "default": { "comment": "Additional fields should be ignored. This is the default keystore implementation", "keyStoreFile": "keystore.pfx", "keyStorePasswordFile": "storepass", "keyStoreType": "PKCS12" }, "legacy": { "comment": "Some legacy keystore", "keyStoreFile": "keystore.jks", "keyStorePasswordFile": "storepass", "keyStoreType": "JKS" }, "opendj": { "comment": "opendj keystore", "providerName": "OpenDJ", "providerArg": "src/test/resources/keystore.conf", "keyStoreType": "LDAP", "providerClass": "org.forgerock.opendj.security.OpenDjSecurityProvider", "keyStorePasswordFile": "dj_storepass", "keyPasswordFile": "dj_storepass" } }
Constructor and Description |
---|
KeyStoreConfigurationManagerImpl(InputStream jsonStream)
Construct a KeyStoreConfigurationManager instance.
|
KeyStoreConfigurationManagerImpl(String fileName)
Construct a KeyStoreConfigurationManager instance.
|
Modifier and Type | Method and Description |
---|---|
KeyStoreConfiguration |
getKeyStoreConfiguration(String name)
Return the KeyStore configuration for the given symbolic name.
|
public KeyStoreConfigurationManagerImpl(String fileName) throws IOException
fileName
- JSON file path that holds the keystore configurationIOException
- If the configuration JSON can not be readpublic KeyStoreConfigurationManagerImpl(InputStream jsonStream) throws IOException
jsonStream
- InputStream to an json object to be parsed.IOException
- If the configuration JSON can not be readpublic KeyStoreConfiguration getKeyStoreConfiguration(String name)
KeyStoreConfigurationManager
getKeyStoreConfiguration
in interface KeyStoreConfigurationManager
name
- The name of the keystore configuration. example: default, saml2, hsm, test-keystoreCopyright © 2010-2018, ForgeRock All Rights Reserved.