diff --git a/tests/queries/0_stateless/03174_add_identified_with.reference b/tests/queries/0_stateless/03174_add_identified_with.reference index c2963686d18..3d74469d535 100644 --- a/tests/queries/0_stateless/03174_add_identified_with.reference +++ b/tests/queries/0_stateless/03174_add_identified_with.reference @@ -7,11 +7,7 @@ New password should work Two new passwords were added, should both work 1 1 -Authenticating with ssh key -1 Altering credentials and keeping only bcrypt_password -Asserting SSH does not work anymore -AUTHENTICATION_FAILED Asserting bcrypt_password works 1 Adding new bcrypt_password diff --git a/tests/queries/0_stateless/03174_add_identified_with.sh b/tests/queries/0_stateless/03174_add_identified_with.sh index f13d9e0caf5..2eb71f3a982 100755 --- a/tests/queries/0_stateless/03174_add_identified_with.sh +++ b/tests/queries/0_stateless/03174_add_identified_with.sh @@ -4,14 +4,6 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh -ssh_key="-----BEGIN OPENSSH PRIVATE KEY----- - b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW - QyNTUxOQAAACAc6mt3bktHHukGJM1IJKPVtFMe4u3d8T6LHha8J4WOGAAAAJApc2djKXNn - YwAAAAtzc2gtZWQyNTUxOQAAACAc6mt3bktHHukGJM1IJKPVtFMe4u3d8T6LHha8J4WOGA - AAAEAk15S5L7j85LvmAivo2J8lo44OR/tLILBO1Wb2//mFwBzqa3duS0ce6QYkzUgko9W0 - Ux7i7d3xPoseFrwnhY4YAAAADWFydGh1ckBhcnRodXI= - -----END OPENSSH PRIVATE KEY-----" - function test_login_pwd { ${CLICKHOUSE_CLIENT} --user $1 --password $2 --query "select 1" @@ -46,21 +38,9 @@ test_login_pwd ${user} '3' test_login_pwd ${user} '4' -ssh_pub_key="AAAAC3NzaC1lZDI1NTE5AAAAIBzqa3duS0ce6QYkzUgko9W0Ux7i7d3xPoseFrwnhY4Y" - -${CLICKHOUSE_CLIENT} --query "ALTER USER ${user} ADD IDENTIFIED WITH ssh_key BY KEY '${ssh_pub_key}' TYPE 'ssh-ed25519'" - -echo ${ssh_key} > ssh_key - -echo "Authenticating with ssh key" -${CLICKHOUSE_CLIENT} --user ${user} --ssh-key-file 'ssh_key' --ssh-key-passphrase "" --query "SELECT 1" - echo "Altering credentials and keeping only bcrypt_password" ${CLICKHOUSE_CLIENT} --query "ALTER USER ${user} IDENTIFIED WITH bcrypt_password BY '5'" -echo "Asserting SSH does not work anymore" -${CLICKHOUSE_CLIENT} --user ${user} --ssh-key-file 'ssh_key' --ssh-key-passphrase "" --query "SELECT 1" 2>&1 | grep -m1 -o 'AUTHENTICATION_FAILED' - echo "Asserting bcrypt_password works" test_login_pwd ${user} '5'