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

grpc/acl: relax permissions required for "core" endpoints #15346

Merged
merged 1 commit into from Jan 4, 2023

Conversation

boxofrad
Copy link
Contributor

Description

Previously, these endpoints required service:write permission on any service as a sort of proxy for "is the caller allowed to participate in the mesh?".

Now, they're called as part of the process of establishing a server connection by any consumer of the consul-server-connection-manager library, which will include non-mesh workloads (e.g. Consul KV as a storage backend for Vault) as well as ancillary components such as consul-k8s' acl-init process, which likely won't have service:write permission.

So this commit relaxes those requirements to accept any valid ACL token on the following gRPC endpoints:

  • hashicorp.consul.dataplane.DataplaneService/GetSupportedDataplaneFeatures
  • hashicorp.consul.serverdiscovery.ServerDiscoveryService/WatchServers
  • hashicorp.consul.connectca.ConnectCAService/WatchRoots

Previously, these endpoints required `service:write` permission on _any_
service as a sort of proxy for "is the caller allowed to participate in
the mesh?".

Now, they're called as part of the process of establishing a server
connection by any consumer of the consul-server-connection-manager
library, which will include non-mesh workloads (e.g. Consul KV as a
storage backend for Vault) as well as ancillary components such as
consul-k8s' acl-init process, which likely won't have `service:write`
permission.

So this commit relaxes those requirements to accept *any* valid ACL token
on the following gRPC endpoints:

- `hashicorp.consul.dataplane.DataplaneService/GetSupportedDataplaneFeatures`
- `hashicorp.consul.serverdiscovery.ServerDiscoveryService/WatchServers`
- `hashicorp.consul.connectca.ConnectCAService/WatchRoots`
@boxofrad boxofrad added the backport-inactive/1.14 This release series is longer active label Nov 22, 2022
@boxofrad boxofrad merged commit 7c7503c into main Jan 4, 2023
@boxofrad boxofrad deleted the boxofrad/relax-permissions branch January 4, 2023 12:40
boxofrad added a commit that referenced this pull request Jan 5, 2023
Fixes a bug introduced by #15346 where we'd always require an ACL
token even if ACLs were disabled because we were erroneously
treating `nil` identity as anonymous.
boxofrad added a commit that referenced this pull request Jan 5, 2023
Fixes a bug introduced by #15346 where we'd always require an ACL
token even if ACLs were disabled because we were erroneously
treating `nil` identity as anonymous.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-inactive/1.14 This release series is longer active
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants