NET-5590 - authorization: check for identity:write in CA certs, xds server, and getting envoy bootstrap params#19049
Merged
NET-5590 - authorization: check for identity:write in CA certs, xds server, and getting envoy bootstrap params#19049
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
…erver, and getting envoy bootstrap params
zalimeni
approved these changes
Oct 3, 2023
Member
zalimeni
left a comment
There was a problem hiding this comment.
LGTM, AFAICT this is identical to previously reviewed Ent changes +/- one whitespace diff.
| if err := allow.IdentityWriteAllowed(p.Identity.Name, resource.AuthorizerContext(p.Identity.Tenancy)); err != nil { | ||
| return err | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
~ Looks like maybe discrepancy between Ent and this change due to whitespace, which may also be impacting the linter errors?
Member
Author
There was a problem hiding this comment.
yes. thanks. something got off with my commits and the script did not work, so I had to generate this by hand. I will fix. Thanks for pointing this out!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
PR Discussion: https://github.com/hashicorp/consul-enterprise/pull/6760#discussion_r1319233169
TODO in code: https://github.com/hashicorp/consul/blob/main/agent/consul/leader_connect_ca.go#L1459
AuthorizeAndSignCertificate is called from two places and both resolve the authorizer from the token. So, we can utilize IdentityWriteAllowed which will pass in the authorizer based on the token to achieve Check for identity:write on the token when identity permissions are supported.
consul/agent/grpc-external/services/connectca/sign.go
Lines 71 to 76 in 21ea527
consul/agent/consul/connect_ca_endpoint.go
Lines 155 to 161 in 21ea527
Acceptance Criteria:
PR Checklist