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

[N1QL RBAC] User with query_insert permission on a bucket allowed to create and drop primary index on that bucket.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.0.0
    • 5.0.0
    • query
    • 5.0.0-3136
    • Untriaged
    • Unknown

    Description

      1. create a bucket default with no documents.
      2. create a user test with password as <<password>> with permission as query_insert on bucket default from UI.
      3. Try the following query with login as test/password:

      cbq> [root@localhost bin]# ./cbq -u test -p password
      Connected to : http://localhost:8091/. Type Ctrl-D or \QUIT to exit.

      Path to history file for the shell : /root/.cbq_history
      cbq> create primary index on default;
      {
      "requestID": "315fadd3-19b7-4683-af1a-3de485e10233",
      "signature": null,
      "results": [
      ],
      "status": "success",
      "metrics":

      { "elapsedTime": "4.45581643s", "executionTime": "4.455784608s", "resultCount": 0, "resultSize": 0 }

      }

      cbq> drop primary index on default;
      {
      "requestID": "ac17f772-e62b-4014-982f-0e3ae8c0ca71",
      "signature": null,
      "results": [
      ],
      "status": "success",
      "metrics":

      { "elapsedTime": "2.003599927s", "executionTime": "2.003527412s", "resultCount": 0, "resultSize": 0 }

      }

      User test is allowed to create and drop primary index.

      Attachments

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

        Activity

          People

            Prerna.Manaktala Prerna Manaktala (Inactive)
            Prerna.Manaktala Prerna Manaktala (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