-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error "Unauthorized" (401) when loading "_security"-doc #741
Comments
I can confirm this too (Debian Jessie). At first I thought it was a Fauxton issue, or the fact I compiled from master source and did something wrong, but standard http/curl with official 2.1.0 release experiencing same bug as OP has stated above. |
Can both of you confirm how you installed CouchDB? Was it from the packages, or from source? This may be something specific to the Debian/Ubuntu package configuration, which hasn't had as much testing as the source release. We've not seen this error when installing from source. |
I installed from source firstly, then tried package, with both experiencing same issue. I simply followed instructions in Other install details:
Possibly related to an old similar issue to do with cookie/basic auth (and having to workaround by POST both |
@dharders Interesting. If it's not package-related, we may be onto something real (or just a misconfiguration of some sort.) Some questions:
Thanks! |
I also noted a few console errors within fauxton related to worker CSP 'unsafe-eval', DOMException all seemingly due to Worker related stuff. |
Previously I had CouchDB 1.6 installed and it worked perfectly fine. Then I upgraded to 2.1.0, but purged the installation, because I had difficulties migrating my old DBs to the new installation (also replicating failed during the "verify installation"-process in Fauxton). I installed 2.1.0 via Regarding your questions, @wohali:
|
well, this is fun. I think what you've done is written that error into the security object; curl foo:bar@localhost:15984/db1/_security -XPUT -d ' {"error":"unauthorized","reason":"Authentication required.","members":{"names":["admin","newuser"]}} ' curl foo:bar@localhost:15984/db1/_security -s can you do curl with the -v so we can see if you're getting, as I suspect, a 200 respose, not a 401. |
@rnewson I am getting a 200 status code!
Hm. I didn't execute any CURL commands before, nor did I touch the |
Ok. I was able to reproduce this. Step 1: update the
Step 2: check the content of
Step 3: Navigate to Fauxton
Meanwhile member "test" was added to the
Step 6: But reloading the "Permissions"-page doesn't reveal any name. I'm still getting a 401-Error in DevTools. And this is when the error message was written to the
|
@dharders Signs point to a Fauxton bug. Can you tell me - before you go to Fauxton and change your admin password, right after the |
@garrensmith you might want to have a look at the above, if confirmed we can move this issue over to the couchdb-fauxton repo if you like. |
@wohali Yes your suspicions were correct. It does seem that it is a fauxton bug, as the issue isn't present if I curl from a fresh install BEFORE using fauxton permissions screen
After visiting permissions screen (and seeing no present members) and adding 'admin' and 'newuser' to members then running the same curl command
Definitely a fauxton bug. It's adding the error message to the _security document, which is a weird thing to do. So in summary, need to:
|
This is a Fauxton bug, so I'm closing it out in apache/couchdb. See the other referenced issues for more info. |
Hello!
I installed CouchDb 2.1.0 on my Ubuntu 16.04 machine. Somehow I cannot load the content of the
_security
doc without an error. I came across this issue after realizing that Fauxton is not displaying any "admins" or "members" on the "Permissions" page for a database.When I do
curl http:https://admin:my_password@my_server:5984/my_database/_security
I receive the same output when I open the URL in my web browser:local.ini
:The text was updated successfully, but these errors were encountered: