vkuznet opened a new issue #3924: URL: https://github.com/apache/couchdb/issues/3924
[NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ ) ## Description Unable to use Basic Authorization header while accessing DB ## Steps to Reproduce ``` // setup CouchDB and I used admin:admin credentials, and I created testdb in it using admin credentials // access CouchDB using URI curl http://admin:admin@localhost:5984/_all_dbs ["testdb"] // now if I access the same URI using Authorization method it fails // encode username:password string echo "admin:admin" | base64 YWRtaW46YWRtaW4K // access using Authorization header curl -H "Authorization: Basic YWRtaW46YWRtaW4K" http://localhost:5984/_all_dbs {"error":"unauthorized","reason":"Name or password is incorrect."} ``` And, here is access to testdb: ``` // using user info credentials in URI curl http://admin:admin@localhost:5984/testdb {"db_name":"testdb","purge_seq":"0-g1AAAABXeJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUnlsQBJhgYg9R8IshIZ8KhNZEiqhyjKAgBm5Rxs","update_seq":"1-g1AAAABXeJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUnlsQBJhgYg9R8IshIZ8ahNZEiqBytiyAIAZwwcbQ","sizes":{"file":20828,"external":14,"active":316},"props":{},"doc_del_count":0,"doc_count":1,"disk_format_version":8,"compact_running":false,"cluster":{"q":2,"n":1,"w":1,"r":1},"instance_start_time":"0"} // access w/o authorization curl http://localhost:5984/testdb {"error":"unauthorized","reason":"You are not authorized to access this db."} // access with Authorization header curl -H "Authorization: Basic YWRtaW46YWRtaW4K" http://localhost:5984/testdb {"error":"unauthorized","reason":"Name or password is incorrect."} ``` ## Expected Behaviour I expect to access DB using Authorization header. ## Your Environment ``` curl http://localhost:5984/ {"couchdb":"Welcome","version":"3.2.0","git_sha":"efb409bba","uuid":"a1ea557ff2bba325593d7204db355629","features":["access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The Apache Software Foundation"}} ``` * CouchDB version used: 3.2.0 * Browser name and version: I used curl * Operating system and version: macOS ## Additional Context -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
