orange-telephone-40607
08/09/2023, 4:57 AMbrave-pillow-3744
08/09/2023, 6:58 AMmutators:
header:
enabled: true
config:
headers:
client_id: "{{ index .Extra `<https://example.com/client_id>` }}"
iss: "{{ print .Extra.iss }}"
scope: "{{ print .Extra.scope }}"
orange-telephone-40607
08/18/2023, 10:16 AMorange-telephone-40607
08/18/2023, 10:17 AMbrave-pillow-3744
08/19/2023, 8:43 AM{{ index (index . `urn:zitadel:iam:user:metadata`) `bankCode` }}
To test it out and play around you can use https://gotemplate.io/
PS: I am also pretty new to Golang and text templates.orange-telephone-40607
08/19/2023, 9:21 AMorange-telephone-40607
08/22/2023, 7:32 AMurn:zitadel:iam:user:metadata
) userName
}}" in rule "allow-anonymous-with-header-mutator": template: allow-anonymous-with-header-mutatorapiusername110 executing "allow-anonymous-with-header-mutator:apiusername" at <index . `urnzitadeliamusermetadata`>: error calling index: can't index item of type authn.AuthenticationSession] granted=false http_host=localhost:4455 http_method=POST http_url=http://localhost:4455/xyz/abc http_user_agent=PostmanRuntime/7.32.3 service_name=ORY Oathkeeper service_version=v0.40.3orange-telephone-40607
08/22/2023, 7:44 AMorange-telephone-40607
08/22/2023, 10:53 AM> Subscribe now: http://eepurl.com/di390P <<time=2023-08-22T104536Z level=fatal msg=Failed to initialize configuration audience=application error=map[messageyaml invalid map key: map[string]interface {}{"index (index .
urn:zitadel:iam:user:metadata
) `userName`":interface {}(nil)}] service_name=ORY Oathkeeper service_version=v0.40.3brave-pillow-3744
08/23/2023, 6:45 AM{{ index (index .Extra `urn:zitadel:iam:user:metadata`) `bankCode` }}
I had the same use case and this is the working solution that I’m using in oathkeeper.orange-telephone-40607
08/23/2023, 7:02 AMbrave-pillow-3744
08/23/2023, 10:18 AM"encoding/base64"
package to decode base64 data. In the text template, there is no option to import packages in the text template handler.