Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-9642

Within a transaction that includes KV and N1QL operations- KV operations will check only for query privileges once n1ql operations has been invoked

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Neo
    • Cheshire-Cat, Neo
    • query, sdk
    • None
    • DOC-2022-S5, DOC-2022-S7
    • 1

    Description

      Use case is taken from MB-50451

      Suppose a user has only Read permissions on a collection for KV operations.Any insert/Update/Remove would fail.But if this user has QUERY permissions i.e query_insert, query_update etc.Any KV ops after a query stmt will succeed. 

       

      transactions.run((ctx) -> {
         // These KV operations will obey the user's KV RBAC permissions.
         ctx.insert(...);
         ctx.get(...);
         ctx.replace(...);
         ctx.remove(...);
         // Enter query-mode.
         ctx.query(...);
         // These KV operations will be allowed regardless of the user's KV RBACs.
         ctx.insert(...);
         ctx.get(...);
         ctx.replace(...);
         ctx.remove(...);
      }); 
      

       

       

       

      Attachments

        Issue Links

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

          Activity

            People

              simon.dew Simon Dew
              kamini.jagtiani Kamini Jagtiani
              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