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

Via REST API it is possible to create an assignment with an invalid mappingName

    Details

      Description

      It is possible to create an assignment whose mapping doesn't exist. Therefore when you go and try and view it in the UI all you can see is a blank page with nothing on it.

      Steps to reproduce.
      1) Start IDM
      2) Create an assignment that has a bad mappingName

      curl --insecure \
                                    --header "Content-type: application/json" \
                                    --header "X-OpenIDM-Username: openidm-admin" \
                                    --header "X-OpenIDM-Password: openidm-admin" \
                                    --header "If-None-Match: *" \
                                    --request PUT \
                                    --data '{
                                      "name" : "Contractor",
                                      "description": "Contractor assignment for contract workers.",
                                      "mapping": "mappingThatDoesNotExist",
                                      "attributes": [
                                        {
                                          "name": "ldapGroups",
                                          "value": [
                                            "cn=Contractors,ou=Groups,dc=example,dc=com"
                                          ],
                                          "assignmentOperation" : "mergeWithTarget",
                                          "unassignmentOperation" : "removeFromTarget"
                                        },
                                        {
                                          "name": "employeeType",
                                          "value": "Contractor",
                                          "assignmentOperation" : "mergeWithTarget",
                                          "unassignmentOperation" : "removeFromTarget"
                                        }
                                      ]
                                    }' \
                                    'https://localhost:8443/openidm/managed/assignment/Contractor2'
      

      3) Navigate to Manage->Assignment
      4) Verify that your assignment is there with a mapping that doesn't exist.
      5) Try to view it, yo will see a blank page.

      Attached are images for 3) and 5) views, respectively.

        Attachments

          Activity

            People

            • Assignee:
              joy.feng Joy Feng [X] (Inactive)
              Reporter:
              alin Alin Brici
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: