t0nylai opened a new issue #1183: Proxy Authentication doesn't work when 
proxy_use_secret=true
URL: https://github.com/apache/couchdb/issues/1183
 
 
   <!--- Provide a general summary of the issue in the Title above -->
   
   ## Expected Behavior
   <!--- If you're describing a bug, tell us what should happen -->
   <!--- If you're suggesting a change/improvement, tell us how it should work 
-->
   When proxy_use_secret = true, I should be "authorized" with the correct 
password from X-Auth-CouchDB-Token header.
   
   ## Current Behavior
   <!--- If describing a bug, tell us what happens instead of the expected 
behavior -->
   <!--- If suggesting a change/improvement, explain the difference from 
current behavior -->
   "unauthorized" even I have the correct password from X-Auth-CouchDB-Token 
header.
   
   ## Possible Solution
   <!--- Not obligatory, but suggest a fix/reason for the bug, -->
   <!--- or ideas how to implement the addition or change -->
   Add an example. Show how to use [proxy_user_secret] to this 2.1.1. doc
   http://docs.couchdb.org/en/2.1.1/api/server/authn.html#proxy-authentication
   
   ## Steps to Reproduce (for bugs)
   <!--- Provide a link to a live example, or an unambiguous set of steps to -->
   <!--- reproduce this bug. Include code to reproduce, if relevant -->
   1. 
   Having these in the config
   [couch_httpd_auth]
   require_valid_user = true
   secret = password
   x_auth_roles = X-Auth-CouchDB-Roles
   x_auth_username = X-Auth-CouchDB-UserName
   proxy_use_secret = true
   x_auth_token = password
   
   [chttpd]
   port = 5985
   bind_address = 0.0.0.0
   require_valid_user = false
   authentication_handlers = {chttpd_auth, cookie_authentication_handler}, 
{couch_httpd_auth, proxy_authentication_handler}, {chttpd_auth, 
default_authentication_handler}
   
   2. 
   Using this cURL command
   "AdminToDo" is the role name able to access my testing database.
   curl -X GET http://127.0.0.1:5985/my_testing_db?include_docs=true -H 
"Content-Type: application/json" -H "X-Auth-CouchDB-UserName: 
X-Auth-CouchDB-Username" -H "X-Auth-CouchDB-Roles: AdminToDo" -H 
"X-Auth-CouchDB-Token: password" 
   
   3. 
   I will get "error: unauthorized", seems the X-Auth-CouchDB-Token is not 
being used or doesn't know "secret = password" in the [couch_httpd_auth] 
section.
   
   
   ## Context
   <!--- How has this issue affected you? What are you trying to accomplish? -->
   <!--- Providing context helps us come up with a solution that is most useful 
in the real world -->
   I can't use proxy_user_secret=True even itis strongly recommended. When I 
have proxy_user_secret=false, using this header X-Auth-CouchDB-Roles works. It 
gets authorized; the wrong role will return unauthorized. It is what I expected.
   
   ## Your Environment
   <!--- Include as many relevant details about the environment you experienced 
the bug in -->
   * Version used: 2.1.1.
   * Browser Name and version: Chrome Version 64.0.3282.140
   * Operating System and version (desktop or mobile): Windows 2008R2, IIS
   * Link to your project:
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to