-
Notifications
You must be signed in to change notification settings - Fork 326
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 duplicate key in connect-inject ACL policy #4434
Conversation
partition "part-1" { | ||
mesh = "write" | ||
acl = "write" | ||
node_prefix "" { | ||
policy = "write" | ||
} | ||
policy = "write" | ||
acl = "write" | ||
service_prefix "" { | ||
policy = "write" | ||
intentions = "write" | ||
} | ||
identity_prefix "" { | ||
policy = "write" | ||
intentions = "write" | ||
} |
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.
You can see the bug here where acl = "write"
winds up being included twice in the root of the policy whenever namespaces are disabled.
The later commit in this PR that adjusts the test assertions after the fix should indicate no scenario in which acl
or any other type of rule is included twice at the same level.
Changes proposed in this PR
Stop including a duplicate
acl = "write"
rule at the root level of the connect-inject ACL policy when namespaces are not enabled. The security patch in hashicorp/consul#21908 led to the connect-injector being unable to start up as its ACL policy is rejected by Consul.How I've tested this PR
acl = "write"
never appears twice at the root level of the policy with any combination of flagsHow I expect reviewers to test this PR
Review commit-by-commit observing the above
Checklist