Another thing - can oathkeeper have a glob or some...
# talk-oathkeeper
t
Another thing - can oathkeeper have a glob or something for it’s rules? I’d like to load all the rules in a folder basically
m
Yea, there is some examples in here: https://www.ory.sh/oathkeeper/docs/api-access-rules/
to match the URLs you can use glob or regex
t
for the access rule urls yeah?
Copy code
access_rules:
  # Locations (list of URLs) where access rules should be fetched from on boot.
  # It is expected that the documents at those locations return a JSON or YAML Array containing ORY Oathkeeper Access Rules.
  repositories:
    # If the URL Scheme is `file://`, the access rules (an array of access rules is expected) will be
    # fetched from the local file system.
    - <file://path/to/*.json>
Should work?
m
I have not tried it myself, but that is how I understood it yes πŸ™‚
t
OK I’ll try it and report back
πŸ™ 1
@User looks like no
Copy code
{"message":"rule: /etc/config/oathkeeper/*.yml: open /etc/config/oathkeeper/*.yml: no such file or directory"},"file":"file:///etc/config/oathkeeper/*.yml","level":"error","msg":"Unable to update access rules from given location, changes will be ignored. Check the configuration or restart the service if the issue persists.","service_name":"ORY Oathkeeper","service_version":"v0.38.15-beta.1","time":"2022-01-26T17:25:47Z"}
πŸ˜“ 1
m
oh no πŸ˜•
I will speak to someone more versed in Oathkeeper and see if we are going the right way about this. If anyone else tried this out let us know πŸ™
t
The goal of course is to import a folder of config rules without knowing their names ahead of time
m
Hey to follow up, this is (most likely) on the roadmap for the Oathkeeper Next Gen: https://github.com/ory/oathkeeper/issues/441 but currently not possible.
t
πŸ†— Thanks @User