Skip to content

fix(network): require explicit grants for private IP literals - #5522

Merged
elezar merged 2 commits into
mainfrom
fix/private-ip-policy-grants/alangou
Nov 13, 2026
Merged

elezar merged 2 commits into
mainfrom
fix/private-ip-policy-grants/alangou

Conversation

@alangou

@alangou alangou commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Require an explicit policy grant for private IP literals matched by wildcard endpoints.

Why

Restore the intended private-destination policy while preserving exact endpoint and allowed_ips grants.

Changes

  • Reject private literals without the required grant at destination planning.
  • Keep valid policy DNS endpoints when another matching endpoint is ineligible.
  • Add destination and policy DNS regression tests.

Related issue

N/A

Scope

Supervisor destination authorization and policy DNS eligibility.

Testing

  • Package-scoped cargo fmt and offline, locked Clippy pass.
  • All 11 regression tests pass. Four detect the defect before the correction.
  • Isolated HTTP check blocks the ungranted destination and preserves the explicit grant.

Full deployed sandbox E2E has not run.

Checklist

  • Conventional Commits and DCO sign-off.
  • Independent source review completed.
  • Full deployed sandbox E2E.

Signed-off-by: Adrien Langou <alangou@nvidia.com>
Signed-off-by: Adrien Langou <alangou@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 12, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 12, 2026
@alangou
alangou marked this pull request as ready for review November 12, 2026 18:27
@alangou alangou added the test:e2e Requires end-to-end coverage label Nov 12, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied, but pull-request/5522 does not exist yet. A maintainer needs to comment /ok to test d48c529f31d9428ecf2e97b5b567953133392c76 to mirror this PR. Once the mirror exists, re-apply the label or re-run Branch E2E Checks from the Actions tab.

@alangou

alangou commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test d48c529

@elezar
elezar added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 7cfa0c0 Nov 13, 2026
264 of 267 checks passed
@elezar
elezar deleted the fix/private-ip-policy-grants/alangou branch November 13, 2026 15:40
cv added a commit to NVIDIA/NemoClaw that referenced this pull request Nov 18, 2026
Moves NemoClaw's OpenShell pins from v0.1.8 to v0.1.9: the native CLI,
the gateway, supervisor and sandbox images, the gateway chart, the
OpenShell crates, and the vendored SDK. A published managed Kubernetes
gateway now disables the chart's metrics with `metrics.enabled: false`,
which v0.1.9 requires, and the live middleware fixture moves to
OpenShell's HTTP hooks. Deployments built from this revision run
OpenShell v0.1.9, whose chart applies `caConfigMap`'s CA only to the
OIDC issuer.

## Problem

NemoClaw pins OpenShell v0.1.8 (`f3d9765`). v0.1.9 (`ce58cf8`, 51
commits later) is the latest release, and it changes three things
NemoClaw depends on:

- The chart refuses `service.metricsPort: 0` (NVIDIA/OpenShell#5478),
which NemoClaw sets on a gateway published through `expose.service`; the
chart's exposed contract scenario fails to render with
`service.metricsPort must be an integer between 1 and 65535; to disable
metrics, set metrics.enabled=false`.
- `server.oidc.caConfigMapName` no longer sets a process-wide
`SSL_CERT_FILE` on the gateway; the chart renders
`[openshell.gateway.oidc] ca_bundle`, so the CA applies only to OIDC
discovery and JWKS requests (NVIDIA/OpenShell#3673).
- Middleware selectors with a port fail validation, and the legacy
`EvaluateHttpRequest` and `HttpResponsePreReturn` hooks are deprecated,
to be removed in 0.2.0 (NVIDIA/OpenShell#4359).

Part of #13829: it settles question 2 of [cv's
answers](#13829 (comment)),
keeping `caConfigMap` as a typed field under
`target.kubernetes.authentication`. With v0.1.8 the chart turned that
ConfigMap into the gateway's process-wide `SSL_CERT_FILE`, so a field
named for the issuer's CA also set the trust of the gateway's other
HTTPS clients; with v0.1.9 it affects only the issuer, which is what a
typed authentication field says. The rest of #13829 (pull Secrets,
Docker and Podman ports, the `openshift` target) doesn't depend on this
upgrade, and the OpenShift UID nulls stay until NVIDIA/OpenShell#5483.

## Change

- **Pins:** the Cargo revision of `openshell-core`, `openshell-sdk` and
`openshell-policy`, and of the vendored SDK's `openshell-core` and
`openshell-crypto`; in `versions.json`, the version, revision, Linux CLI
archives, gateway, supervisor and sandbox images, and gateway chart; the
managed-gateway reference, a contract test and the gateway contract
module, which carry the gateway digest. The CLI checksums come from the
release's `openshell-checksums-sha256.txt`; the image and chart digests
come from GHCR's `0.1.9` tags, and GHCR's `0.1.8` tags match the
previous pins. `Cargo.lock` changes only the five OpenShell crates'
revision.
- **Vendored SDK:** upstream changed `src/client.rs` and `src/raw.rs` (a
raw `ServiceDiscovery` client), `src/transport.rs` and
`tests/client_mock.rs`, copied unchanged. The SDK manifest still enables
core telemetry, so the manifest patch stays; `NOTICE.md` records the
refresh. The SDK integration limits in
`internal-docs/design/architecture.md` still hold at v0.1.9 and cite
that revision.
- **Published gateway metrics:** `expose.service` sets the chart's
`metrics.enabled: false` instead of `service.metricsPort: 0`, so the
NodePort Service still publishes only the gRPC port and the gateway
serves no plaintext metrics. This deletes the `metricsPort` workaround
and its comment, which #14313 left for this upgrade. The chart
contract's exposed scenario failed with the v0.1.9 chart before the
change and passes after it.
- **Middleware:** the `docker-dummy` live case's middleware fixture
implements OpenShell's `HttpHooks` service and requires the
`openshell.supervisor-middleware.http-hooks` capability, deciding at
preflight without the body; it answers the legacy `EvaluateHttpRequest`
with `UNIMPLEMENTED`. The case's registration and assertions are
unchanged. A middleware selector with a port is a new case in the SDK's
OpenShell-validation test, which failed against v0.1.8 and passes
against v0.1.9; the selector's schema description and the sandbox
network guide say hosts take no port.
- **Docs:** OpenShell links move to the v0.1.9 revision; each path and
anchor exists there, and the three proxy line ranges in the sandbox
network guide move 71 lines down to the same text. The Kubernetes guide
says the gateway trusts `caConfigMap`'s CA only for the issuer.
- **Release notes** list the new pin and the v0.1.9 changes users see,
with two breaking changes: a middleware selector with a port fails plan,
and a DNS-glob endpoint no longer admits a private IP literal on its own
(NVIDIA/OpenShell#5522).

## Upgrade notes checked

- **Supervisor shutdown** (NVIDIA/OpenShell#5342): a dedicated
supervisor now stops within 8 s and Docker waits 10 s, so stops no
longer end in `SIGKILL`, and a connection that drops during shutdown is
no longer recovered. That can shorten the 13 s between stop and start in
#13953's failure, but the failure itself, a restarted supervisor finding
its sandbox session terminal, isn't addressed, NVIDIA/OpenShell#4910 is
still open, and #13953 didn't reproduce in 260 runs; #13953 stays open.
- **OpenShift UIDs:** NVIDIA/OpenShell#5483 is still open and not in
v0.1.9, so `openshift` keeps nulling the chart's UIDs (#13828).
- **OCSF** (NVIDIA/OpenShell#5606): NemoClaw reads no OCSF records; the
release notes tell log consumers how to select denials now.
- **Go SDK move, mutation admission limits, startup windows, service
discovery:** NemoClaw uses the Rust SDK and OpenShell's defaults;
authored gateway configuration can set the new keys.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:accepted A maintainer decided OpenShell should pursue this issue test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants