Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-10015

CIP not properly resolving objects from JSON request body

    XMLWordPrintable

    Details

      Description

      Currently, the following configuration in policy-enforcer will not resolve to claim:

      {
          "path": "/claims-from-body-json-object",
          "methods": [
              {
                  "method": "POST",
                  "scopes": [
                       "create"
                  ]
               }
           ],
           "claim-information-point": {
                "claims": {
                    "individualRoles": "{request.body['/Individual/individualRoles']}"
                 }
            }
       }
      

      We should properly resolve objects from a JSON request body where the claim value would be:

      {"roleSpec":2342,"roleId":4234}
      

      Where the request body is a JSON as follows:

      {
          "Individual" : {
              "Name":  "John",
              "Lastname":  "Doe",
              "individualRoles" : [
                  {
                      roleSpec: 2342,
                      roleId: 4234
                   }
              ]
          }
      }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pcraveiro Pedro Igor Silva
                Reporter:
                pcraveiro Pedro Igor Silva
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: