Hey all :wave: Quick question with using Oathkeepe...
# ory-selfhosting
s
Hey all 👋 Quick question with using Oathkeeper - we’re getting an unexpected match error when loading the match url (all running locally and using
etc/hosts)
which returns a nice:
Copy code
{
  "error": {
    "code": 404,
    "status": "Not Found",
    "request": "1aefe479992b0a9e839a50ae3fcbc7e2",
    "message": "Requested url does not match any rules"
  }
}
The accessRule doesn’t give any k8s errors, but the browser returns the previous error. This is the config for our rule:
Copy code
accessRules: |
    [
      {
        "id": "kratos:api",
        "upstream": {
          "url": "<https://httpbin.org/anything/header>",
          "preserve_host": true
        },
        "match": {
          "url": "<http://dashboard.commondatafactory.nl>",
          "methods": ["GET"]
        },
        "authenticators": [{ "handler": "noop" }],
        "authorizer": { "handler": "allow" },
        "mutators": [{ "handler": "noop" }],
      }
    ]
p
Hi @stale-queen-97584 How are you pointing to oathkeeper on
etc/hosts
? I don't think you can specify a port in
etc/hosts
, so are you running oathkeeper on port 80? or do you add a port to the url in the browser? What does the request URL look like in the browser?
s
Hey @proud-plumber-24205 We’re running a local k8s setup where the
etc/hosts
sets the ingress host to localhost. I believe we resolved the issue. It was actually working, but since the external browser doesn’t have access to the cluster, it wouldn’t reach 😅
p
ah okay 🙂 glad it got resolved
s
Thanks for the response!