Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E83B69DBE for ; Fri, 6 Apr 2012 19:26:09 +0000 (UTC) Received: (qmail 46900 invoked by uid 500); 6 Apr 2012 19:26:09 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 46771 invoked by uid 500); 6 Apr 2012 19:26:09 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 46764 invoked by uid 99); 6 Apr 2012 19:26:09 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2012 19:26:09 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3A5D1B7FD; Fri, 6 Apr 2012 19:26:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rnewson@apache.org To: commits@couchdb.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: COUCHDB-1060 - Fix tests Message-Id: <20120406192609.3A5D1B7FD@tyr.zones.apache.org> Date: Fri, 6 Apr 2012 19:26:09 +0000 (UTC) Updated Branches: refs/heads/master 6a5f32418 -> 7fbf21394 COUCHDB-1060 - Fix tests Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/7fbf2139 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7fbf2139 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7fbf2139 Branch: refs/heads/master Commit: 7fbf213940cd880329578ad322961c7e8d273f91 Parents: bdc0385 Author: Robert Newson Authored: Fri Apr 6 12:24:25 2012 -0400 Committer: Robert Newson Committed: Fri Apr 6 15:25:50 2012 -0400 ---------------------------------------------------------------------- share/www/script/test/cookie_auth.js | 2 ++ share/www/script/test/oauth.js | 2 +- share/www/script/test/replicator_db.js | 10 ++++++++++ share/www/script/test/users_db_security.js | 19 +++++++++++++------ 4 files changed, 26 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/7fbf2139/share/www/script/test/cookie_auth.js ---------------------------------------------------------------------- diff --git a/share/www/script/test/cookie_auth.js b/share/www/script/test/cookie_auth.js index f252524..066af85 100644 --- a/share/www/script/test/cookie_auth.js +++ b/share/www/script/test/cookie_auth.js @@ -278,6 +278,8 @@ couchTests.cookie_auth = function(debug) { [ {section: "couch_httpd_auth", key: "authentication_db", value: "test_suite_users"}, + {section: "couch_httpd_auth", + key: "iterations", value: "1"}, {section: "admins", key: "jan", value: "apple"} ], http://git-wip-us.apache.org/repos/asf/couchdb/blob/7fbf2139/share/www/script/test/oauth.js ---------------------------------------------------------------------- diff --git a/share/www/script/test/oauth.js b/share/www/script/test/oauth.js index 6bc4773..89d3779 100644 --- a/share/www/script/test/oauth.js +++ b/share/www/script/test/oauth.js @@ -105,7 +105,7 @@ couchTests.oauth = function(debug) { headers: { "Authorization": adminBasicAuthHeaderValue() }}); - if (xhr.responseText.indexOf("\"-hashed-") != 0) { + if (xhr.responseText.indexOf("\"-pbkdf2-") != 0) { throw("still waiting"); } }, "wait-for-admin"); http://git-wip-us.apache.org/repos/asf/couchdb/blob/7fbf2139/share/www/script/test/replicator_db.js ---------------------------------------------------------------------- diff --git a/share/www/script/test/replicator_db.js b/share/www/script/test/replicator_db.js index 3795386..48ca341 100644 --- a/share/www/script/test/replicator_db.js +++ b/share/www/script/test/replicator_db.js @@ -579,6 +579,11 @@ couchTests.replicator_db = function(debug) { var server_admins_config = [ { + section: "couch_httpd_auth", + key: "iterations", + value: "1" + }, + { section: "admins", key: "fdmanana", value: "qwerty" @@ -1437,6 +1442,11 @@ couchTests.replicator_db = function(debug) { // run all the tests var server_config = [ { + section: "couch_httpd_auth", + key: "iterations", + value: "1" + }, + { section: "replicator", key: "db", value: repDb.name http://git-wip-us.apache.org/repos/asf/couchdb/blob/7fbf2139/share/www/script/test/users_db_security.js ---------------------------------------------------------------------- diff --git a/share/www/script/test/users_db_security.js b/share/www/script/test/users_db_security.js index 75a4dfa..f8a9d5c 100644 --- a/share/www/script/test/users_db_security.js +++ b/share/www/script/test/users_db_security.js @@ -75,9 +75,9 @@ couchTests.users_db_security = function(debug) { usersDb.deleteDb(); // _users db - // a doc with a field 'password' should be hashed to 'password_sha' + // a doc with a field 'password' should be hashed to 'derived_key' // with salt and salt stored in 'salt', 'password' is set to null. - // Exising 'password_sha' and 'salt' fields are overwritten with new values + // Exising 'derived_key' and 'salt' fields are overwritten with new values // when a non-null 'password' field exists. // anonymous should be able to create a user document var userDoc = { @@ -92,12 +92,17 @@ couchTests.users_db_security = function(debug) { TEquals(true, usersDb.save(userDoc).ok, "should save document"); userDoc = usersDb.open("org.couchdb.user:jchris"); TEquals(undefined, userDoc.password, "password field should be null 1"); - TEquals(40, userDoc.password_sha.length, "password_sha should exist"); + TEquals(40, userDoc.derived_key.length, "derived_key should exist"); TEquals(32, userDoc.salt.length, "salt should exist"); // create server admin run_on_modified_server([ { + section: "couch_httpd_auth", + key: "iterations", + value: "1" + }, + { section: "admins", key: "jan", value: "apple" @@ -131,12 +136,12 @@ couchTests.users_db_security = function(debug) { var jchrisDoc = open_as(usersDb, "org.couchdb.user:jchris", "jchris1"); TEquals(undefined, jchrisDoc.password, "password field should be null 2"); - TEquals(40, jchrisDoc.password_sha.length, "password_sha should exist"); + TEquals(40, jchrisDoc.derived_key.length, "derived_key should exist"); TEquals(32, jchrisDoc.salt.length, "salt should exist"); TEquals(true, userDoc.salt != jchrisDoc.salt, "should have new salt"); - TEquals(true, userDoc.password_sha != jchrisDoc.password_sha, - "should have new password_sha"); + TEquals(true, userDoc.derived_key != jchrisDoc.derived_key, + "should have new derived_key"); // user should not be able to read another user's user document var fdmananaDoc = { @@ -248,6 +253,8 @@ couchTests.users_db_security = function(debug) { usersDb.deleteDb(); run_on_modified_server( [{section: "couch_httpd_auth", + key: "iterations", value: "1"}, + {section: "couch_httpd_auth", key: "authentication_db", value: usersDb.name}], testFun );