Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-417

Incorrect error message on authentication failure

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 2.5.13
    • None
    • library
    • None

    Description

      Incorrect message when user doesn't have access to bucket.

       

      1. Implicit
        cb = Bucket('couchbase://127.0.0.1/bucket-legacy-username_as_bucketname',password="password")
      2. Explicit
        cb = Bucket('couchbase://127.0.0.1/bucket-legacy-username_as_bucketname',username="bucket-legacy-username_as_bucketname",password="password")

       

      Both of these return a generic error instead of authentication failure:

       

      Case 1:

      I just removed data-reader and data-writer access from the user, it should have failed authentication and NOT reported a generic error. (Python client attached for testing). So user absolutely has no access to the bucket at all

      couchbase.exceptions.CouchbaseError: <RC=0xA[Generic error], There was a problem while trying to send/receive your request over the network. This may be a result of a bad network or a misconfigured client or server, C Source=(src/bucket.c,785)>

      Case 2:

      User has access to the bucket e.g. Query access but not RW access. Again error does not report authentication/permissions but aburpt connection closure.

      couchbase.exceptions.LCB_0x2D (generated, catch: CouchbaseNetworkError, CouchbaseTransientError): <Key=u'first', RC=0x2D[The remote host closed the connection], Operational Error, Results=1, C Source=(src/multiresult.c,309)>

       

       

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jared.casey Jared Casey
              asif.kazi Asif Kazi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty