Skip to content
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

fix: use glob matcher in casbin built-in model #3966

Merged
merged 1 commit into from
Jul 20, 2020

Conversation

alexmt
Copy link
Collaborator

@alexmt alexmt commented Jul 20, 2020

Closes #3963

PR updates built-in casbin model to use globMatch instead of keyMatch that implements proper glob matching.

@alexmt alexmt added cherry-pick/1.5 Candidate for cherry picking into 1.5 release branch cherry-pick/1.6 Candidate for cherry picking into 1.6 release branch labels Jul 20, 2020
@alexmt alexmt requested review from jannfis and jessesuen July 20, 2020 19:06
Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. LGTM, with just a minor comment,

@@ -128,6 +128,7 @@ p, mike, *, *, foo/obj, deny
p, trudy, applications, get, foo/obj, allow
p, trudy, applications/*, get, foo/obj, allow
p, trudy, applications/secrets, get, foo/obj, deny
p, danny, applications, get, */obj, allow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to add some more wildcard patterns to test against, somewhere in the middle etc. Just to make sure :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added one more case with * in the middle with two checks.

@alexmt alexmt force-pushed the 3963-rbac-policy-glob branch from f9fbbd0 to 2e2a67c Compare July 20, 2020 20:33
@alexmt alexmt merged commit dfd7457 into argoproj:master Jul 20, 2020
@alexmt alexmt deleted the 3963-rbac-policy-glob branch July 20, 2020 20:56
alexmt pushed a commit to alexmt/argo-cd that referenced this pull request Jul 29, 2020
rachelwang20 pushed a commit to rachelwang20/argo-cd that referenced this pull request Aug 5, 2020
@jannfis jannfis mentioned this pull request Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick/1.5 Candidate for cherry picking into 1.5 release branch cherry-pick/1.6 Candidate for cherry picking into 1.6 release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

argocd RBAC project * wildcard matches all apps in all projects
3 participants