Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-3857

Cannot pass along custom context when making router requests from script

    Details

    • Sprint:
      OpenIDM Sprint 47

      Description

      Router calls from scripts using the "openidm" object are not able to define the context to use when executing that request. This is a regression from 3.2, and it prevents things like the linkedView from preventing information leakage based on authz filter logic.

      It is expected that this should work, for example:

      openidm.read(resourceId, null, context.current)

      Presently such a call will fail.

      This can be easily demonstrated using a custom endpoint, a sample command for doing so included below:

      curl -u openidm-admin:openidm-admin --data '{"type":"text/javascript", "source": "openidm.read(\"config/managed\", null, context.current);"}' 'http://localhost:8080/openidm/config/endpoint/temp' -X PUT -H 'Content-type: application/json' -H 'If-None-Match: *'
      
      curl -u openidm-admin:openidm-admin 'http://localhost:8080/openidm/endpoint/temp'
      

      The above will fail with this output:

      {"code":500,"reason":"Internal Server Error","message":"Wrapped java.lang.NoSuchMethodException: Method not found read(String,null,LinkedHashMap) (0ACDFE3233396FE3AB3318DB0528AA596AFBF963#1) in 0ACDFE3233396FE3AB3318DB0528AA596AFBF963 at line number 1 at column number 0","detail":{"fileName":"0ACDFE3233396FE3AB3318DB0528AA596AFBF963","lineNumber":1,"columnNumber":0}}
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brmiller Brendan Miller
                Reporter:
                jake.feasel Jake Feasel
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: