Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-1478

SetAuthenticator method is internal - cannot auth with RBAC using ClusterHelper

    XMLWordPrintable

    Details

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

      Description

      The ClusterHelper lacks overloads for authenticating via RBAC. 

        Attachments

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

          Activity

          Hide
          jmorris Jeff Morris added a comment - - edited

          Tests exist to show that SetAuthenticate was intended to be used to pass the IAuthenticator, however this is an internal method, so it will not work for any external applications:

          https://github.com/couchbase/couchbase-net-client/commit/332ffebfc2284602d736b65183892f812ebd95f2 

          Show
          jmorris Jeff Morris added a comment - - edited Tests exist to show that SetAuthenticate was intended to be used to pass the IAuthenticator, however this is an internal method, so it will not work for any external applications: https://github.com/couchbase/couchbase-net-client/commit/332ffebfc2284602d736b65183892f812ebd95f2  
          Hide
          jmorris Jeff Morris added a comment -

          This code will not work:

          var config = TestConfiguration.GetDefaultConfiguration();
          var authenticator = new PasswordAuthenticator("myuser", "myuserpassword");
          config.SetAuthenticator(authenticator);
           
          ClusterHelper.Initialize(config);
          var bucket = ClusterHelper.GetBucket("default");

          The reason being that "default" and null will be used instead of the username and password from the IAuthenticator.

          Show
          jmorris Jeff Morris added a comment - This code will not work: var config = TestConfiguration.GetDefaultConfiguration(); var authenticator = new PasswordAuthenticator( "myuser" , "myuserpassword" ); config.SetAuthenticator(authenticator);   ClusterHelper.Initialize(config); var bucket = ClusterHelper.GetBucket( "default" ); The reason being that "default" and null will be used instead of the username and password from the IAuthenticator.

            People

            • Assignee:
              jmorris Jeff Morris
              Reporter:
              jmorris Jeff Morris
            • Votes:
              0 Vote for this issue
              Watchers:
              1 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.