|
|
|
@ -168,37 +168,37 @@ $node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=gss", |
|
|
|
|
"GSS authentication required, fails with trust auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "gss" requirement failed: server did not complete authentication/ |
|
|
|
|
qr/authentication method requirement "gss" failed: server did not complete authentication/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=sspi", |
|
|
|
|
"SSPI authentication required, fails with trust auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "sspi" requirement failed: server did not complete authentication/ |
|
|
|
|
qr/authentication method requirement "sspi" failed: server did not complete authentication/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=password", |
|
|
|
|
"password authentication required, fails with trust auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "password" requirement failed: server did not complete authentication/ |
|
|
|
|
qr/authentication method requirement "password" failed: server did not complete authentication/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=md5", |
|
|
|
|
"MD5 authentication required, fails with trust auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "md5" requirement failed: server did not complete authentication/ |
|
|
|
|
qr/authentication method requirement "md5" failed: server did not complete authentication/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=scram-sha-256", |
|
|
|
|
"SCRAM authentication required, fails with trust auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "scram-sha-256" requirement failed: server did not complete authentication/ |
|
|
|
|
qr/authentication method requirement "scram-sha-256" failed: server did not complete authentication/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=password,scram-sha-256", |
|
|
|
|
"password and SCRAM authentication required, fails with trust auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "password,scram-sha-256" requirement failed: server did not complete authentication/ |
|
|
|
|
qr/authentication method requirement "password,scram-sha-256" failed: server did not complete authentication/ |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
# These negative patterns of require_auth should succeed. |
|
|
|
@ -289,19 +289,19 @@ $node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=md5", |
|
|
|
|
"md5 authentication required, fails with password auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "md5" requirement failed: server requested a cleartext password/ |
|
|
|
|
qr/authentication method requirement "md5" failed: server requested a cleartext password/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=scram-sha-256", |
|
|
|
|
"SCRAM authentication required, fails with password auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "scram-sha-256" requirement failed: server requested a cleartext password/ |
|
|
|
|
qr/authentication method requirement "scram-sha-256" failed: server requested a cleartext password/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=none", |
|
|
|
|
"all authentication forbidden, fails with password auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "none" requirement failed: server requested a cleartext password/ |
|
|
|
|
qr/authentication method requirement "none" failed: server requested a cleartext password/ |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
# Disallowing password authentication fails, even if requested by server. |
|
|
|
@ -313,7 +313,7 @@ $node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=!password,!md5,!scram-sha-256", |
|
|
|
|
"multiple authentication types forbidden, fails with password auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/ method "!password,!md5,!scram-sha-256" requirement failed: server requested a cleartext password/ |
|
|
|
|
qr/ method requirement "!password,!md5,!scram-sha-256" failed: server requested a cleartext password/ |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
# For "scram-sha-256" method, user "scram_role" should be able to connect. |
|
|
|
@ -352,19 +352,19 @@ $node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=password", |
|
|
|
|
"password authentication required, fails with SCRAM auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "password" requirement failed: server requested SASL authentication/ |
|
|
|
|
qr/authentication method requirement "password" failed: server requested SASL authentication/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=md5", |
|
|
|
|
"md5 authentication required, fails with SCRAM auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "md5" requirement failed: server requested SASL authentication/ |
|
|
|
|
qr/authentication method requirement "md5" failed: server requested SASL authentication/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=scram_role require_auth=none", |
|
|
|
|
"all authentication forbidden, fails with SCRAM auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "none" requirement failed: server requested SASL authentication/ |
|
|
|
|
qr/authentication method requirement "none" failed: server requested SASL authentication/ |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
# Authentication fails if SCRAM authentication is forbidden. |
|
|
|
@ -407,19 +407,19 @@ $node->connect_fails( |
|
|
|
|
"user=md5_role require_auth=password", |
|
|
|
|
"password authentication required, fails with MD5 auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "password" requirement failed: server requested a hashed password/ |
|
|
|
|
qr/authentication method requirement "password" failed: server requested a hashed password/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=md5_role require_auth=scram-sha-256", |
|
|
|
|
"SCRAM authentication required, fails with MD5 auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "scram-sha-256" requirement failed: server requested a hashed password/ |
|
|
|
|
qr/authentication method requirement "scram-sha-256" failed: server requested a hashed password/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=md5_role require_auth=none", |
|
|
|
|
"all authentication types forbidden, fails with MD5 auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "none" requirement failed: server requested a hashed password/ |
|
|
|
|
qr/authentication method requirement "none" failed: server requested a hashed password/ |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
# Authentication fails if MD5 is forbidden. |
|
|
|
@ -427,13 +427,13 @@ $node->connect_fails( |
|
|
|
|
"user=md5_role require_auth=!md5", |
|
|
|
|
"password authentication forbidden, fails with MD5 auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "!md5" requirement failed: server requested a hashed password/ |
|
|
|
|
qr/authentication method requirement "!md5" failed: server requested a hashed password/ |
|
|
|
|
); |
|
|
|
|
$node->connect_fails( |
|
|
|
|
"user=md5_role require_auth=!password,!md5,!scram-sha-256", |
|
|
|
|
"multiple authentication types forbidden, fails with MD5 auth", |
|
|
|
|
expected_stderr => |
|
|
|
|
qr/auth method "!password,!md5,!scram-sha-256" requirement failed: server requested a hashed password/ |
|
|
|
|
qr/authentication method requirement "!password,!md5,!scram-sha-256" failed: server requested a hashed password/ |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
# Test SYSTEM_USER <> NULL with parallel workers. |
|
|
|
|