-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow multiple rules for one URL #157
Comments
Is there a good library for negative lookahead in Go? I generally agree that there should be some way to have We could probably also add something like We can obviously not detect rule conflicts automatically on start up because we would have to brute force URLs against your rules which is not practical. |
I've already lose track of what's happening. That's why I got this error and that's why I propose this. For me, |
I disagree on priority. Priorities for security sensitive rules can lead to serious security issues. It's better to disallow stuff explicitly. What we could obviously do is to support more than regex matching and have stuff like glob matching which is also a bit easier to use and also supports negative lookahead (I think): https://github.com/gobwas/glob |
Closing in favor of #167 |
We encountered exactly the same problem today. As a temporary hack I used this pattern (edited) for swagger |
Thank you for pointing that out - it is certainly helpful as a workaround until #167 lands! |
I can't figure out how to make this work. I have 2 upstream services. How is #167 helping with this? |
Any updates? |
If URL matches by multiple rules, Oathkeeper returns 500 error
Expected exactly one rule but found multiple rules
. I think, this is bad idea.For example, if we want to add two rules:
/<.*>
with token introspection and/swagger.json
without introspection.Now we can't just add this 2 rules. This enforces us to create many rules for every
/*
route to avoid overlap.This error is not obvious. It will appear only in runtime, Oathkeeper don't test it during rules import.
This is not internal, not server, and not exactly error - so, returning 500 error is wrong
My proposal is to add
priority
field to rule definition, and to apply rule with the highest priority for given URL.Alternative solutions:
exclude_url
field inmatch
The text was updated successfully, but these errors were encountered: