-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Implement additional matching strategies and use negative lookahead regex #321
Comments
Hi, @aeneasr How about this package: regexp2? It has MIT License and provides extensive functionality. The last commit was made 4 months ago. However, It does not have godoc documentation Here is an example with negative lookahead. As far as I understand, we will have to replace previous What do you think? |
…143) Package "github.com/dlclark/regexp2" supports negative lookahead, which is required by ory/oathkeeper#321 Signed-off-by: Aynur Zulkarnaev <[email protected]>
Hi @aeneasr. Regarding the glob matching:
What do you think? By the way, there are some failing tests in the master branch. In particular, in file request_handler_test.go. |
I really like that plan! I think
I'm not able to reproduce that - the CI is also passing? |
Well, actually it works fine:) The case is that I cloned the repo not to $GOPATH, but to another location. And tests didn't find configuration files. If I put the repo into $GOPATH, it works fine. |
Ah I see - makes sense :) |
This patch adds the ability to choose a matching strategy and adds a glob-based matching strategy to the available options (regex is still the default). Closes #321
Is your feature request related to a problem? Please describe.
At the moment, access rules will match based on a regular expression, as documented here (see bullet point
match
).There are two problems related to that:
Describe the solution you'd like
For regex, we should pick a different library (research needed as to which library suits the best) - one that supports negative lookahead/behind and replace the stdlib regex with that one. There should not be any backwards incompatible changes here!
For glob matching, we should use gobwas/glob. Before implementing glob matching, we have to decide:
Once these decisions are made, we need to:
The text was updated successfully, but these errors were encountered: