Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1097

user Query Roles->Query Delete to query delete requires role Query Select?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • 2.4.7
    • auth, N1QL
    • None
    • 5.0.0-3317

    Description

      test https://github.com/couchbaselabs/sdk-qe/blob/RBAC_java/functional-tests/java-functional/src/main/java/com/couchbase/sdkqe/test/functional/FunctionalRBACTest.java#L845-L864

       

      steps: 

      create user

      testRBACQueryRolesQueryDeleteAllBuckets with role query_delete[*]

       and try to delete with query

       

      result: 

       

      User does not have credentials to access privilege cluster.bucket[gamesim-sample].n1ql.select!execute. Add role Query Select
       
      java.lang.AssertionError: User 'QueryRolesQueryDeleteAllBuckets' with role 'query_delete[*]' can't query delete, bucket 'gamesim-sample' but should!N1qlQueryResult{status='stopped', finalSuccess=false, parseSuccess=true, allRows=[], signature={"P":"json"}, info=N1qlMetrics{resultCount=0, errorCount=1, warningCount=0, mutationCount=0, sortCount=0, resultSize=0, elapsedTime='6.032726ms', executionTime='5.978825ms'}, profileInfo={}, errors=[{"msg":"User does not have credentials to access privilege cluster.bucket[gamesim-sample].n1ql.select!execute. Add role Query Select [gamesim-sample] to allow the query to run.","code":13014}], requestId='07ab66fe-2216-42a5-a553-30fbd250a335', clientContextId=''}
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.assertTrue(Assert.java:41)
      at com.couchbase.sdkqe.test.functional.FunctionalRBACTest.testDataAccess(FunctionalRBACTest.java:329)
      at com.couchbase.sdkqe.test.functional.FunctionalRBACTest.testRBACQueryRolesQueryDeleteAllBuckets(FunctionalRBACTest.java:859)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

       

      Attachments

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

        Activity

          People

            johan.larson Johan Larson (Inactive)
            andreibaranouski Andrei Baranouski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty