Skip to content

Commit 2f1ea65

Browse files
authored
docs(policy): clarify sandbox-local loopback access (NVIDIA#3740)
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 4ce767f commit 2f1ea65

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

‎docs/how-it-works/policies/network-rules.mdx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,11 @@ OpenShell blocks connections to private network addresses by default to prevent
353353
server-side request forgery (SSRF). An endpoint with an exact hostname can still
354354
reach the private addresses that its hostname resolves to, unless the endpoint
355355
comes from an approved [policy advisor](/how-it-works/policies/advisor)
356-
proposal. Loopback, link-local, and unspecified addresses, including the cloud
357-
metadata address `169.254.169.254`, are always blocked.
356+
proposal. Network policy never authorizes an outbound endpoint whose destination
357+
is loopback, link-local, or unspecified, including the cloud metadata address
358+
`169.254.169.254`. This restriction does not apply to sandbox-local loopback
359+
connections: a workload can reach a service listening on `127.0.0.1` in the
360+
same sandbox.
358361

359362
Use `allowed_ips` to limit the addresses an endpoint can reach, or to let a
360363
wildcard host such as `*.internal.example` reach private addresses. This rule

‎docs/how-it-works/policies/schema.mdx‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,16 @@ reach the private addresses they resolve to, unless the endpoint comes from an
137137
approved policy advisor proposal. Wildcard and hostless endpoints can reach
138138
private addresses only through `allowed_ips`.
139139

140-
Loopback, link-local, and unspecified addresses, including the cloud metadata
141-
address `169.254.169.254`, are always blocked. `openshell policy update` rejects
142-
an `allowed_ips` entry that overlaps them, and in a complete policy such an
143-
entry blocks every connection to the endpoint. OpenShell also blocks the
144-
Kubernetes and etcd control-plane ports 2379, 2380, 6443, 10250, and 10255 on
145-
endpoints that use an exact hostname, an IP address, or `allowed_ips`. A rule
146-
for `host.openshell.internal` can still reach services on the gateway host.
140+
Network policy never authorizes an outbound endpoint whose destination is
141+
loopback, link-local, or unspecified, including the cloud metadata address
142+
`169.254.169.254`. This does not prevent a workload from connecting to a
143+
sandbox-local service listening on loopback. `openshell policy update` rejects
144+
an `allowed_ips` entry that overlaps the blocked ranges, and in a complete
145+
policy such an entry blocks every connection to the endpoint. OpenShell also
146+
blocks the Kubernetes and etcd control-plane ports 2379, 2380, 6443, 10250,
147+
and 10255 on endpoints that use an exact hostname, an IP address, or
148+
`allowed_ips`. A rule for `host.openshell.internal` can still reach services on
149+
the gateway host.
147150

148151
#### Inspection Fields
149152

‎docs/observability/logging.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Common reason phrases emitted by the sandbox include:
194194
| Reason | Meaning |
195195
|---|---|
196196
| `no matching policy` | OPA evaluated the request and no allow rule matched. |
197-
| `resolves to always-blocked address` | The destination resolved to loopback, link-local, or unspecified. These ranges are always blocked, even when listed in `allowed_ips`. |
197+
| `resolves to always-blocked address` | An outbound policy endpoint resolved to loopback, link-local, or unspecified. Network policy cannot authorize these destinations, even when they appear in `allowed_ips`; sandbox-local loopback connections do not use this policy path. |
198198
| `resolves to <ip> which is not in allowed_ips, connection rejected` | The destination resolved to an IP outside the policy's `allowed_ips` allowlist. |
199199
| `DNS resolution failed for <host>:<port>` | The proxy could not resolve the destination. |
200200
| `port <n> is a blocked control-plane port, connection rejected` | The destination port matches a control-plane port (etcd, Kubernetes API, kubelet) and is always blocked. |

0 commit comments

Comments
 (0)