Skip to content

JWT placeholder resolving does not correctly expand nested arrays #1985

@thjaeckle

Description

@thjaeckle

Question #1984 brought up an issue with the jwt placeholder.

Given the following JWT:

{
  "authorization": {
    "permissions": [
      {
        "scopes": [ "device.read" ],
        "resource_set_id": "123456"
      },
      {
        "scopes": [  "device.read", "device.write" ],
        "resource_set_id": "987654"
      }
    ]
  }
}

And given the following placeholder:

{{ jwt:authorization/permissions/scopes }}

It would be expected that this resolves to:

issuer:device.read
issuer:device.write

Due to the nature of "flattening" arrays.
This however does not work, it resolves to no subjects at all..

The JWT placeholder implementation currently seems to only "flatten" arrays at top level.

It should work "recursively", in arbitrary nested JsonObject / JsonArray constellations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions