Enabling SSL communication in Liberty
To enable SSL communication in Liberty, add the Transport Security feature and specify a keystore configuration. The Transport Layer Security (TLS) protocol supersedes the now deprecated Secure Sockets Layer protocol.
For the most current
information about enabling SSL communication in Liberty, see the Open Liberty website.
- securityLevel attribute
-
Starting with version 26.0.0.5, the securityLevel attribute is ignored.
If the enabledCiphers attribute is not specified or is empty, Liberty uses the effective cipher suites provided by the underlying Java™ SDK when performing the TLS handshake.
If enabledCiphers is specified, Liberty uses either a custom list of cipher suites or a set of filter rules, as described in the following sections.
- enabledCiphers attribute behavior
-
The enabledCiphers attribute now supports two mutually exclusive configuration modes:
- Specify an explicit list of cipher suites.
- Specify filter criteria to add to or remove cipher suites from the Java SDK’s effective cipher suites.
The underlying Java runtime environment (JRE) determines which TLS cipher suites are supported.
- Mode 1: Explicit cipher list (existing behavior)
-
To explicitly control which cipher suites are enabled, specify a space-separated list of cipher suite names.
<ssl id="defaultSSLConfig" enabledCiphers="TLS_AES_128_GCM_SHA256 TLS_AES_256_GCM_SHA384"/>When you use this mode, only the specified cipher suites are enabled for SSL communication. No additional cipher suites are included.
- Mode 2: Cipher filtering (new behavior)
-
Filter mode allows you to modify the Java SDK's effective cipher suites by adding or removing specific cipher suites.
- Prefix a cipher suite with the minus sign (
-) to remove it. - Prefix a cipher suite with the plus sign (
+) to add it. - Separate entries with spaces.
- Use the wildcard character (
*) only with the minus sign (-) and only at the end of a cipher suite prefix. - Do not use wildcards when adding cipher suites. Wildcards are not supported in this configuration.
For example:
<ssl id="defaultSSLConfig" enabledCiphers="-TLS_RSA_* +TLS_AES_128_GCM_SHA256"/>In this example:
- All cipher suites that begin with
TLS_RSA_are removed. - The
TLS_AES_128_GCM_SHA256cipher suite is added if it is supported by the JRE.
- Prefix a cipher suite with the minus sign (