Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-844

Data writer should be able to read but not able to

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Blocker
    • None
    • 2.8.0
    • None
    • None

    Description

      According to spec https://developer.couchbase.com/documentation/server/5.0/security/concepts-rba-for-apps.html#rbac_for_users_roles_and_privileges__table_data_writer_role

      Data Writer should be able to read document and subdocument.

      However I get

      "Not authorized for operation"

      for lcb_get3() and lcb_subdoc3()

       

      Attaching cpp code and Makefile to reproduce.

      Here is steps.

      1. Create a cluster (single node would be fine) of 5.0.0-3490
      2. Create bucket 'default'
      3. Create user 'datawriter' with bucket write role to 'default' bucket. Password as 'password'
      4. Checkout libcouchbase 2.8.0 in ../../couchbase/libcouchbase and install litbary under ../../couchbase/libcouchbase/inst
      5. Build the example app 'cmake -DLCB_ROOT=../../couchbase/libcouchbase/inst -DCMAKE_BUILD_TYPE=DEBUG ./'
      6. run app './sdk_lcb_feature_test'

      Expected : No errors

      Actual: "Not authorized for operation" for lcb_get3() and lcb_subdoc3() like this

      key: SDLOOKUP...Not authorized for operation

      key: GET...Not authorized for operation

       

       

      Attachments

        1. main.cpp
          5 kB
        2. Makefile
          7 kB

        Issue Links

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

          Activity

            People

              avsej Sergey Avseyev
              jaekwon.park Jae Park [X] (Inactive)
              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