Skip to content

Commit ef95e7d

Browse files
committed
docs: update documentation with connect acls changes
This PR updates the changelog, adds notes the 1.3 upgrade guide, and updates the connect integration docs with documentation about the new requirement on Consul ACL policies of Consul agent default anonymous ACL tokens.
1 parent b1bca7b commit ef95e7d

File tree

4 files changed

+55
-6
lines changed

4 files changed

+55
-6
lines changed

.changelog/8068.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
```release-note:breaking-change
2+
connect: Consul Service Identity ACL tokens automatically generated for Connect services are now
3+
created as Local rather than Global tokens. Nomad clusters with Connect services making cross-Consul
4+
datacenter requests will need to ensure their Consul agents are configured with anonymous ACL tokens
5+
of sufficient node and service read permissions.
6+
```
7+
8+
```release-note:breaking-change
9+
The minimum Consul version supported by Nomad's Connect integration is now Consul v1.8.0.
10+
```

nomad/job_endpoint_hook_connect.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ func connectGatewayDriverConfig(hostNetwork bool) map[string]interface{} {
6868
// connectSidecarVersionConstraint is used when building the sidecar task to ensure
6969
// the proper Consul version is used that supports the necessary Connect
7070
// features. This includes bootstrapping envoy with a unix socket for Consul's
71-
// gRPC xDS API.
71+
// gRPC xDS API, and support for generating local service identity tokens.
7272
func connectSidecarVersionConstraint() *structs.Constraint {
7373
return &structs.Constraint{
7474
LTarget: "${attr.consul.version}",
75-
RTarget: ">= 1.6.0-beta1",
75+
RTarget: ">= 1.8.0",
7676
Operand: structs.ConstraintSemver,
7777
}
7878
}

website/content/docs/integrations/consul-connect.mdx

+22-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ description: >-
88

99
# Consul Service Mesh
1010

11-
~> **Note:** This guide requires Nomad 0.10.0 or later and Consul 1.6.0 or
12-
later.
13-
1411
~> **Note:** Nomad's service mesh integration requires Linux network namespaces.
1512
Consul service mesh will not run on Windows or macOS.
1613

@@ -58,7 +55,7 @@ The Consul service mesh integration with Nomad requires [Consul 1.6 or
5855
later.](https://releases.hashicorp.com/consul/1.6.0/) The Consul agent can be
5956
run in dev mode with the following command:
6057

61-
**Note**: Nomad's Consul service mesh integration requires Consul in your `$PATH`
58+
~> **Note:** Nomad's Consul service mesh integration requires Consul in your `$PATH`
6259

6360
```shell-session
6461
$ consul agent -dev
@@ -96,6 +93,23 @@ For JSON configurations:
9693
}
9794
```
9895

96+
#### Consul ACLs
97+
98+
~> **Note:** Starting in Nomad v1.3.0, Consul Service Identity ACL tokens automatically
99+
generated by Nomad on behalf of Connect enabled services are now created in [`Local`]
100+
rather than Global scope, and are no longer replicated globally.
101+
102+
To facilitate cross-Consul datacenter requests of Connect services registered by
103+
Nomad, Consul agents will need to be configured with [default anonymous][anon_token]
104+
ACL tokens with ACL policies of sufficient permissions to read service and node
105+
metadata pertaining to those requests. This mechanism is described in Consul [#7414][consul_acl].
106+
A typical Consul agent anonymous token may contain an ACL policy such as:
107+
108+
```hcl
109+
service_prefix "" { policy = "read" }
110+
node_prefix "" { policy = "read" }
111+
```
112+
99113
### Nomad
100114

101115
Nomad must schedule onto a routable interface in order for the proxies to
@@ -326,11 +340,15 @@ dashes (`-`) are converted to underscores (`_`) in environment variables so
326340

327341
## Limitations
328342

343+
- The minimum Consul version to use Connect with Nomad is Consul v1.8.0.
329344
- The `consul` binary must be present in Nomad's `$PATH` to run the Envoy
330345
proxy sidecar on client nodes.
331346
- Consul service mesh using network namespaces is only supported on Linux.
332347
- Prior to Consul 1.9, the Envoy sidecar proxy will drop and stop accepting
333348
connections while the Nomad agent is restarting.
334349

335350
[count-dashboard]: /img/count-dashboard.png
351+
[consul_acl]: https://github.com/hashicorp/consul/issues/7414
336352
[gh-9907]: https://github.com/hashicorp/nomad/issues/9907
353+
[`Local`]: https://www.consul.io/docs/security/acl/acl-tokens#token-attributes
354+
[anon_token]: https://www.consul.io/docs/security/acl/acl-tokens#special-purpose-tokens

website/content/docs/upgrade/upgrade-specific.mdx

+21
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,24 @@ connect {
126126
}
127127
```
128128

129+
#### Changes to Consul Connect Service Identity Tokens
130+
131+
Starting with Nomad 1.3.0, Consul Service Identity Tokens created automatically
132+
by Nomad on behalf of Connect services will now be created as [`Local`] tokens. These
133+
tokens will no longer be replicated globally. To facilitate cross-Consul datacenter
134+
requests of Connect services registered by Nomad, Consul agents will need to be
135+
configured with [default anonymous][anon_token] ACL tokens with ACL policies of
136+
sufficient permissions to read service and node metadata pertaining to those
137+
requests. This mechanism is described in Consul [#7414][consul_acl].
138+
A typical Consul agent anonymous token may contain an ACL policy such as:
139+
140+
```hcl
141+
service_prefix "" { policy = "read" }
142+
node_prefix "" { policy = "read" }
143+
```
144+
145+
The minimum version of Consul supported by Nomad's Connect integration is now Consul v1.8.0.
146+
129147
#### Linux Control Groups Version 2
130148

131149
Starting with Nomad 1.3.0, Linux systems configured to use [cgroups v2][cgroups2]
@@ -1376,3 +1394,6 @@ deleted and then Nomad 0.3.0 can be launched.
13761394
[cap_drop_exec]: /docs/drivers/exec#cap_drop
13771395
[`log_file`]: /docs/configuration#log_file
13781396
[Upgrading to Raft Protocol 3]: /docs/upgrade#upgrading-to-raft-protocol-3
1397+
[`Local`]: https://www.consul.io/docs/security/acl/acl-tokens#token-attributes
1398+
[anon_token]: https://www.consul.io/docs/security/acl/acl-tokens#special-purpose-tokens
1399+
[consul_acl]: https://github.com/hashicorp/consul/issues/7414

0 commit comments

Comments
 (0)