summaryrefslogtreecommitdiff
path: root/src/test/authentication
diff options
context:
space:
mode:
authorJeff Davis2019-09-23 20:45:23 +0000
committerJeff Davis2019-09-23 21:03:35 +0000
commitd6e612f837e235db0411e8b67558c9a6b3e9f41f (patch)
treea677e3cfdfc4f086b5272dcae746af4243d3ea2e /src/test/authentication
parent13cd97e6c8c9679a9b2384c22a4f0333b1a5cc55 (diff)
Add libpq parameter 'channel_binding'.
Allow clients to require channel binding to enhance security against untrusted servers. Author: Jeff Davis Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/227015d8417f2b4fef03f8966dbfa5cbcc4f44da.camel%40j-davis.com
Diffstat (limited to 'src/test/authentication')
-rw-r--r--src/test/authentication/t/001_password.pl12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/test/authentication/t/001_password.pl b/src/test/authentication/t/001_password.pl
index 3a3b0eb7e80..aae6de8b345 100644
--- a/src/test/authentication/t/001_password.pl
+++ b/src/test/authentication/t/001_password.pl
@@ -17,7 +17,7 @@ if ($windows_os)
}
else
{
- plan tests => 8;
+ plan tests => 10;
}
@@ -86,3 +86,13 @@ test_role($node, 'md5_role', 'scram-sha-256', 2);
reset_pg_hba($node, 'md5');
test_role($node, 'scram_role', 'md5', 0);
test_role($node, 'md5_role', 'md5', 0);
+
+# Tests for channel binding without SSL.
+# Using the password authentication method; channel binding can't work
+reset_pg_hba($node, 'password');
+$ENV{"PGCHANNELBINDING"} = 'require';
+test_role($node, 'scram_role', 'scram-sha-256', 2);
+# SSL not in use; channel binding still can't work
+reset_pg_hba($node, 'scram-sha-256');
+$ENV{"PGCHANNELBINDING"} = 'require';
+test_role($node, 'scram_role', 'scram-sha-256', 2);