-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Intentions ACL enforcement updates #7028
Conversation
Get rid of remnants of enterprise only renaming. Add a WildcardName field for specifying what string should be used to indicate a wildcard.
For read operations they can call anyAllowed to determine if any read access to the given resource would be granted. For write operations they can call allAllowed to ensure that write access is granted to everything.
This also changes how intention:read is granted. Before the Intention.List RPC would allow viewing an intention if the token had intention:read on the destination. However Intention.Match allowed viewing if access was allowed for either the source or dest side. Now Intention.List and Intention.Get fall in line with Intention.Matches previous behavior. Due to this being done a few different places ACL enforcement for a singular intention is now done with the CanRead and CanWrite methods on the intention itself.
7bfe82e
to
75f0f23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great work! 💯
There is one PLEASEFIX
in agent/structs/intention_oss.go
where a bunch of noops are implemented. I think a note on the file's intention, even as a TODO or a short explanation, will be key to inform future maintainers.
The remaining review notes are requests for additional docs and various curiosities I had about the codebase (mostly for my own learning). They are certainly non-blocking, and I trust you to use your best judgement as always for merging.
fc8cd91
to
400cf62
Compare
8bc8463
to
0915ede
Compare
I checked it out and the one failing test is a flake and unrelated to these changes (and it executes properly locally). Going to go ahead and merge this anyways. |
This PR also contains the necessary OSS changes to support namespaces with Consul Enterprise.