Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-350

Wrongly set basic-auth when username and password are both empty

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: 1.4.2
    • Component/s: library
    • Labels:
      None

      Description

      Our couchbase cluster/bucket do not require credentials for managing, thus when creating a bucket manager, the username and password are both set to empty string.
      But in the Golang SDK (https://github.com/couchbase/gocb/blob/4d157c9c3b4ec7db3d73153a79082025c1a53618/bucketmgr.go#L68) there is a statement to set using basic auth even when the username and password are empty.
      This causes the CB server to actively checking for auth, and then returns 401 because the password is empty.
      We would like to request a change to the linked statement to check for username and password before setting the value, so when both are empty, that statement can skip execution.

        Attachments

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

          Activity

          Hide
          zhongjie.cai Zhongjie Cai added a comment -

          Please let me know if you have any questions. Thanks!

          Show
          zhongjie.cai Zhongjie Cai added a comment - Please let me know if you have any questions. Thanks!
          Hide
          charles.dixon Charles Dixon added a comment -

          Hi Zhongjie Cai, it should be an easy enough change to make but curious why you want to use it without credentials? Also, so I can test it out - what CB server and SDK versions are you using?

          Show
          charles.dixon Charles Dixon added a comment - Hi Zhongjie Cai , it should be an easy enough change to make but curious why you want to use it without credentials? Also, so I can test it out - what CB server and SDK versions are you using?
          Hide
          zhongjie.cai Zhongjie Cai added a comment -

          hi Charles Dixon,

          so in our dev/staging environment, most of the buckets are created without any access credentials since they are internal. We have access control around the boundary of our CB instances, thus we would not need credentials anyway since outsiders cannot even access the CB.

          The CB server is around version 4.1.x community edition AFAIK, and the Golang SDK I am using is of the latest (checked out from Github directly).

          Hope this answers your question. Please feel free to let me know in case you need further details. Thanks!

          Best regards,

          Zhongjie

          Show
          zhongjie.cai Zhongjie Cai added a comment - hi Charles Dixon , so in our dev/staging environment, most of the buckets are created without any access credentials since they are internal. We have access control around the boundary of our CB instances, thus we would not need credentials anyway since outsiders cannot even access the CB. The CB server is around version 4.1.x community edition AFAIK, and the Golang SDK I am using is of the latest (checked out from Github directly). Hope this answers your question. Please feel free to let me know in case you need further details. Thanks! Best regards, Zhongjie
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-6.5.0-1487 contains gocb commit 3f5c673 with commit message:
          GOCBC-350: When credentials are empty don't set basic auth for bucket manager.

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-1487 contains gocb commit 3f5c673 with commit message: GOCBC-350 : When credentials are empty don't set basic auth for bucket manager.
          Hide
          build-team Couchbase Build Team added a comment -

          Build sync_gateway-2.6.0-2 contains gocb commit 3f5c673 with commit message:
          GOCBC-350: When credentials are empty don't set basic auth for bucket manager.

          Show
          build-team Couchbase Build Team added a comment - Build sync_gateway-2.6.0-2 contains gocb commit 3f5c673 with commit message: GOCBC-350 : When credentials are empty don't set basic auth for bucket manager.
          Hide
          build-team Couchbase Build Team added a comment -

          Build sync_gateway-2.5.1-8 contains gocb commit 3f5c673 with commit message:
          GOCBC-350: When credentials are empty don't set basic auth for bucket manager.

          Show
          build-team Couchbase Build Team added a comment - Build sync_gateway-2.5.1-8 contains gocb commit 3f5c673 with commit message: GOCBC-350 : When credentials are empty don't set basic auth for bucket manager.

            People

            • Assignee:
              charles.dixon Charles Dixon
              Reporter:
              zhongjie.cai Zhongjie Cai
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.