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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.8
    • 2.5.0
    • library
    • 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

          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 

          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  
          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.

          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

            jmorris Jeff Morris
            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