steep-pencil-94861
07/05/2023, 6:54 PM[]string
. Here is a sample of my configuration (see claims
key):
authorizers:
remote_json:
enabled: true
config:
remote: <http://authz-service:4242/decide>
payload: |
{
"input": {
"sub": "{{ print .Subject }}",
"bike": {{ or (print .Extra.hasBike) "false" }},
"claims": {{ printf "%+q" .Extra.claims }}
}
}
I’ve followed the documentation provided by Ory here. In the current setup, oathkeeper gives me the following error:
message:payload is not a JSON text: invalid character '%' looking for beginning of value
If I try to escape the printf
with printf \"%+q\" .Extra.claims
I get another error: unexpected "\\" in operand
.
Any ideas/pointers into how to fix that ?icy-manchester-83109
07/05/2023, 7:08 PMjoin
function to achieve your goal. Take a look here for usage examples: http://masterminds.github.io/sprig/string_slice.htmlsteep-pencil-94861
07/05/2023, 11:22 PM