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

[Auth] Potential race condition acquiring credentials via 'AuthProvider' interface and 'cbauth'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • core-10.2.0
    • None
    • library
    • None
    • 1
    • SDK39

    Description

      What's the issue?
      I believe there's a potential race condition when acquiring credentials using the 'AuthProvider' interface, the general steps would be as follows (when applied to 'cbbackupmgr'):

      1. SDK prepares to dispatch request
      2. SDK asks 'cbbackupmgr' the credentials for a given host:port
      3. 'cbbackupmgr' uses gRPC to ask for credentials from 'cbbs' (the backup service) via 'cbauth'
      4. Cluster node required for step 1 is removed from the cluster
      5. 'cbbs' fails to find credentials for the given host:port
      6. 'cbbackupmgr' falls back to the credentials provided via the CLI (which will be wrong due to being a system user)

      What's the fix?
      'cbbackupmgr' should be able to inform the SDK that we can't provide credentials for the given host:port and that it should retry the request (preferably after a cluster config update) so that it's dispatched to a different node (or fails because no other nodes run the desired service).

      Attachments

        Issue Links

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

          Activity

            People

              charles.dixon Charles Dixon
              james.lee James Lee
              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