diff options
| author | Michael Paquier | 2023-08-26 11:11:19 +0000 |
|---|---|---|
| committer | Michael Paquier | 2023-08-26 11:11:19 +0000 |
| commit | e48b19c5db3185e1868391176fc040df08a149fb (patch) | |
| tree | 629aab9d864bcf063743806f57df4fe0784ede9b /src/test/ssl | |
| parent | 1a4fd77db85abac63e178506335aee74625f6499 (diff) | |
Generate new LOG for "trust" connections under log_connections
Adding an extra LOG for connections that have not set an authn ID, like
when the "trust" authentication method is used, is useful for audit
purposes.
A couple of TAP tests for SSL and authentication need to be tweaked to
adapt to this new LOG generated, as some scenarios expected no logs but
they now get a hit.
Reported-by: Shaun Thomas
Author: Jacob Champion
Reviewed-by: Robert Haas, Michael Paquier
Discussion: https://postgr.es/m/CAFdbL1N7-GF-ZXKaB3XuGA+CkSmnjFvqb8hgjMnDfd+uhL2u-A@mail.gmail.com
Diffstat (limited to 'src/test/ssl')
| -rw-r--r-- | src/test/ssl/t/001_ssltests.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl index 76442de063f..23248d71b06 100644 --- a/src/test/ssl/t/001_ssltests.pl +++ b/src/test/ssl/t/001_ssltests.pl @@ -800,8 +800,8 @@ $node->connect_ok( "$common_connstr user=ssltestuser sslcert=ssl/client.crt " . sslkey('client.key'), "auth_option clientcert=verify-full succeeds with matching username and Common Name", - # verify-full does not provide authentication - log_unlike => [qr/connection authenticated:/],); + log_like => + [qr/connection authenticated: user="ssltestuser" method=trust/],); $node->connect_fails( "$common_connstr user=anotheruser sslcert=ssl/client.crt " @@ -818,8 +818,8 @@ $node->connect_ok( "$common_connstr user=yetanotheruser sslcert=ssl/client.crt " . sslkey('client.key'), "auth_option clientcert=verify-ca succeeds with mismatching username and Common Name", - # verify-full does not provide authentication - log_unlike => [qr/connection authenticated:/],); + log_like => + [qr/connection authenticated: user="yetanotheruser" method=trust/],); # intermediate client_ca.crt is provided by client, and isn't in server's ssl_ca_file switch_server_cert($node, certfile => 'server-cn-only', cafile => 'root_ca'); |
