Uploaded image for project: 'Identity Gateway'
  1. Identity Gateway
  2. OPENIG-1349

PolicyEnforcementFilter: Cannot use an expression to define a header in the "environment" property

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.5.0
    • Fix Version/s: 5.0.0
    • Component/s: Core
    • Labels:

      Description

      In the configuration of `PolicyEnforcement` we can write for the `environment` setting some expression that are evaluated during the request processing.

      I wanted to use the values of a header in this environment but the expression is not recognized :

      {
        "environment": {
          "MyHeader" : "${request.headers['MyHeader']}"
        }
      }
      

      The expression request.headers['MyHeader'] translate to request.getHeaders().get("MyHeader") that returns a `List<String>` so that fits perfectly the expected type for environment.
      But the expression fails with a message saying that expects a Map of List.

        Attachments

          Activity

            People

            • Assignee:
              laurent.vaills Laurent Vaills
              Reporter:
              laurent.vaills Laurent Vaills
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: