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

[N1QL RBAC UPGRADE] select * from bucket with password gives inconsistent results

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.0.0
    • 5.0.0
    • query
    • Mixed node cluster: 4.6.1-3652 to 5.0.0-3088
    • Untriaged
    • No

    Description

      1. create a 2node cluster with following configuration:
      a. 1 node with 4.6.1-3652 having kv,index and n1ql on it.
      b. second node with 5.0.0-3088 having kv,index and n1ql on it.
      2. create a bucket bucket0 with password as password.
      3. In security tab, enable authentication.Add pam authentication to the node with version 4.6.1-3652.
      4. Add a user with username test and roles with admin,cluster admin and views_admin[*] as shown in screenshot.
      5. Try select * from bucket0 from cbq as:

      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> select * from `bucket0` limit 1;
      {
          "requestID": "9c160019-0346-4b73-a3d0-796661f8be95",
          "signature": {
              "*": "*"
          },
          "results": [
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "252.411321ms",
              "executionTime": "252.304003ms",
              "resultCount": 0,
              "resultSize": 0
          }
      }
      cbq> select * from `bucket0` limit 1;
      {
          "requestID": "c0129d95-b200-47fb-a325-027c5f230fa5",
          "signature": {
              "*": "*"
          },
          "results": [
          ],
          "errors": [
              {
                  "code": 13014,
                  "msg": "User does not have credentials to access privilege cluster.bucket[bucket0].n1ql.select!execute. Add role Query Select [bucket0] to allow the query to run."
              }
          ],
          "status": "stopped",
          "metrics": {
              "elapsedTime": "16.236952ms",
              "executionTime": "16.123667ms",
              "resultCount": 0,
              "resultSize": 0,
              "errorCount": 1
          }
      }
      cbq> 
      
      

      Attachments

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

        Activity

          People

            korrigan.clark Korrigan Clark (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