Hi, I am trying to connect Oathkeeper to Ory Keto ...
# talk-oathkeeper
m
Hi, I am trying to connect Oathkeeper to Ory Keto cloud but get a 401 error because Keto requires an Authorization header containing a PAT. Is there away to set the PAT using Oathkeeper config?
r
You mean, hard-code it? A bit of guessing, but I guess your chain is:
Copy code
oathkeeper -> keto/admin
You could probably add rule to oathkeeper to listen to
/secret-admin
and then supply a header in the call with the PAT and oathkeeper would forward it on to the backend? as in,
curl -H 'X-MyHeader: $pat' <http://oathkeeper/secret-admin>
If you don't want validation for that URL/path (and the PAT) you can
noop
on it, and then it should forward it all to your backend. or rewrite it a bit maybe. You could also use
remote_json
or something and do something based on the request, as in (as an example),
if subject == "127.0.0.1" {
add the PAT, and then the PAT is hard coded in your backend service etc.