Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-51135

data_writer user not able to upsert user xattr

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.1.0
    • 7.1.0
    • memcached
    • None
    • 7.1.0-2334
    • Triaged
    • 1
    • No

    Description

      To repro:

      • setup single node server
      • load beer-sample
      • create data_writer user: /opt/couchbase/bin/couchbase-cli user-manage -c localhost -u Administrator -p password --set --rbac-username data_writer --rbac-password password --roles data_writer[beer-sample] --auth-domain local
      • Attempt to upsert user xattr

      Result in "couchbase.exceptions.AuthenticationException":

      >>> import sys
      >>> from couchbase.cluster import Cluster
      >>> import couchbase.subdocument as SD
      >>> from couchbase.auth import PasswordAuthenticator
      >>> cluster = Cluster('couchbase://localhost', authenticator=PasswordAuthenticator('data_writer', 'password'))
      >>> 
      >>> bucket = cluster.bucket('beer-sample')
      >>> collection = bucket.default_collection()
      >>> alaskan = "alaskan_brewing"
      >>> collection.mutate_in(alaskan, [SD.upsert('user1', 'user data writer xattr', xattr=True, create_parents=True)])
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "/usr/local/lib64/python3.6/site-packages/couchbase/collection.py", line 293, in wrapped
          return func(self, *args, **kwargs)
        File "/usr/local/lib64/python3.6/site-packages/couchbase/result.py", line 498, in wrapped
          x, opts = func(*args, **kwargs)
        File "/usr/local/lib64/python3.6/site-packages/couchbase/collection.py", line 1071, in mutate_in
          self.bucket, key, spec, **final_options), final_options)
        File "/usr/local/lib64/python3.6/site-packages/couchbase_core/client.py", line 381, in mutate_in
          return super(Client, self).mutate_in(key, tuple(specs), **kwargs)
      couchbase.exceptions.AuthenticationException: <Key='alaskan_brewing', RC=0xCE[LCB_ERR_AUTHENTICATION_FAILURE (206)], Operational Error, Results=1, C Source=(src/multiresult.c,332), Context={'status_code': 36, 'opaque': 4, 'cas': 0, 'key': 'alaskan_brewing', 'bucket': 'beer-sample', 'collection': '_default', 'scope': '_default', 'context': '', 'ref': '', 'endpoint': '', 'type': 'KVErrorContext'}, Tracing Output={"alaskan_brewing": {"debug_info": {"FILE": "src/callbacks.c", "FUNC": "subdoc_callback", "LINE": 1004}}}>
       

      Attachments

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

        Activity

          People

            pierre.regazzoni Pierre Regazzoni
            pierre.regazzoni Pierre Regazzoni
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty