Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-3787

Ambiguous exception thrown with method invoked in OQL query with new security configured

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0
    • querying, security
    • None

    Description

      I've configured my cluster using the new security (using ExampleSecurityManager) with 1 locator and 1 server. After adding 3 key-value pairs into the single partitioned region (region1), I use a second terminal to connect as a user with read-only privilege to the region.
      When I enter a query that invokes a put method, I get an odd exception message in gfsh.

      gfsh>query --query="select * from /region1.put('xyz','abc')"
      Message : Exception in evaluating the Collection Expression in getRuntimeIterator() even though the Collection is independent of any RuntimeIterator
      Result  : false
      (noformat}
      Looking in the server log file, it looks like this exception is logged first and later is followed by the more meaningful error:
      

      [warning 2017/10/05 17:53:50.040 PDT serv1 <Function Execution Processor2> tid=0x81] Exception in evaluating the Collection Expression in getRuntimeIterator() even though the Collection is independent of any RuntimeIterator
      org.apache.geode.cache.query.TypeMismatchException: Exception in evaluating the Collection Expression in getRuntimeIterator() even though the Collection is independent of any RuntimeIterator
      at org.apache.geode.cache.query.internal.CompiledIteratorDef.getRuntimeIterator(CompiledIteratorDef.java:127)
      ... <many lines removed>
      Caused by: org.apache.geode.security.NotAuthorizedException: Unauthorized access to method: put
      at org.apache.geode.cache.query.internal.RestrictedMethodInvocationAuthorizer.authorizeMethodInvocation(RestrictedMethodInvocationAuthorizer.java:123)

      
      

      Attachments

        Activity

          People

            jasonhuynh Jason Huynh
            dhardman Diane Hardman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: