Basic Authentication for `_utils` does not work if `require_valid_user_except_for_up` is set
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- erlang
- Domain
- api, authentication
Research direction
Reproduce the behavior using the local.ini configuration with require_valid_user_except_for_up enabled, then access the _utils endpoint and compare it with require_valid_user. Trace the authentication handling for _utils and verify that the endpoint prompts for credentials instead of returning a 401 Authentication required response.
Written by the indexing model from the issue text.
Description
Description
When setting require_valid_user_except_for_up instead of require_valid_user in the CouchDB configuration, the system does not prompt for username and password when accessing the _utils endpoint. Instead, a 401 is returned. {"error":"unauthorized","reason":"Authentication required."}
When changing the configuration back to require_valid_user, the basic authentication prompt appears as expected.
Steps to Reproduce
- Set
require_valid_user_except_for_up = truein local.ini - Restart CouchDB to apply the configuration change.
- Attempt to access the
_utilsendpoint (e.g.,http://localhost:5984/_utils).
Expected Behaviour
The _utils endpoint should prompt for authentication
Your Environment
- CouchDB version used: 3.3 (Docker)
- Browser name and version: Firefox
- Operating system and version: MacOS
{
"couchdb": "Welcome",
"version": "3.3.3",
"git_sha": "40afbcfc7",
"uuid": "3a7f2e8d1c9b4f6e0d5a2c8b7f3e1d9a",
"features": [
"access-ready",
"partitioned",
"pluggable-storage-engines",
"reshard",
"scheduler"
],
"vendor": {
"name": "The Apache Software Foundation"
}
}
local.ini
[couchdb]
single_node=true
uuid = 3a7f2e8d1c9b4f6e0d5a2c8b7f3e1d9a
[chttpd]
require_valid_user_except_for_up = true
bind_address = any
authentication_handlers = {chttpd_auth, jwt_authentication_handler}, {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, default_authentication_handler}
enable_cors = true
[jwt_keys]
....
[jwt_auth]
roles_claim_path = cognito:groups
[couch_peruser]
enable = true
[admins]
admin = -pbkdf2-...
[cors]
origins = *
headers = accept, authorization, content-type, origin, referer
credentials = true
methods = GET, PUT, POST, HEAD, DELETE
- Dominant language
- Erlang
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 5h 24m
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/couchdb
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 40/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 40/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
enhancement needs-triage
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
microsoft/magentic-ui#588 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
alexgorbatchev/simple-ptt#3 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
CorrelAid/formtransform#44 ·