emissary
emissary copied to clipboard
Feature Request: injectRequestHeaders can be forwarded as JSON
Please describe your use case / problem.
We are using OAuth2 Filter: https://www.getambassador.io/docs/latest/topics/using/filters/oauth2/
When using the injectRequestHeaders
feature to forward JWT token claims to the upstream as follows:
injectRequestHeaders:
- name: "X-CLAIMS"
value: "{{ .token.Claims }}"
Then the header that is received within the backend service is a GOlang map:
map[acr:1 aud:[ambassador account] auth_time:1.613029988e+09 azp:ambassador email:[email protected] email_verified:false exp:1.613030288e+09 family_name:test given_name:test groups:[/ACME] iat:1.613029988e+09 jti:8f07c3c7-9000-47d5-a505-b83859b2d1bd name:test test preferred_username:test realm_access:map[roles:[offline_access uma_authorization test_role]] resource_access:map[account:map[roles:[manage-account manage-account-links view-profile]]] scope:openid profile email session_state:5c44193b-e893-43cf-a9b6-8752d7d9b772 sub:97603315-709e-415f-9dd6-cdf97fb4716f typ:Bearer]
Describe the solution you'd like
I would like to have the value passed as JSON, thus its easy to process with any language that is used in the backend. (e.g. Java)
would need such a feature, too