Why are my rules not matching? According to the do...
# talk-oathkeeper
b
Why are my rules not matching? According to the docs I think this should work
Copy code
{
  "audience": "application",
  "error": {
    "debug": "",
    "message": "Requested url does not match any rules",
    "reason": "",
    "status": "Not Found",
    "status_code": 404
  },
  "granted": false,
  "http_host": "oathkeeper-api.auth.svc:4456",
  "http_method": "GET",
  "http_url": "<https://pgweb.talos.example.nl/>",
  "http_user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0",
  "level": "warning",
  "msg": "Access request denied",
  "service_name": "ORY Oathkeeper",
  "service_version": "v0.39.0",
  "time": "2022-09-23T13:41:40Z"
}
Copy code
apiVersion: <http://oathkeeper.ory.sh/v1alpha1|oathkeeper.ory.sh/v1alpha1>
kind: Rule
metadata:
  name: pgweb-oath-rule
  namespace: auth
spec:
  authenticators:
  - handler: cookie_session
  authorizer:
    handler: allow
  mutators:
  - handler: noop
  match:
    url: <https|http>://pgweb.talos.example.nl/<.*>
    methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS", "HEAD"]
r
you have a
<
in front
oops, nm
probably this:
I seem to use a different pattern to match:
Copy code
<{https,http}>://pgweb.talos.example.nl<{/,**}>
forgot where, but i think i use glob
yes, in `config.yml`:
Copy code
access_rules:
  matching_strategy: glob
b
Turns out my rules were not getting loaded 😕
Was using a custom config and somehow the rules didn't end up loading
r
Yay fixed 😄
b
Thanks for the help :)
r
All you, I didn’t do much.
rubber duck