I'm stuck at the moment. Setup: I am eventually m...
# talk-oathkeeper
h
I'm stuck at the moment. Setup: I am eventually migrating to full Ory Network, but I am using self-hosted Oathkeeper+Keto. Right now, I am using Ory Network to manage the identities and sessions which is a
cookie_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:
Copy 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