authorizer icon indicating copy to clipboard operation
authorizer copied to clipboard

CouchDB Integration

Open VladimirCores opened this issue 4 years ago • 4 comments

CouchDB already has quite a lot of option to deal with auth, recently they added JWT (gateway) and only missing part is a issuer of this token. Please add. https://docs.couchdb.org/en/main/api/server/authn.html#:~:text=JWT%20authentication%20enables%20CouchDB%20to,JWT's%20%E2%80%9CNONE%E2%80%9D%20algorithm).

VladimirCores avatar Sep 26 '22 16:09 VladimirCores

@VladimirCores thank you for reporting it. I will soon try to integrate this.

lakhansamani avatar Sep 26 '22 18:09 lakhansamani

@lakhansamani I'm picking the couchbase provider integration.

manojown avatar Oct 09 '22 06:10 manojown

Thanks @manojown

lakhansamani avatar Oct 09 '22 08:10 lakhansamani

Authorizer can already be the JWT issuer for CouchDB's JWT authentication, with no extra integration:

  1. Use an asymmetric key: --jwt-type=RS256 with --jwt-private-key / --jwt-public-key (the public key is also published at /.well-known/jwks.json).
  2. Add that public key to CouchDB's [jwt_keys] config.
  3. Set --jwt-role-claim=_couchdb.roles so the roles land in the claim CouchDB reads. This claim is in the ID token. To use the access token instead, add _couchdb.roles with --custom-access-token-script.

(The Couchbase storage backend mentioned above is a separate feature and is also supported.) Closing; reopen if something is missing.

lakhansamani avatar Nov 25 '26 07:11 lakhansamani