OpenID Connect Plugin Nested Objects

I was trying to configure the “Upstream Headers Claims” via Konnect UI. The plugin documentation says the following:

“The upstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.”

As an example I’m trying to get key2’s value where the payload is like:

{
“parent”: {
“childA”: {
“key1”: “val1”
},
“childB”: {
“key2”: “val2”
}
},
“exp”: 1716237722,
“grant_type”: “client_credentials”

}

I’ve tried tons of different variants and searched many forums. The plugin can grab the value of “parent” and then put it as a base64 encoded header value. But I don’t want everything nested under “parent”, just key2’s value.

The documentation seems to say this is possible as noted above where it references nested objects in the token. Can someone tell me if it is possible and if so how to set the “Upstream Headers Claims” and “Upstream Headers Names” to get the plugin to get a nested object/value?

Either the yaml or json would be very helpful! Thanks!!!

hi @hallm

There is support only for top level. The backend has to parse it. We’ll look at updating documentation to make it more clear that it is top level support only.

-Thanks
Veena

Thanks Veena… I guess we’ll need to write a custom plugin unfortunately.

Updating the documentation would be great… ty… i tried like 30 different combinations trying to get it to parse out the nested value… very frustrating.

It would be a great feature to have if it could go at least 2 or 3 levels deep.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.