Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-11118

REST call allows for realm name with space when creating realm

    Details

    • Sprint:
      AM Sustaining Sprint 53, AM Sustaining Sprint 54, AM Sustaining Sprint 55
    • Story Points:
      2
    • Verified Version/s:

      Description

      When creating a realm with a REST call, the user is allowed to create a realm with a space in the name. This is not allowed in the XUI or in SSOADM.

      To recreate:

      1. Run the following curl command:

      curl --request POST --header "Content-Type: application/json" --header "iplanetDirectoryPro: [ENTER ADMIN TOKEN]" --data '

      {"realm": "/my realm", "active": "true", "parentPath": "/"}

      ' http://host1.example.com:8080/openam/json/realms?_action=create

      2. Observe the following:

      {"realmCreated": "/my realm"}

      If this is attempted with the following REST call the user will not be able to create the realm:

      curl --request POST --header "Content-Type: application/json" --header "iplanetDirectoryPro: [ENTER ADMIN TOKEN]" --data '

      {"realm": "/my realm", "active": "true", "parentPath": "/"}

      ' http://host1.example.com:8080/openam/global-config/json/realms?_action=create

      The user will receive a code 400 along with a message telling them that a space is not a valid character.

      If the user tries to create a realm with a space in the XUI, the user also receive the same 400 error code screen shot attached.

      If the user tries to create a realm with ssoadm:

      ./ssoadm create-realm -e "my realm" -u amadmin -f pwd.txt

      They receive the following:

      java.net.URISyntaxException: Illegal charactdr in path at index 58 http://host1.example.com:8080/openam/json/realm-audit/my realm/access?_action=create

      The expected behavior is that a user should not be able to create a realm with a space using a REST call

        Attachments

          Activity

            People

            • Assignee:
              sachiko Sachiko Wallace
              Reporter:
              abel.hoxeng Abel Hoxeng
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: