public interface TlsConfiguration
SSLContexts.| Modifier and Type | Field and Description |
|---|---|
static String |
JAVA_11_MAX_SUPPORTED_TLS_PROTOCOL_VERSION |
static String[] |
JAVA_11_SUPPORTED_TLS_PROTOCOL_VERSIONS |
static String |
JAVA_8_MAX_SUPPORTED_TLS_PROTOCOL_VERSION |
static String[] |
JAVA_8_SUPPORTED_TLS_PROTOCOL_VERSIONS |
static String[] |
LEGACY_TLS_PROTOCOL_VERSIONS |
static String |
SSL_PROTOCOL |
static String |
TLS_1_0_PROTOCOL |
static String |
TLS_1_1_PROTOCOL |
static String |
TLS_1_2_PROTOCOL |
static String |
TLS_PROTOCOL |
| Modifier and Type | Method and Description |
|---|---|
static String[] |
getCurrentSupportedTlsProtocolVersions()
Returns a
String[] of supported TLS protocol versions based on the current Java platform version. |
String[] |
getEnabledProtocols()
Get Enabled TLS Protocol Versions
|
String |
getFunctionalKeyPassword()
Returns the "working" key password -- if the key password is populated, it is returned; otherwise the
getKeystorePassword() is returned. |
String |
getFunctionalKeyPasswordForLogging()
Returns
"********" if the functional key password is populated, "null" if not. |
static String |
getHighestCurrentSupportedTlsProtocolVersion()
Returns the highest supported TLS protocol version based on the current Java platform version.
|
static int |
getJavaVersion()
Returns the JVM Java major version based on the System properties (e.g.
|
String |
getKeyPassword() |
String |
getKeyPasswordForLogging()
Returns
"********" if the key password is populated, "null" if not. |
String |
getKeystorePassword() |
String |
getKeystorePasswordForLogging()
Returns
"********" if the keystore password is populated, "null" if not. |
String |
getKeystorePath() |
String[] |
getKeystorePropertiesForLogging()
Returns a
String[] containing the keystore properties for logging. |
KeystoreType |
getKeystoreType() |
String |
getProtocol() |
String |
getTruststorePassword() |
String |
getTruststorePasswordForLogging()
Returns
"********" if the truststore password is populated, "null" if not. |
String |
getTruststorePath() |
String[] |
getTruststorePropertiesForLogging()
Returns a
String[] containing the truststore properties for logging. |
KeystoreType |
getTruststoreType() |
boolean |
isAnyKeystorePopulated()
Returns
true if any of the keystore properties is populated, indicating that the caller expects a valid keystore to be generated. |
boolean |
isAnyTruststorePopulated()
Returns
true if any of the truststore properties is populated, indicating that the caller expects a valid truststore to be generated. |
static boolean |
isEmpty(TlsConfiguration tlsConfiguration)
Returns
true if the provided TlsConfiguration is null or empty
(i.e. |
boolean |
isKeystorePopulated()
Returns
true if the necessary properties are populated to instantiate a keystore. |
boolean |
isKeystoreValid()
Returns
true if the necessary properties are populated and the keystore can be successfully instantiated (i.e. |
boolean |
isTruststorePopulated()
Returns
true if the necessary properties are populated to instantiate a truststore. |
boolean |
isTruststoreValid()
Returns
true if the necessary properties are populated and the truststore can be successfully instantiated (i.e. |
static int |
parseJavaVersion(String version)
Returns the major version parsed from the provided Java version string (e.g.
|
static final String SSL_PROTOCOL
static final String TLS_PROTOCOL
static final String TLS_1_0_PROTOCOL
static final String TLS_1_1_PROTOCOL
static final String TLS_1_2_PROTOCOL
static final String[] LEGACY_TLS_PROTOCOL_VERSIONS
static final String JAVA_8_MAX_SUPPORTED_TLS_PROTOCOL_VERSION
static final String JAVA_11_MAX_SUPPORTED_TLS_PROTOCOL_VERSION
static final String[] JAVA_8_SUPPORTED_TLS_PROTOCOL_VERSIONS
static final String[] JAVA_11_SUPPORTED_TLS_PROTOCOL_VERSIONS
static boolean isEmpty(TlsConfiguration tlsConfiguration)
true if the provided TlsConfiguration is null or empty
(i.e. neither any of the keystore nor truststore properties are populated).tlsConfiguration - the container object to checkString getKeystorePath()
String getKeystorePassword()
String getKeystorePasswordForLogging()
"********" if the keystore password is populated, "null" if not.String getKeyPassword()
String getKeyPasswordForLogging()
"********" if the key password is populated, "null" if not.String getFunctionalKeyPassword()
getKeystorePassword() is returned.String getFunctionalKeyPasswordForLogging()
"********" if the functional key password is populated, "null" if not.KeystoreType getKeystoreType()
String getTruststorePath()
String getTruststorePassword()
String getTruststorePasswordForLogging()
"********" if the truststore password is populated, "null" if not.KeystoreType getTruststoreType()
String getProtocol()
boolean isKeystorePopulated()
true if the necessary properties are populated to instantiate a keystore. This does not validate the values (see isKeystoreValid()).boolean isAnyKeystorePopulated()
true if any of the keystore properties is populated, indicating that the caller expects a valid keystore to be generated.boolean isKeystoreValid()
true if the necessary properties are populated and the keystore can be successfully instantiated (i.e. the path is valid and the password(s) are correct).boolean isTruststorePopulated()
true if the necessary properties are populated to instantiate a truststore. This does not validate the values (see isTruststoreValid()).boolean isAnyTruststorePopulated()
true if any of the truststore properties is populated, indicating that the caller expects a valid truststore to be generated.boolean isTruststoreValid()
true if the necessary properties are populated and the truststore can be successfully instantiated (i.e. the path is valid and the password is correct).String[] getKeystorePropertiesForLogging()
String[] containing the keystore properties for logging. The order is
getKeystorePath(), getKeystorePasswordForLogging(),
getFunctionalKeyPasswordForLogging(), getKeystoreType() (using the type or "null").String[] getTruststorePropertiesForLogging()
String[] containing the truststore properties for logging. The order is
getTruststorePath(), getTruststorePasswordForLogging(),
getTruststoreType() (using the type or "null").String[] getEnabledProtocols()
static int getJavaVersion()
JVM 1.8.0.231 -> {code 8}).static int parseJavaVersion(String version)
"1.8.0.231" -> 8).version - the Java version stringstatic String[] getCurrentSupportedTlsProtocolVersions()
String[] of supported TLS protocol versions based on the current Java platform version.static String getHighestCurrentSupportedTlsProtocolVersion()
"TLSv1.2")Copyright © 2021 Apache NiFi Project. All rights reserved.