high-rose-8124
09/28/2023, 5:59 PMcookie_session
in my scenario.
Problem: I am making an API request to get request a list of objects. In order to do this, I need to pass the identity.id
from the session upstream to my backend API so I can use it to find the objects with the subject. When I log the headers in the backend api, I do not see the subject coming through. I'm kind of lost at this point and cannot find any help from the oathkeeper output logs.
Code:
# Oathkeeper Config
authenticators:
cookie_session:
enabled: true
config:
check_session_url: <http://host.k3d.internal:4000/sessions/whoami>
preserve_path: true
extra_from: "@this"
subject_from: "identity.id"
mutators:
header:
enabled: true
config:
headers:
Subject: "Testing"
# Rules
- id: get-all-objects
version: v0.39.0
match:
url: <.*>/v1/objects
methods:
- GET
authenticators:
- handler: cookie_session
authorizer:
handler: allow
mutators:
- handler: header
errors:
- handler: json