You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/03/20 14:09:23 UTC
[GitHub] fkaempfer commented on issue #1183: Proxy Authentication doesn't work when proxy_use_secret=true
fkaempfer commented on issue #1183: Proxy Authentication doesn't work when proxy_use_secret=true
URL: https://github.com/apache/couchdb/issues/1183#issuecomment-374611080
Isn't this working as expected? The only thing that's confusing is that you have to send the SHA-1 sum of the username using the secret instead of the secret directly:
In NodeJS this should give you the token:
> crypto.createHmac('sha1', 'mysecret').update('username').digest('hex')
Then with curl you should get:
```
curl -X GET http://127.0.0.1:5984/_session -H "Content-Type: application/json" -H "X-Auth-CouchDB-UserName: username" -H "X-Auth-CouchDB-Roles: myadmin" -H "X-Auth-CouchDB-Token: "7bdfca0f0926fe4255440da35417cd2dc79507e0"
{"ok":true,"userCtx":{"name":"username","roles":["myadmin"]},"info":{"authentication_db":"_users","authentication_handlers":["cookie","proxy","default"],"authenticated":"proxy"}}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services