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

"User does not have credentials to use sequential scans...." error from ADVISE

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      When a user lacking privileges attempts to ADVISE a statement, error 13014 is returned:

       

      cbq> select * from system:my_user_info;
      [
          {
              "my_user_info": {
                  "domain": "local",
                  "external_groups": [],
                  "groups": [],
                  "id": "testuser",
                  "name": "",
                  "password_change_date": "2024-07-06T12:26:44.000Z",
                  "roles": [
                      {
                          "bucket_name": "default",
                          "collection_name": "c1",
                          "origins": [
                              {
                                  "type": "user"
                              }
                          ],
                          "role": "update",
                          "scope_name": "s2"
                      },
                      {
                          "bucket_name": "default",
                          "collection_name": "c1",
                          "origins": [
                              {
                                  "type": "user"
                              }
                          ],
                          "role": "select",
                          "scope_name": "s2"
                      },
                      {
                          "bucket_name": "default",
                          "collection_name": "c1",
                          "origins": [
                              {
                                  "type": "user"
                              }
                          ],
                          "role": "insert",
                          "scope_name": "s2"
                      }
                  ],
                  "uuid": "9cbfe8f8-3125-461e-ba78-6c7a3e066b4e"
              }
          }
       ... cbq> advise select * from default.s2.c1 where a is valued;
      [
          {
              "errors": [
                  {
                      "code": 13014,
                      "msg": "User does not have credentials to use sequential scans. Add role query_use_sequential_scans on default:default.s2.c1 to allow the statement to run.",
                      "reason": {
                          "missing_role": "query_use_sequential_scans",
                          "path": "default:default.s2.c1",
                          "recommended_action": "Run the index advisor and create an appropriate index, or check that your expected index is online."
                      }
                  }
              ],
              "resultCount": 0,
              "status": "fatal"
          }
       ...

       

       

      Attachments

        Issue Links

          Activity

            People

              pierre.regazzoni Pierre Regazzoni
              Donald.haggart Donald Haggart
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty