couchdb-documentation icon indicating copy to clipboard operation
couchdb-documentation copied to clipboard

Suggestion: Mention the `roles_claim_name` setting for `jwt_auth`

Open vphpersson opened this issue 3 years ago • 1 comments

I have been using the documentation at https://docs.couchdb.org/en/3.2.2/api/server/authn.html#jwt-authentication as a reference when implementing a JWT authentication flow. Currently, the documentation gives the impression that the private claim that is used for role-based authentication must be called _couchdb.roles, but looking at the code at https://github.com/apache/couchdb/blob/main/src/couch/src/couch_httpd_auth.erl#L240, I found that there is a setting called roles_claim_name that lets one choose the name to use. It seems to have been added in version 3.2.0 (https://docs.couchdb.org/en/3.2.0/whatsnew/3.2.html?highlight=roles_claim_name#features-and-enhancements).

My suggestion is that the roles_claim_name setting is documented in the JWT Authentication section (the first link).

vphpersson avatar Jul 01 '22 17:07 vphpersson