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
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 2.5.13
    • 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

            The core issue here is that the XError support under CBD-1985 is not yet done for Python.  If the client doesn't signal that it knows these errors, the cluster just closes the connection so the error message is correct.

            Keeping this open as something to verify, but the fix comes in PYCBC-397.

            ingenthr Matt Ingenthron added a comment - The core issue here is that the XError support under CBD-1985 is not yet done for Python.  If the client doesn't signal that it knows these errors, the cluster just closes the connection so the error message is correct. Keeping this open as something to verify, but the fix comes in PYCBC-397 .

            When you have a moment Ellis, please verify this is fixed (maybe already covered by a test).

            ingenthr Matt Ingenthron added a comment - When you have a moment Ellis, please verify this is fixed (maybe already covered by a test).

            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