이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 4. Configuring HTTPS Cipher Suites
Abstract
This chapter explains how to specify the list of cipher suites that are made available to clients and servers for the purpose of establishing HTTPS connections. During a security handshake, the client chooses a cipher suite that matches one of the cipher suites available to the server.
4.1. Supported Cipher Suites 링크 복사링크가 클립보드에 복사되었습니다!
Overview 링크 복사링크가 클립보드에 복사되었습니다!
A cipher suite is a collection of security algorithms that determine precisely how an SSL/TLS connection is implemented.
For example, the SSL/TLS protocol mandates that messages be signed using a message digest algorithm. The choice of digest algorithm, however, is determined by the particular cipher suite being used for the connection. Typically, an application can choose either the MD5 or the SHA digest algorithm.
The cipher suites available for SSL/TLS security in Apache CXF depend on the particular JSSE provider that is specified on the endpoint.
JCE/JSSE and security providers 링크 복사링크가 클립보드에 복사되었습니다!
The Java Cryptography Extension (JCE) and the Java Secure Socket Extension (JSSE) constitute a pluggable framework that allows you to replace the Java security implementation with arbitrary third-party toolkits, known as security providers.
SunJSSE provider 링크 복사링크가 클립보드에 복사되었습니다!
In practice, the security features of Apache CXF have been tested only with SUN’s JSSE provider, which is named SunJSSE
.
Hence, the SSL/TLS implementation and the list of available cipher suites in Apache CXF are effectively determined by what is available from SUN’s JSSE provider.
Cipher suites supported by SunJSSE 링크 복사링크가 클립보드에 복사되었습니다!
The following cipher suites are supported by SUN’s JSSE provider in the J2SE 1.5.0 Java development kit (see also Appendix A of SUN’s JSSE Reference Guide):
Standard ciphers:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Null encryption, integrity-only ciphers:
SSL_RSA_WITH_NULL_MD5 SSL_RSA_WITH_NULL_SHA
SSL_RSA_WITH_NULL_MD5 SSL_RSA_WITH_NULL_SHA
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Anonymous Diffie-Hellman ciphers (no authentication):
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
JSSE reference guide 링크 복사링크가 클립보드에 복사되었습니다!
For more information about SUN’s JSSE framework, please consult the JSSE Reference Guide at the following location:
http://download.oracle.com/javase/1.5.0/docs/guide/security/jsse/JSSERefGuide.html
4.2. Cipher Suite Filters 링크 복사링크가 클립보드에 복사되었습니다!
Overview 링크 복사링크가 클립보드에 복사되었습니다!
In a typical application, you usually want to restrict the list of available cipher suites to a subset of the ciphers supported by the JSSE provider.
Generally, you should use the sec:cipherSuitesFilter
element, instead of the sec:cipherSuites
element to select the cipher suites you want to use.
The sec:cipherSuites
element is not recommended for general use, because it has rather non-intuitive semantics: you can use it to require that the loaded security provider supports at least the listed cipher suites. But the security provider that is loaded might support many more cipher suites than the ones that are specified. Hence, when you use the sec:cipherSuites
element, it is not clear exactly which cipher suites are supported at run time.
Namespaces 링크 복사링크가 클립보드에 복사되었습니다!
Table 4.1, “Namespaces Used for Configuring Cipher Suite Filters” shows the XML namespaces that are referenced in this section:
Prefix | Namespace URI |
---|---|
| |
| |
|
sec:cipherSuitesFilter element 링크 복사링크가 클립보드에 복사되었습니다!
You define a cipher suite filter using the sec:cipherSuitesFilter
element, which can be a child of either a http:tlsClientParameters
element or a httpj:tlsServerParameters
element. A typical sec:cipherSuitesFilter
element has the outline structure shown in Example 4.1, “Structure of a sec:cipherSuitesFilter Element” .
Example 4.1. Structure of a sec:cipherSuitesFilter Element
Semantics 링크 복사링크가 클립보드에 복사되었습니다!
The following semantic rules apply to the sec:cipherSuitesFilter
element:
If a
sec:cipherSuitesFilter
element does not appear in an endpoint’s configuration (that is, it is absent from the relevanthttp:conduit
orhttpj:engine-factory
element), the following default filter is used:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
If the
sec:cipherSuitesFilter
element does appear in an endpoint’s configuration, all cipher suites are excluded by default. -
To include cipher suites, add a
sec:include
child element to thesec:cipherSuitesFilter
element. The content of thesec:include
element is a regular expression that matches one or more cipher suite names (for example, see the cipher suite names in the section called “Cipher suites supported by SunJSSE”). To refine the selected set of cipher suites further, you can add a
sec:exclude
element to thesec:cipherSuitesFilter
element. The content of thesec:exclude
element is a regular expression that matches zero or more cipher suite names from the currently included set.NoteSometimes it makes sense to explicitly exclude cipher suites that are currently not included, in order to future-proof against accidental inclusion of undesired cipher suites.
Regular expression matching 링크 복사링크가 클립보드에 복사되었습니다!
The grammar for the regular expressions that appear in the sec:include
and sec:exclude
elements is defined by the Java regular expression utility, java.util.regex.Pattern
. For a detailed description of the grammar, please consult the Java reference guide, http://download.oracle.com/javase/1.5.0/docs/api/java/util/regex/Pattern.html.
Client conduit example 링크 복사링크가 클립보드에 복사되었습니다!
The following XML configuration shows an example of a client that applies a cipher suite filter to the remote endpoint, {
WSDLPortNamespace}
PortName. Whenever the client attempts to open an SSL/TLS connection to this endpoint, it restricts the available cipher suites to the set selected by the sec:cipherSuitesFilter
element.
4.3. SSL/TLS Protocol Version 링크 복사링크가 클립보드에 복사되었습니다!
Overview 링크 복사링크가 클립보드에 복사되었습니다!
The versions of the SSL/TLS protocol that are supported by Apache CXF depend on the particular JSSE provider configured. By default, the JSSE provider is configured to be SUN’s JSSE provider implementation.
If you enable SSL/TLS security, you must ensure that you explicitly disable the SSLv3 protocol, in order to safeguard against the Poodle vulnerability (CVE-2014-3566). For more details, see Disabling SSLv3 in JBoss Fuse 6.x and JBoss A-MQ 6.x.
SSL/TLS protocol versions supported by SunJSSE 링크 복사링크가 클립보드에 복사되었습니다!
Table 4.2, “SSL/TLS Protocols Supported by SUN’s JSSE Provider” shows the SSL/TLS protocol versions supported by SUN’s JSSE provider.
Protocol | Description |
---|---|
| Do not use! (POODLE security vulnerability) |
| Do not use! (POODLE security vulnerability) |
| Supports TLS version 1 |
| Supports TLS version 1.1 (JDK 7 or later) |
| Supports TLS version 1.2 (JDK 7 or later) |
Excluding specific SSL/TLS protocol versions 링크 복사링크가 클립보드에 복사되었습니다!
By default, all of the SSL/TLS protocols provided by the JSSE provider are available to the CXF endpoints (except for the SSLv2Hello
and SSLv3
protocols, which have been specifically excluded by the CXF runtime since Fuse version 6.2.0, because of the Poodle vulnerability (CVE-2014-3566)).
To exclude specific SSL/TLS protocols, use the sec:excludeProtocols
element in the endpoint configuration. You can configure the sec:excludeProtocols
element as a child of the httpj:tlsServerParameters
element (server side).
To exclude all protocols except for TLS version 1.2, configure the sec:excludeProtocols
element as follows (assuming you are using JDK 7 or later):
It is recommended that you always exclude the SSLv2Hello
and SSLv3
protocols, to protect against the Poodle vulnerability (CVE-2014-3566).
secureSocketProtocol attribute 링크 복사링크가 클립보드에 복사되었습니다!
Both the http:tlsClientParameters
element and the httpj:tlsServerParameters
element support the secureSocketProtocol
attribute, which enables you to specify a particular protocol.
The semantics of this attribute are confusing, however: this attribute forces CXF to pick an SSL provider that supports the specified protocol, but it does not restrict the provider to use only the specified protocol. Hence, the endpoint could end up using a protocol that is different from the one specified. For this reason, the recommendation is that you do not use the secureSocketProtocol
attribute in your code.