diff options
author | Adam Rayner <adam.rayner@gmail.com> | 2021-11-30 15:23:34 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-11-30 15:59:51 +0000 |
commit | 1f2653f7d2b6d82af56f70e63c79a7cc3ba91d6e (patch) | |
tree | bc40ce202887b1481493046d59ebd92fe529e4ab /jstests/auth/auth-counters.js | |
parent | 6d8e3308707eab46ebe98d3510e33ba44aa497e2 (diff) | |
download | mongo-1f2653f7d2b6d82af56f70e63c79a7cc3ba91d6e.tar.gz |
Revert "SERVER-46399 remove fallback SCRAM-SHA-1 for internalSecurity.user
Diffstat (limited to 'jstests/auth/auth-counters.js')
-rw-r--r-- | jstests/auth/auth-counters.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/jstests/auth/auth-counters.js b/jstests/auth/auth-counters.js index b74fa531725..aa42042e0ef 100644 --- a/jstests/auth/auth-counters.js +++ b/jstests/auth/auth-counters.js @@ -64,7 +64,7 @@ function assertFailure(creds, mech, db = test) { } function assertSuccessInternal() { - const mech = "SCRAM-SHA-256"; + const mech = "SCRAM-SHA-1"; // asCluster exiting cleanly indicates successful auth assert.eq(authutil.asCluster(replTest.nodes, keyfile, () => true), true); ++expected[mech].authenticate.received; @@ -75,11 +75,8 @@ function assertSuccessInternal() { assertSuccess({user: 'admin', pwd: 'pwd'}, 'SCRAM-SHA-256', admin); } -// Because authutil.asCluster utilizes SCRAM-SHA-256 as a default keyfile mechanism, we will attempt -// to record this authentication with an invalid keyfile, and then verify that the # of -// successful attempts made using the fallback (SCRAM-SHA-256) has NOT been incremented function assertFailureInternal() { - const mech = "SCRAM-SHA-256"; + const mech = "SCRAM-SHA-1"; // If asCluster fails, it explodes. assert.throws(authutil.asCluster, [replTest.nodes, badKeyfile, () => true]); ++expected[mech].authenticate.received; |