-
Notifications
You must be signed in to change notification settings - Fork 324
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
Add ACL support #766
Add ACL support #766
Conversation
537b135
to
cee07e4
Compare
Looks like connect appears to not work right now. Moving this PR back to draft until I fix this. |
a8008ac
to
084fa55
Compare
UPDATE: The connect issue has been resolved, but there is a bug in Consul where there isn't a partitioned policy that allows namespace creation. That is being worked on but this PR should have the changes required to work once those changes have been made to Consul. |
9f4e8bb
to
c91a5f7
Compare
charts/consul/test/acceptance/tests/partitions/partitions_test.go
Outdated
Show resolved
Hide resolved
charts/consul/test/acceptance/tests/partitions/partitions_test.go
Outdated
Show resolved
Hide resolved
f94899a
to
dcb2d87
Compare
- Update server-acl-init job to create tokens that are partition aware when Admin Partitions are enabled. - server-acl-init creates a partition-token that is used by partition-init and server-acl-init in non-default-partitions. - Update partition-init to use provided partition-token when ACLs are enabled. - Update license-policy to be acl:write when created in a partition.
8382bc9
to
a1931c4
Compare
@@ -169,6 +173,11 @@ func (c *Command) init() { | |||
c.flags.BoolVar(&c.flagUseHTTPS, "use-https", false, | |||
"Toggle for using HTTPS for all API calls to Consul.") | |||
|
|||
c.flags.BoolVar(&c.flagEnablePartitions, "enable-partitions", false, | |||
"[Enterprise Only] Enables Admin Partitions [Enterprise only feature]") |
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.
probably don't need both Enterprise warnings, I think just the [Enterprise Only]
will do
@@ -382,19 +396,33 @@ func (c *Command) Run(args []string) int { | |||
} | |||
} | |||
|
|||
if c.flagEnablePartitions && c.flagPartitionName == "default" && isPrimary { |
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.
const defaultPartitionName
?
@@ -382,19 +396,33 @@ func (c *Command) Run(args []string) int { | |||
} | |||
} | |||
|
|||
if c.flagEnablePartitions && c.flagPartitionName == "default" && isPrimary { | |||
// Partition token must be local because only the Primary datacenter can have Admin Partitions. |
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.
must be local or can be local? It would still work if it was global, no?
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.
That makes sense. It can
be local. It would still work, but given Admin Partitions are not supported in non-primary DCs, it could be confusing for it to be global. I'll reword this.
mesh = "write" | ||
}` | ||
|
||
func (c *Command) crossNamespaceRule() (string, error) { |
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.
why singular when the rest are plural?
a1931c4
to
cce858e
Compare
91943c9
to
de511ba
Compare
* Use new HashiCorp Docker mirror
Changes proposed in this PR:
How I've tested this PR:
sample server YAML
sample non-server YAML
k8s auth method host and join addresses will vary depending on your clusters. copy over the tls certs for ca-cert and ca-key and also the consul-partitions-acl-token
How I expect reviewers to test this PR:
Checklist: