You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/08/25 18:45:27 UTC

[GitHub] [couchdb-documentation] big-r81 opened a new pull request, #754: Document new hash_algorithms config key

big-r81 opened a new pull request, #754:
URL: https://github.com/apache/couchdb-documentation/pull/754

   Document the new config parameter `hash_algorithms` from PR https://github.com/apache/couchdb/pull/4140


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-documentation] nickva commented on a diff in pull request #754: Document new hash_algorithms config key

Posted by GitBox <gi...@apache.org>.
nickva commented on code in PR #754:
URL: https://github.com/apache/couchdb-documentation/pull/754#discussion_r956188673


##########
src/config/auth.rst:
##########
@@ -194,6 +194,24 @@ Authentication Configuration
             [chttpd_auth]
             authentication_redirect = /_utils/session.html
 
+    .. config:option:: hash_algorithms :: Supported hash algorithms for cookie auth
+
+        .. versionadded:: 3.3
+
+        Sets the HMAC hash algorithm used for cookie authentication. You can provide a
+        comma-separated list of hash algorithms. New cookie sessions or
+        session updates are calculated with the first hash algorithm. All values in the
+        list can be used to decode the cookie session. ::
+
+            [chttpd_auth]
+            hash_algorithms = sha256, sha
+
+        .. note::
+            The following hash algorithms are supported: ::

Review Comment:
   Since we ship a remsh script that we point to that saying "in the `/bin/remsh` prompt a list of all the available hashes can be retrieved with `crypto:supports(hashs).`"?
   
   Then we could say something like "the common list of available hashes might be `sha, sha224, sha256, sha384, sha512`". In other words we won't mention a few in our documentation as it can be perceived as us endorsing them and such. Explicitly disallowing some is also not a bad idea, like you said.
   
   Another option, since we have the relatively new `GET /_node/_local/_versions` endpoints, is to have the choices listed there in a section about `crypto`? Maybe other TLS parameters choices could go there as well if we have choices when configuring TLS for either the HTTP API or the replicator.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-documentation] big-r81 commented on a diff in pull request #754: Document new hash_algorithms config key

Posted by GitBox <gi...@apache.org>.
big-r81 commented on code in PR #754:
URL: https://github.com/apache/couchdb-documentation/pull/754#discussion_r955685542


##########
src/config/auth.rst:
##########
@@ -194,6 +194,24 @@ Authentication Configuration
             [chttpd_auth]
             authentication_redirect = /_utils/session.html
 
+    .. config:option:: hash_algorithms :: Supported hash algorithms for cookie auth
+
+        .. versionadded:: 3.3
+
+        Sets the HMAC hash algorithm used for cookie authentication. You can provide a
+        comma-separated list of hash algorithms. New cookie sessions or
+        session updates are calculated with the first hash algorithm. All values in the
+        list can be used to decode the cookie session. ::
+
+            [chttpd_auth]
+            hash_algorithms = sha256, sha
+
+        .. note::
+            The following hash algorithms are supported: ::

Review Comment:
   Hi, yeah thats probably a good idea.
   
   My [first idea](https://github.com/apache/couchdb/issues/4119#issuecomment-1206197700) was to have a blacklist for hash algorithms too, but for simplicity and to get the hash algorithm "upgrade" fast implemented, I skipped this. In a next step, we should upgrade the hash algorithm for proxy auth and for hashing the passwords to use this config key too and maybe implement a hash blocker?
   
   So how do we eant to get the user notified about available hash algorithms? Do wo want to show it in the log when CouchDB starts? It depends on the version of the Erlang VM and OpenSSL CouchDB was compiled with.
   
   Can we have something like this:
   ```
   ./couchdb --hash-algorithms
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-documentation] nickva commented on a diff in pull request #754: Document new hash_algorithms config key

Posted by GitBox <gi...@apache.org>.
nickva commented on code in PR #754:
URL: https://github.com/apache/couchdb-documentation/pull/754#discussion_r955365063


##########
src/config/auth.rst:
##########
@@ -194,6 +194,24 @@ Authentication Configuration
             [chttpd_auth]
             authentication_redirect = /_utils/session.html
 
+    .. config:option:: hash_algorithms :: Supported hash algorithms for cookie auth
+
+        .. versionadded:: 3.3
+
+        Sets the HMAC hash algorithm used for cookie authentication. You can provide a
+        comma-separated list of hash algorithms. New cookie sessions or
+        session updates are calculated with the first hash algorithm. All values in the
+        list can be used to decode the cookie session. ::
+
+            [chttpd_auth]
+            hash_algorithms = sha256, sha
+
+        .. note::
+            The following hash algorithms are supported: ::

Review Comment:
   Should we add a note that some Erlang VM/OpenSSL/OS versions may not support all of them? Otherwise users might expect blake2s on centos 7 for instance. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-documentation] big-r81 commented on a diff in pull request #754: Document new hash_algorithms config key

Posted by GitBox <gi...@apache.org>.
big-r81 commented on code in PR #754:
URL: https://github.com/apache/couchdb-documentation/pull/754#discussion_r956205395


##########
src/config/auth.rst:
##########
@@ -194,6 +194,24 @@ Authentication Configuration
             [chttpd_auth]
             authentication_redirect = /_utils/session.html
 
+    .. config:option:: hash_algorithms :: Supported hash algorithms for cookie auth
+
+        .. versionadded:: 3.3
+
+        Sets the HMAC hash algorithm used for cookie authentication. You can provide a
+        comma-separated list of hash algorithms. New cookie sessions or
+        session updates are calculated with the first hash algorithm. All values in the
+        list can be used to decode the cookie session. ::
+
+            [chttpd_auth]
+            hash_algorithms = sha256, sha
+
+        .. note::
+            The following hash algorithms are supported: ::

Review Comment:
   Hi, updated the wording and choices.
   
   Interesting idea with the `_versions` endpoint!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-documentation] nickva commented on a diff in pull request #754: Document new hash_algorithms config key

Posted by GitBox <gi...@apache.org>.
nickva commented on code in PR #754:
URL: https://github.com/apache/couchdb-documentation/pull/754#discussion_r956206450


##########
src/config/auth.rst:
##########
@@ -194,6 +194,24 @@ Authentication Configuration
             [chttpd_auth]
             authentication_redirect = /_utils/session.html
 
+    .. config:option:: hash_algorithms :: Supported hash algorithms for cookie auth
+
+        .. versionadded:: 3.3
+
+        Sets the HMAC hash algorithm used for cookie authentication. You can provide a
+        comma-separated list of hash algorithms. New cookie sessions or
+        session updates are calculated with the first hash algorithm. All values in the
+        list can be used to decode the cookie session. ::
+
+            [chttpd_auth]
+            hash_algorithms = sha256, sha
+
+        .. note::
+            The following hash algorithms are supported: ::

Review Comment:
   The update looks good, +1!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-documentation] nickva commented on a diff in pull request #754: Document new hash_algorithms config key

Posted by GitBox <gi...@apache.org>.
nickva commented on code in PR #754:
URL: https://github.com/apache/couchdb-documentation/pull/754#discussion_r955365063


##########
src/config/auth.rst:
##########
@@ -194,6 +194,24 @@ Authentication Configuration
             [chttpd_auth]
             authentication_redirect = /_utils/session.html
 
+    .. config:option:: hash_algorithms :: Supported hash algorithms for cookie auth
+
+        .. versionadded:: 3.3
+
+        Sets the HMAC hash algorithm used for cookie authentication. You can provide a
+        comma-separated list of hash algorithms. New cookie sessions or
+        session updates are calculated with the first hash algorithm. All values in the
+        list can be used to decode the cookie session. ::
+
+            [chttpd_auth]
+            hash_algorithms = sha256, sha
+
+        .. note::
+            The following hash algorithms are supported: ::

Review Comment:
   Should we add a note that some Erlang VM/OpenSSL/OS versions may not support all of them? Otherwise users might expect blake2s on centos 7 for instance. 
   
   On centos 7 and erlang 23 I see these supported hashes:
   
   ```
   [sha,sha224,sha256,sha384,sha512,md4,md5,ripemd160]
   ```
   
   We should also probably not encourage users to use md4 and md5 hashes for passwords.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-documentation] big-r81 merged pull request #754: Document new hash_algorithms config key

Posted by GitBox <gi...@apache.org>.
big-r81 merged PR #754:
URL: https://github.com/apache/couchdb-documentation/pull/754


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org