incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: authentication issues
Date Fri, 16 May 2014 00:02:52 GMT

On May 14, 2014, at 7:36 AM, Will Holcomb <will@dhappy.org> wrote:

> I have a couch server running and I am attempting to access it from a web
> application server from port 80. I am having difficulty authenticating.

CouchDB doesn’t send a WWW-Authenticate header in the response when it returns a 401 status.
There was some reason for doing this (having to do with clients accessing CouchDB from a web
browser?) but it’s nonstandard and it really messes up a lot of HTTP client libraries.

The workaround is to edit your CouchDB config and add a new variable to the ‘httpd’ section,
whose key is “WWW-Authenticate” and value is something like
	Basic realm=“CouchDB"

And it gets worse! You have to do this workaround *every time CouchDB starts up* because it
fails to persist the changed config properly — after relaunch the key will have changed
to “www-authenticate” which doesn’t work.

Yes, I filed a bug on this. It’s really annoying.

—Jens
Mime
View raw message