I’m currently having issues with trying to get oat...
# general
p
I’m currently having issues with trying to get oathkeeper headers working.
Copy code
config:
      check_session_url: <https://slug.projects.oryapis.com/sessions/whoami>
      preserve_path: true
      token_from:
        header: X-Authorization
      forward_http_headers:
        - X-Authorization
        - X-Device-Token
      subject_from: "identity.id"
      extra_from: "@this"
The X-Device-Token isn’t being forwarded. The header appears in the logs in the docker container, but it never reaches the backend api. Am I doing something wrong here? This is in a local dev environment using traefik as a forward proxy, but I don’t think any of the settings there are the issue since the header appears in the logs. Additionally, I’ve tried to use a custom header X-Authorization for the token_from option, but that isn’t working. Just wanted to check here to see if anyone had any pointers on what might be going wrong. Here is a sample rule from my rules.json file:
Copy code
{
      "authenticators": [
         {
            "handler": "cookie_session"
         },
         {
            "handler": "bearer_token"
         }
      ],
      "authorizer": {
         "handler": "allow"
      },
      "id": "user",
      "match": {
         "methods": [
            "GET",
            "PATCH"
         ],
         "url": "<https://localhost/v1/user/me>"
      },
      "mutators": [
         {
            "handler": "id_token"
         }
      ],
      "version": "v0.36.0-beta.4"
   },
Update: I ended up just adding a header mutation and forwarding the data that way instead. Wasn’t able to get the forward_http_headers to work.
Copy code
header:
    enabled: true
    config:
      headers:
        X-Session-Token: '{{ .MatchContext.Header.Get "authorization" }}'
        X-Device-Token: '{{ .MatchContext.Header.Get "x-device-token" }}'
🤔 1