mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
IMPALA-7519: Support elliptic curve ssl ciphers
Thrift's SSLSocketFactory class does not support setting ciphers that use ecdh. This patch modifies our existing subclass of SSLSocketFactory to override the ciphers() method and enable ECDH. The code for this was taken from be/src/kudu/security/tls_context.cc Testing: - Added a custom cluster test that verifies that a cluster with only ECDH ciphers enabled works. Change-Id: I1666ceabec51b425e8a82be1cf519e2ac35fa5a6 Reviewed-on: http://gerrit.cloudera.org:8080/11376 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
committed by
Impala Public Jenkins
parent
89724d8a3a
commit
cf7f221d2f
@@ -107,6 +107,23 @@ class TestClientSsl(CustomClusterTestSuite):
|
||||
assert "Query Status: Cancelled" in result.stdout
|
||||
assert impalad.wait_for_num_in_flight_queries(0)
|
||||
|
||||
# Test that the shell can connect to a ECDH only cluster.
|
||||
TLS_ECDH_ARGS = ("--ssl_client_ca_certificate=%s/server-cert.pem "
|
||||
"--ssl_server_certificate=%s/server-cert.pem "
|
||||
"--ssl_private_key=%s/server-key.pem "
|
||||
"--hostname=localhost " # Required to match hostname in certificate"
|
||||
"--ssl_cipher_list=ECDHE-RSA-AES128-GCM-SHA256 "
|
||||
% (CERT_DIR, CERT_DIR, CERT_DIR))
|
||||
|
||||
@pytest.mark.execute_serially
|
||||
@CustomClusterTestSuite.with_args(impalad_args=TLS_ECDH_ARGS,
|
||||
statestored_args=TLS_ECDH_ARGS,
|
||||
catalogd_args=TLS_ECDH_ARGS)
|
||||
@pytest.mark.skipif(HAS_LEGACY_OPENSSL, reason=SKIP_SSL_MSG)
|
||||
def test_tls_ecdh(self, vector):
|
||||
self._verify_negative_cases()
|
||||
self._validate_positive_cases("%s/server-cert.pem" % self.CERT_DIR)
|
||||
|
||||
# Test that the shell can connect to a TLS1.2 only cluster, and for good measure
|
||||
# restrict the cipher suite to just one choice.
|
||||
TLS_V12_ARGS = ("--ssl_client_ca_certificate=%s/server-cert.pem "
|
||||
|
||||
Reference in New Issue
Block a user