summaryrefslogtreecommitdiff
path: root/jstests/auth/iteration_count_control.js
diff options
context:
space:
mode:
authorAndreas Nilsson <andreas.nilsson@10gen.com>2014-12-02 15:42:26 -0500
committerAndreas Nilsson <andreas.nilsson@10gen.com>2014-12-02 15:42:26 -0500
commita6a420f7f68dea6ee86f8dfbf91cdf6e07916eb8 (patch)
tree178642ec33dbd4c61b0c5fa53056723ad2a57b3e /jstests/auth/iteration_count_control.js
parentd698427a79eed6538b16733463f34e70bcea6a1d (diff)
downloadmongo-a6a420f7f68dea6ee86f8dfbf91cdf6e07916eb8.tar.gz
Revert "SERVER-16002 SERVER-16369 Cluster / standalone auth tests."
This reverts commit 11b2d7b6051766674c2d66c86d9f23d0befdee09.
Diffstat (limited to 'jstests/auth/iteration_count_control.js')
-rw-r--r--jstests/auth/iteration_count_control.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/jstests/auth/iteration_count_control.js b/jstests/auth/iteration_count_control.js
deleted file mode 100644
index 9fe12e24019..00000000000
--- a/jstests/auth/iteration_count_control.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// Test SCRAM iterationCount control.
-load('./jstests/multiVersion/libs/auth_helpers.js');
-
-var conn = MongoRunner.runMongod({auth: ''});
-
-var testIterationCountControl = function(){
- var adminDB = conn.getDB('admin');
- adminDB.createUser({user: 'user1', pwd: 'pass',
- roles: jsTest.adminUserRoles});
- assert(adminDB.auth({user: 'user1', pwd: 'pass'}));
-
- var userDoc = getUserDoc(adminDB, 'user1');
- assert.eq(10000, userDoc.credentials['SCRAM-SHA-1'].iterationCount);
-
- // Changing iterationCount should not affect existing users.
- assert.commandWorked(adminDB.runCommand({setParameter: 1,
- scramIterationCount: 5000}));
- userDoc = getUserDoc(adminDB, 'user1');
- assert.eq(10000, userDoc.credentials['SCRAM-SHA-1'].iterationCount);
-
- // But it should take effect when the user's password is changed.
- adminDB.updateUser('user1', {pwd: 'pass',
- roles: jsTest.adminUserRoles});
- userDoc = getUserDoc(adminDB, 'user1');
- assert.eq(5000, userDoc.credentials['SCRAM-SHA-1'].iterationCount);
-
- // Test invalid values for iterationCount. 5000 is the minimum value.
- assert.commandFailed(adminDB.runCommand({setParameter: 1,
- scramIterationCount: 4999}));
- assert.commandFailed(adminDB.runCommand({setParameter: 1,
- scramIterationCount: -5000}));
- assert.commandFailed(adminDB.runCommand(
- {setParameter: 1, scramIterationCount: 12345678901234567890}));
-}
-
-testIterationCountControl();
-MongoRunner.stopMongod(conn);