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 2020/02/25 15:03:13 UTC

[GitHub] [couchdb] vmatyusGitHub opened a new issue #2599: Without credentials request the content of reason field should complain about missing credentials

vmatyusGitHub opened a new issue #2599: Without credentials request the content of reason field should complain about missing credentials
URL: https://github.com/apache/couchdb/issues/2599
 
 
   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
   
   ## Description
   
   [NOTE]: # ( Describe the problem you're encountering. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   
   When I want to create a database with endpoint `PUT {server_url}/{dbName}` without any credentials, I receiving the different reason message on Cloudant and on CouchDB.
   CouchDB: `"You are not a server admin."`
   Cloudant: `"one of _admin, server_admin is required for this request"`
   They should respond with the same reason.
   Furthermore the message of the reason is not assist to figure out the authentication problem. I have not used any credentials during the API request, therefore I will have no `server_admin` permission.
   
   ## Steps to Reproduce
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   Use `PUT {server_url}/{dbName}` without any authentication.
   ```
   curl --request PUT '{server_url}/{dbName}' \
   --header 'Content-Type: application/json'
   ```
   The response on CouchDB:
   ```
   401 Unauthorized
   {
       "error": "unauthorized",
       "reason": "You are not a server admin."
   }
   ```
   
   The response on Cloudant:
   ```
   401 Unauthorized
   {
       "error": "unauthorized",
       "reason": "one of _admin, server_admin is required for this request"
   }
   ```
   
   ## Expected Behaviour
   
   [NOTE]: # ( Tell us what you expected to happen. )
   CouchDB and Cloudant should respond with the same reason.
   Secondly, the reason message should be more descriptive like:
   eg: 
   1. `No credential is attached to the request`
   2. `No authentication information`
   
   ## Your Environment
   
   [TIP]:  # ( Include as many relevant details about your environment as possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
   
   * CouchDB version used: 3.0.0-83bdcf6
   * Cloudant version: 2.1.1. `"vendor": {"name": "IBM Cloudant","version": "8135","variant": "paas"}`
   * Operating system and version: MacOS Catalina 10.15.3
   
   ## Additional Context
   
   [TIP]:  # ( Add any other context about the problem here. )
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] wohali commented on issue #2599: Without credentials request the content of reason field should complain about missing credentials

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #2599: Without credentials request the content of reason field should complain about missing credentials
URL: https://github.com/apache/couchdb/issues/2599#issuecomment-598317124
 
 
   @rnewson is it time to close this, or?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] wohali closed issue #2599: Without credentials request the content of reason field should complain about missing credentials

Posted by GitBox <gi...@apache.org>.
wohali closed issue #2599: Without credentials request the content of reason field should complain about missing credentials
URL: https://github.com/apache/couchdb/issues/2599
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] rnewson commented on issue #2599: Without credentials request the content of reason field should complain about missing credentials

Posted by GitBox <gi...@apache.org>.
rnewson commented on issue #2599: Without credentials request the content of reason field should complain about missing credentials
URL: https://github.com/apache/couchdb/issues/2599#issuecomment-598073450
 
 
   The notion of "server_admin" only exists in Cloudant because it is a multi-tenant variant of CouchDB. As such, the error messages are appropriate for both products and the variance is reasonable.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services