You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2022/10/17 22:24:28 UTC

[trafficserver] branch 9.2.x updated: AuTest automatic keylog file configuration (#9137)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
     new 6344a2230 AuTest automatic keylog file configuration (#9137)
6344a2230 is described below

commit 6344a22307250fd535f4f1fd62d0d7d74de21440
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Wed Oct 12 20:13:17 2022 -0500

    AuTest automatic keylog file configuration (#9137)
    
    (cherry picked from commit feac204ecc062d87c21b85cfdafb50fbab05a6c7)
---
 tests/gold_tests/autest-site/trafficserver.test.ext         | 8 ++++++++
 tests/gold_tests/forward_proxy/forward_proxy.test.py        | 1 -
 tests/gold_tests/h2/http2_flow_control.test.py              | 1 -
 tests/gold_tests/pluginTest/multiplexer/multiplexer.test.py | 1 -
 tests/gold_tests/tls/tls_session_key_logging.test.py        | 4 ++++
 5 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/tests/gold_tests/autest-site/trafficserver.test.ext b/tests/gold_tests/autest-site/trafficserver.test.ext
index a6881f056..358ec036c 100755
--- a/tests/gold_tests/autest-site/trafficserver.test.ext
+++ b/tests/gold_tests/autest-site/trafficserver.test.ext
@@ -318,6 +318,14 @@ def MakeATSProcess(obj, name, command='traffic_server', select_ports=True,
     get_port(p, "manager_port")
     get_port(p, "admin_port")
 
+    if enable_tls or enable_quic:
+        fname = "tls_session_keys.txt"
+        tmpname = os.path.join(log_dir, fname)
+        p.Disk.File(tmpname, id='tls_session_keys')
+        p.Disk.records_config.update({
+            'proxy.config.ssl.keylog_file': tmpname,
+        })
+
     if enable_cache:
         # In records.config, the cache is enabled by default so there's nothing
         # we have to do here to functionally enable it. However, the tests that
diff --git a/tests/gold_tests/forward_proxy/forward_proxy.test.py b/tests/gold_tests/forward_proxy/forward_proxy.test.py
index d631b874c..14e64b69f 100644
--- a/tests/gold_tests/forward_proxy/forward_proxy.test.py
+++ b/tests/gold_tests/forward_proxy/forward_proxy.test.py
@@ -68,7 +68,6 @@ class ForwardProxyTest:
             'proxy.config.ssl.server.cert.path': self.ts.Variables.SSLDir,
             'proxy.config.ssl.server.private_key.path': self.ts.Variables.SSLDir,
             'proxy.config.ssl.client.verify.server.policy': 'PERMISSIVE',
-            'proxy.config.ssl.keylog_file': '/tmp/keylog.txt',
 
             'proxy.config.diags.debug.enabled': 1,
             'proxy.config.diags.debug.tags': "http",
diff --git a/tests/gold_tests/h2/http2_flow_control.test.py b/tests/gold_tests/h2/http2_flow_control.test.py
index 78b087fe2..babb1a405 100644
--- a/tests/gold_tests/h2/http2_flow_control.test.py
+++ b/tests/gold_tests/h2/http2_flow_control.test.py
@@ -107,7 +107,6 @@ class Http2FlowControlTest:
             'proxy.config.ssl.server.private_key.path': f'{ts.Variables.SSLDir}',
             'proxy.config.ssl.client.verify.server.policy': 'PERMISSIVE',
             'proxy.config.dns.nameservers': '127.0.0.1:{0}'.format(self._dns.Variables.Port),
-            'proxy.config.ssl.keylog_file': os.path.join(Test.RunDirectory, 'tls_session_keys.txt'),
 
             'proxy.config.diags.debug.enabled': 3,
             'proxy.config.diags.debug.tags': 'http',
diff --git a/tests/gold_tests/pluginTest/multiplexer/multiplexer.test.py b/tests/gold_tests/pluginTest/multiplexer/multiplexer.test.py
index 4fcb1437b..da75733fd 100644
--- a/tests/gold_tests/pluginTest/multiplexer/multiplexer.test.py
+++ b/tests/gold_tests/pluginTest/multiplexer/multiplexer.test.py
@@ -111,7 +111,6 @@ class MultiplexerTestBase:
             "proxy.config.ssl.server.cert.path": f'{self.ts.Variables.SSLDir}',
             "proxy.config.ssl.server.private_key.path": f'{self.ts.Variables.SSLDir}',
             "proxy.config.ssl.client.verify.server.policy": 'PERMISSIVE',
-            'proxy.config.ssl.keylog_file': '/tmp/tls_session_keys.txt',
 
             'proxy.config.diags.debug.enabled': 1,
             'proxy.config.diags.debug.tags': 'multiplexer',
diff --git a/tests/gold_tests/tls/tls_session_key_logging.test.py b/tests/gold_tests/tls/tls_session_key_logging.test.py
index 1720cf697..a96bbbe40 100644
--- a/tests/gold_tests/tls/tls_session_key_logging.test.py
+++ b/tests/gold_tests/tls/tls_session_key_logging.test.py
@@ -66,6 +66,10 @@ class TlsKeyloggingTest:
 
         keylog_file = os.path.join(self.ts.Variables.LOGDIR, "tls_secrets.txt")
 
+        # Remove the keylog_file configuration automatically configured via the
+        # trafficserver AuTest extension.
+        del self.ts.Disk.records_config['proxy.config.ssl.keylog_file']
+
         if enable_secrets_logging:
             self.ts.Disk.records_config.update({
                 'proxy.config.ssl.keylog_file': keylog_file,