Hi everybody, I haven't been around much in the Sl...
# talk-oathkeeper
l
Hi everybody, I haven't been around much in the Slack but I'm currently working on a project that use the entire Ory stack. The main issue I have for this project (and others I have in mind like a proper Kubernetes ingress controller or Gateway API implementation based on oathkeeper) is around oathkeeper and easily being able to route using path prefixes. Currently this isn't possible with glob pattern matching, and while theoretically possible using regex and negative lookahead creating patterns for prefix based routing is extremely difficult in a highly dynamic environment. To solve for this I created a quick PR that allows for easy path prefixed based routing using a Trie. There are still some implementation details that I think need to be further discussed, but I believe this approach could solve what I believe to be the biggest limitation in oathkeeper. https://github.com/ory/oathkeeper/pull/1073
c
this perfectly addresses a need I have. Will pull and check it out ! thanks !
l
Please note the implementation isn’t really ready yet for actual usage. I’d like to open the dialogue of how this could best be integrated with the core development team.
But it would be great to get your opinion and thoughts on this in the PR comments.
@curved-oxygen-35290 I've just pushed a new commit that cleans things up a bit and adds a separate config for enabling prefix matching. If multiple rules are found based on matching the path prefix it will further filter those rules using the matching strategy.
You should be able to set
access_rules.prefix_matching_enabled = true
in the config to test it
Note that I haven't actually deployed and tested it myself yet since I'm very busy, but the unit tests I added pass so I believe it should work
Do note that you will only be able to use regex or glob patterns in the path. Not in the hostname or scheme section of the rule.
c
it's the path that's killing me atm 😉
l
Yeah I think it's the simple paths that are killing most people here haha