You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2024/09/23 13:20:09 UTC
(couchdb) branch main updated (8c85ec84d -> e4cd640f9)
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
from 8c85ec84d doc: explain holding of 3.4.0 binaries and add rationale for 3.4.1
new adcf7dadc Default upgrade_hash_on_auth to false
new e4cd640f9 Protect 3.4.x branch just like 3.3.x
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.asf.yaml | 3 +++
rel/overlay/etc/default.ini | 2 +-
src/couch/src/couch_password_hasher.erl | 2 +-
src/docs/src/config/auth.rst | 2 +-
test/elixir/test/users_db_security_test.exs | 8 ++++++++
5 files changed, 14 insertions(+), 3 deletions(-)
(couchdb) 02/02: Protect 3.4.x branch just like 3.3.x
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit e4cd640f9f1588366fb50d3da610924a79bbe320
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Mon Sep 23 08:19:49 2024 -0400
Protect 3.4.x branch just like 3.3.x
---
.asf.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.asf.yaml b/.asf.yaml
index f86984984..0ac80da5f 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -38,6 +38,9 @@ github:
strict: true
contexts:
- continuous-integration/jenkins/pr-merge
+ 3.4.x:
+ required_status_checks:
+ strict: true
3.3.x:
required_status_checks:
strict: true
(couchdb) 01/02: Default upgrade_hash_on_auth to false
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit adcf7dadce200b4d3050ae1b89b1a3aa1a7e5f80
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Mon Sep 23 06:49:16 2024 -0400
Default upgrade_hash_on_auth to false
This should let users downgrade from 3.4.0 to 3.3.3 as that would
effectively lock those users out.
---
rel/overlay/etc/default.ini | 2 +-
src/couch/src/couch_password_hasher.erl | 2 +-
src/docs/src/config/auth.rst | 2 +-
test/elixir/test/users_db_security_test.exs | 8 ++++++++
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini
index d9ac6606e..48f16da1a 100644
--- a/rel/overlay/etc/default.ini
+++ b/rel/overlay/etc/default.ini
@@ -336,7 +336,7 @@ bind_address = 127.0.0.1
;max_iterations = 1000000000
;password_scheme = pbkdf2
;pbkdf2_prf = sha256 ; must be one of sha | sha224 | sha256 | sha384 | sha512
-;upgrade_hash_on_auth = true; whether to upgrade password hashes on successful authentication.
+;upgrade_hash_on_auth = false; whether to upgrade password hashes on successful authentication.
; List of Erlang RegExp or tuples of RegExp and an optional error message.
; Where a new password must match all RegExp.
diff --git a/src/couch/src/couch_password_hasher.erl b/src/couch/src/couch_password_hasher.erl
index 90fb15c2b..e24085224 100644
--- a/src/couch/src/couch_password_hasher.erl
+++ b/src/couch/src/couch_password_hasher.erl
@@ -39,7 +39,7 @@
%%%===================================================================
maybe_upgrade_password_hash(AuthModule, UserName, Password, UserProps) ->
- UpgradeEnabled = config:get_boolean("chttpd_auth", "upgrade_hash_on_auth", true),
+ UpgradeEnabled = config:get_boolean("chttpd_auth", "upgrade_hash_on_auth", false),
IsDoc = is_doc(UserProps),
NeedsUpgrade = needs_upgrade(UserProps),
InProgress = in_progress(AuthModule, UserName),
diff --git a/src/docs/src/config/auth.rst b/src/docs/src/config/auth.rst
index ca001d9e4..f8da918b8 100644
--- a/src/docs/src/config/auth.rst
+++ b/src/docs/src/config/auth.rst
@@ -395,7 +395,7 @@ Authentication Configuration
authentication using the current password hashing settings. ::
[chttpd_auth]
- upgrade_hash_on_auth = true
+ upgrade_hash_on_auth = false
.. config:section:: jwt_auth :: JWT Authentication
diff --git a/test/elixir/test/users_db_security_test.exs b/test/elixir/test/users_db_security_test.exs
index 7eddde718..695f33052 100644
--- a/test/elixir/test/users_db_security_test.exs
+++ b/test/elixir/test/users_db_security_test.exs
@@ -336,6 +336,14 @@ defmodule UsersDbSecurityTest do
"3"
})
+ # make changing PRF regenerates derived_key and salt on next
+ # password change
+ set_config({
+ "chttpd_auth",
+ "upgrade_hash_on_auth",
+ "true"
+ })
+
tom_doc5 = Map.put(tom_doc4, "password", "couch")
# 201 if the save does the update, 409 if the async password hasher got there first.
save_as(@users_db, tom_doc5, user: "tom", pwd: "couch", expect_response: [201, 409])