curved-florist-98287
11/29/2023, 7:57 AM{
"id": "ui:partners:public:pages",
"description": "Partners public pages",
"upstream": {
"url": "<http://ol-bff:3000>",
"preserve_host": false
},
"match": {
"url": "<{<http://localhost:4455>,<https://mylo.ol.dev.internal.btechlabs.io>}>/partner/<{login,resetPassword,resetPasswordSuccess,forgetPassword,activate,register,cashier/register}{/,}>",
"methods": [
"GET",
"POST"
]
},
"authenticators": [
{
"handler": "bearer_token"
},
{
"handler": "cookie_session"
}
],
"authorizer": {
"handler": "remote_json",
"config": {
"remote": "<http://mylo-iam-keto-read:4466/relation-tuples/check>",
"payload": "{\"namespace\":\"RelationshipManager\",\"object\":\"b_labs\",\"relation\":\"createPartner\",\"subject_set.namespace\":\"User\",\"subject_set.object\":\"{{print.Subject}}\",\"subject_set.relation\":\"members\"}"
}
},
"mutators": [
{
"handler": "noop"
}
],
"errors": []
}
The "authorizer" section is giving an error "wrong number of args for print: want 1 got 0", Can you spot the issue with the "remote_json" payload?chilly-king-10285
11/29/2023, 7:57 AMchilly-king-10285
11/29/2023, 7:58 AMprint
function in your remote_json
payload is expecting an argument but isn't receiving one. In your payload: json "payload": "{\"namespace\":\"RelationshipManager\",\"object\":\"b_labs\",\"relation\":\"createPartner\",\"subject_set.namespace\":\"User\",\"subject_set.object\":\"{{print.Subject}}\",\"subject_set.relation\":\"members\"}"
The print
function is used like {{print .Subject}}
. This function is used to print the value of the Subject
field from the AuthenticationSession
object. If the Subject
field is not available in the AuthenticationSession
object or is not being passed correctly, you might encounter this error. Ensure that the Subject
field is available and correctly passed to the print
function. If the issue persists, you might want to check the Ory Oathkeeper documentation or seek help from the Ory community. For more details, refer to the [Ory documentation](https://www.ory.sh/docs/oathkeeper/pipeline/authz).