Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWT placeholder resolving does not correctly expand nested arrays #1985

Closed
thjaeckle opened this issue Jul 18, 2024 · 0 comments · Fixed by #1996
Closed

JWT placeholder resolving does not correctly expand nested arrays #1985

thjaeckle opened this issue Jul 18, 2024 · 0 comments · Fixed by #1996
Labels
Milestone

Comments

@thjaeckle
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant