summaryrefslogtreecommitdiff
path: root/jstests/auth/auth-counters.js
diff options
context:
space:
mode:
authorAdam Rayner <adam.rayner@gmail.com>2021-11-30 15:23:34 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-30 15:59:51 +0000
commit1f2653f7d2b6d82af56f70e63c79a7cc3ba91d6e (patch)
treebc40ce202887b1481493046d59ebd92fe529e4ab /jstests/auth/auth-counters.js
parent6d8e3308707eab46ebe98d3510e33ba44aa497e2 (diff)
downloadmongo-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.js7
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;