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 2021/11/19 17:11:58 UTC

[GitHub] [couchdb] mtenrero opened a new issue #3839: JWT Authentication: bad_request Not a valid key error

mtenrero opened a new issue #3839:
URL: https://github.com/apache/couchdb/issues/3839


   When trying to perform a JWT login, with iss, and kid certificates configured, the cluster always return 
   
   400
   ```json
   {
     "error": "bad_request",
     "reason": "Not a valid key"
   }
   ```
   
   ## Description
   
   ## Steps to Reproduce
   
   3.2.1 CouchDB Docker image
   
   jwt config:
   
   ```toml
   [chttpd]                                                                                                                                                   │
   │ authentication_handlers = {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, jwt_authentication_handler}, {chttpd_auth, default_authentication_ha │
   │ ndler}, {chttpd_auth, proxy_authentication_handler}
   
   [jwt_keys]
   rsa:<redacted> = <pem_redacted>
   ```
   
   curl example:
   ```bash
   curl --request GET \
     --url https://<redacted>/_session \
     --header 'Authorization: Bearer <redacted>'
   ```
   
   ## Expected Behaviour
   
   It should authenticate with JWT token.
   ## Your Environment
   
   
   * CouchDB version used: 3.2.0
   * Operating system and version: Kubernetes 1.21


-- 
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] mtenrero commented on issue #3839: JWT Authentication: bad_request Not a valid key error

Posted by GitBox <gi...@apache.org>.
mtenrero commented on issue #3839:
URL: https://github.com/apache/couchdb/issues/3839#issuecomment-974364744


   We can close this, I could find the answer digging into the code, it seems that the PEM key was not properly formatted, [http://mail-archives.apache.org/mod_mbox/couchdb-commits/202003.mbox/%3C20200330115136.9E68281A0A@gitbox.apache.org%3E](http://mail-archives.apache.org/mod_mbox/couchdb-commits/202003.mbox/%3C20200330115136.9E68281A0A@gitbox.apache.org%3E)
   
   


-- 
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] mtenrero closed issue #3839: JWT Authentication: bad_request Not a valid key error

Posted by GitBox <gi...@apache.org>.
mtenrero closed issue #3839:
URL: https://github.com/apache/couchdb/issues/3839


   


-- 
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