Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-7218

Incorrect permissions when operation performed asynchronously (i.e. with task)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.3
    • 4.5, 4.4.1
    • Tasks
    • Active subscription

    Description

      We are integrating with ServiceNow and need to close an open request when midPoint has performed the operation. For this purpose we are using the attached hook. In order to do this, we are storing the ServiceNow URL and credentials in the System Configuration. 

      Due to the fact that provisioning may take a while, we are calling midpoint.executeChangesAsynchronously in our custom REST service.

      When calling synchronously, or using the same user in the UI, the call to ServiceNow works no problem. When being called from the task that gets created when being called asynchronously, the following line results in an Access Denied, even though the task owner has permission to do the following:

      SystemConfigurationType systemConfigurationType = midpoint.getObject(SystemConfigurationType.class, "00000000-0000-0000-0000-000000000001");
      

      As the user can not retrieve the stored credentials from the system configuration, the rest of the hook also fails.

       

      Attachments

        1. IdentitiesRestService.java
          46 kB
        2. hook_servicenow_close_task.xml
          9 kB
        3. user-operator.xml
          0.3 kB
        4. task-modify.xml
          2 kB
        5. user-test.xml
          0.2 kB
        6. role-operator.xml
          0.6 kB
        7. system-configuration.zip
          9 kB

        Activity

          People

            chris83527 Chris Woods
            chris83527 Chris Woods
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: