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

Admin credentials required to create a design document

    XMLWordPrintable

Details

    • Task
    • Resolution: Won't Fix
    • Major
    • backlog-1.0
    • 1.2.8
    • library
    • None

    Description

      http://www.couchbase.com/communities/q-and-a/credentials-deploy-view-using-couchbasecluster

      I spent some time with the SDK trying to figure this out and it looks like a bug in the client SDK:

      var config = new CouchbaseClientConfiguration();
      config.Urls.Add(new Uri(ConfigurationManager.AppSettings["CouchbaseServerUrl"] + "/pools"));
      config.Password = "Administrator";
      config.Username = "password";
      config.Bucket = "authenticated";
      config.BucketPassword = "secret";

      var cluster = new CouchbaseCluster(config);

      using (var stream = new FileStream("Data
      CityViews.json", FileMode.Open))

      { var result = cluster.CreateDesignDocument("authenticated", "somename", stream); Assert.IsTrue(result); }

      Even this doesn’t work and returns a 401 Unauthorized…if you remove the cluster level authentication, then 401 unauthorized is still returned. Note that this will create the design document under the default bucket:

      var config = new CouchbaseClientConfiguration();
      config.Urls.Add(new Uri(ConfigurationManager.AppSettings["CouchbaseServerUrl"] + "/pools"));
      config.Bucket = "authenticated";
      config.BucketPassword = "secret";

      var cluster = new CouchbaseCluster(config);

      using (var stream = new FileStream("Data
      CityViews.json", FileMode.Open))

      { var result = cluster.CreateDesignDocument("default", "somename", stream); Assert.IsTrue(result); }

      Attachments

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

        Activity

          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