You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2021/07/22 16:15:07 UTC
[couchdb-documentation] branch main updated: Add documentation for
password_regexp (#652)
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git
The following commit(s) were added to refs/heads/main by this push:
new 7d1704d Add documentation for password_regexp (#652)
7d1704d is described below
commit 7d1704d169bbd7fdbc3717555bdb2fa8bcb397bc
Author: Christopher <ch...@icloud.com>
AuthorDate: Thu Jul 22 18:15:00 2021 +0200
Add documentation for password_regexp (#652)
* Add documentation for password_regexp
Co-authored-by: Joan Touzet <wo...@users.noreply.github.com>
---
src/config/auth.rst | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/config/auth.rst b/src/config/auth.rst
index cd8e4e9..39cfb73 100644
--- a/src/config/auth.rst
+++ b/src/config/auth.rst
@@ -227,6 +227,25 @@ Authentication Configuration
[chttpd_auth]
max_iterations = 100000
+ .. config:option:: password_regexp :: Password regular expressions
+
+ .. versionadded:: 3.2
+
+ A list of
+ `Regular Expressions <https://erlang.org/doc/man/re.html#regexp_syntax>`_
+ to check new/changed passwords.
+ When set, new user passwords must **match** all RegExp in this list.
+
+ A RegExp can be paired with a *reason text*:
+ ``[{"RegExp", "reason text"}, ...]``.
+ If a RegExp doesn't match, its *reason text* will be appended to the
+ default reason of ``Password does not conform to requirements.`` ::
+
+ [couch_httpd_auth]
+ ; Password must be 10 chars long and have one or more uppercase and
+ ; lowercase char and one or more numbers.
+ password_regexp = [{".{10,}", "Min length is 10 chars."}, "[A-Z]+", "[a-z]+", "\\d+"]
+
.. config:option:: proxy_use_secret :: Force proxy auth to use secret token
.. versionchanged:: 3.2 moved from [couch_httpd_auth] to [chttpd_auth] section