You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "H--o-l (via GitHub)" <gi...@apache.org> on 2024/10/21 14:52:09 UTC
[I] CouchDB v3.4.1 return 403 on GET /_session with a wrong password [couchdb]
H--o-l opened a new issue, #5315:
URL: https://github.com/apache/couchdb/issues/5315
## Description
This morning I upgraded one node of my CouchDB cluster node to v3.4.1 while the two other nodes of the cluster are still on CouchDB v3.3.3.
Since then, I have had multiple exceptions on my backend related to users using the wrong password and CouchDB returning an HTTP status 403 instead of the usual HTTP status 401.
Usually, I catch the 401 to return a nice message to users so they can understand what's wrong. But since the update, for some users (not all users and I don't know why on these users specifically) CouchDB returns an unexpected 403 on the `GET /_session`. This has pushed me to create a temporary urgent release where I catch both the 401 and the 403 to return a nice error in both cases.
[The CouchDB documentation for v3.4.1 is explicit](https://docs.couchdb.org/en/3.4.1/api/server/authn.html#get--_session): the route should only return HTTP 200 or HTTP 401, not HTTP 403.
## Steps to Reproduce
I don't know for sure, I wasn't able to code a reproducer, it happens only on my production servers. There is something on the production cluster that makes the case appear:
- maybe it's the fact of having one node on v3.4.1 and the two others on v3.3.3?
- maybe it's something user-specific? But I don't know what specificities to look at.
## Expected Behaviour
`GET /_session` should always return HTTP 200 or HTTP 401, never HTTP 403.
## Your Environment
[TIP]: # ( Include as many relevant details about your environment as possible. )
[TIP]: # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
* CouchDB version used: v3.4.1 and v3.3.3. The error occurs only on `GET /_session` made on the v3.4.1 node.
* Browser name and version: NA
* Operating system and version: NA
## Additional Context
I don't know, you tell me!
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CouchDB v3.4.1 return 403 on GET /_session with a wrong password [couchdb]
Posted by "iilyak (via GitHub)" <gi...@apache.org>.
iilyak commented on issue #5315:
URL: https://github.com/apache/couchdb/issues/5315#issuecomment-2426960395
This is a feature added recently https://github.com/apache/couchdb/blob/main/rel/overlay/etc/default.ini#L1074. Probably the API docs need to be updated.
\cc @rnewson
--
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
Re: [I] CouchDB v3.4.1 return 403 on GET /_session with a wrong password [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on issue #5315:
URL: https://github.com/apache/couchdb/issues/5315#issuecomment-2427009998
The new lockout support was documented in the changelog (https://docs.couchdb.org/en/stable/whatsnew/3.4.html), but we (_I_) didn't update the api docs to list 403 as a possibility for all endpoints, we'll sort that out.
--
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
Re: [I] CouchDB v3.4.1 return 403 on GET /_session with a wrong password [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on issue #5315:
URL: https://github.com/apache/couchdb/issues/5315#issuecomment-2426974822
agree, the docs need updating. what a chore :(
--
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
Re: [I] CouchDB v3.4.1 return 403 on GET /_session with a wrong password [couchdb]
Posted by "H--o-l (via GitHub)" <gi...@apache.org>.
H--o-l commented on issue #5315:
URL: https://github.com/apache/couchdb/issues/5315#issuecomment-2427027325
OK, my bad, thanks for the answer. I let you see then, and you can close the issue when you want :+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
Re: [I] CouchDB v3.4.1 return 403 on GET /_session with a wrong password [couchdb]
Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 closed issue #5315: CouchDB v3.4.1 return 403 on GET /_session with a wrong password
URL: https://github.com/apache/couchdb/issues/5315
--
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
Re: [I] CouchDB v3.4.1 return 403 on GET /_session with a wrong password [couchdb]
Posted by "H--o-l (via GitHub)" <gi...@apache.org>.
H--o-l commented on issue #5315:
URL: https://github.com/apache/couchdb/issues/5315#issuecomment-2426989426
OK, understood, thanks. What about the changelog, did the change appear inside it? Because I read it carefully before doing the update and I haven't noticed that change. It would have avoided inconvenience for my users if I had been able to notice it before the update.
--
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
Re: [I] CouchDB v3.4.1 return 403 on GET /_session with a wrong password [couchdb]
Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 commented on issue #5315:
URL: https://github.com/apache/couchdb/issues/5315#issuecomment-3601649096
Resolved via #5379.
--
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