|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.security.ssl.FileBasedKeyStoresFactory
@InterfaceAudience.Private @InterfaceStability.Evolving public class FileBasedKeyStoresFactory
KeyStoresFactory
implementation that reads the certificates from
keystore files.
TrustManager
is refreshed with the new trust certificate entries (using a
ReloadingX509TrustManager
trustmanager).
Field Summary | |
---|---|
static String |
DEFAULT_KEYSTORE_TYPE
Default format of the keystore files. |
static int |
DEFAULT_SSL_TRUSTSTORE_RELOAD_INTERVAL
Reload interval in milliseconds. |
static String |
SSL_KEYSTORE_LOCATION_TPL_KEY
|
static String |
SSL_KEYSTORE_PASSWORD_TPL_KEY
|
static String |
SSL_KEYSTORE_TYPE_TPL_KEY
|
static String |
SSL_TRUSTSTORE_LOCATION_TPL_KEY
|
static String |
SSL_TRUSTSTORE_PASSWORD_TPL_KEY
|
static String |
SSL_TRUSTSTORE_RELOAD_INTERVAL_TPL_KEY
|
static String |
SSL_TRUSTSTORE_TYPE_TPL_KEY
|
Constructor Summary | |
---|---|
FileBasedKeyStoresFactory()
|
Method Summary | |
---|---|
void |
destroy()
Releases any resources being used. |
Configuration |
getConf()
Returns the configuration of the factory. |
KeyManager[] |
getKeyManagers()
Returns the keymanagers for owned certificates. |
TrustManager[] |
getTrustManagers()
Returns the trustmanagers for trusted certificates. |
void |
init(SSLFactory.Mode mode)
Initializes the keystores of the factory. |
static String |
resolvePropertyName(SSLFactory.Mode mode,
String template)
Resolves a property name to its client/server version if applicable. |
void |
setConf(Configuration conf)
Sets the configuration for the factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SSL_KEYSTORE_LOCATION_TPL_KEY
public static final String SSL_KEYSTORE_PASSWORD_TPL_KEY
public static final String SSL_KEYSTORE_TYPE_TPL_KEY
public static final String SSL_TRUSTSTORE_RELOAD_INTERVAL_TPL_KEY
public static final String SSL_TRUSTSTORE_LOCATION_TPL_KEY
public static final String SSL_TRUSTSTORE_PASSWORD_TPL_KEY
public static final String SSL_TRUSTSTORE_TYPE_TPL_KEY
public static final String DEFAULT_KEYSTORE_TYPE
public static final int DEFAULT_SSL_TRUSTSTORE_RELOAD_INTERVAL
Constructor Detail |
---|
public FileBasedKeyStoresFactory()
Method Detail |
---|
public static String resolvePropertyName(SSLFactory.Mode mode, String template)
mode
- client/server mode.template
- property name template.
public void setConf(Configuration conf)
setConf
in interface Configurable
conf
- the configuration for the factory.public Configuration getConf()
getConf
in interface Configurable
public void init(SSLFactory.Mode mode) throws IOException, GeneralSecurityException
init
in interface KeyStoresFactory
mode
- if the keystores are to be used in client or server mode.
IOException
- thrown if the keystores could not be initialized due
to an IO error.
GeneralSecurityException
- thrown if the keystores could not be
initialized due to a security error.public void destroy()
destroy
in interface KeyStoresFactory
public KeyManager[] getKeyManagers()
getKeyManagers
in interface KeyStoresFactory
public TrustManager[] getTrustManagers()
getTrustManagers
in interface KeyStoresFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |