Skip to content

Rely on OpenShell's destination validation for inference endpoints #13232

Closed

Description

@cv

Sub-issue of #13131.

Problem

NemoClaw validates inference endpoint addresses itself: plain HTTP must use a literal loopback or private IP address (nemoclaw_backend::validate_endpoint). The SDK applies it to YAML providers, and the openshell provider applies it to every inference profile and registration. The rule came in with the Rust port and isn't explained anywhere.

OpenShell already owns this. Its sandbox proxy validates every destination at connection time, against the address it resolves to (build_validation_plan in openshell-supervisor-network, at the pinned revision e1f3c82). In order:

  • host.openshell.internal, the gateway-host alias, is pinned to the gateway's actual host address;
  • explicit allowed_ips restrict the destination to those addresses;
  • a literal IP host is allowed only to that IP;
  • a host declared exactly by name in the policy may be private;
  • anything else is allowed to public addresses only.

It also blocks cloud metadata, link-local and control-plane destinations.

NemoClaw's rule both duplicates and contradicts that: it rejects destinations OpenShell supports by design, including host.openshell.internal, exactly declared private hosts, and container-network names like Compose services.

Proposal

  • Drop NemoClaw's address policy for inference endpoints. Keep only the URL shape checks NemoClaw itself needs (scheme, host, port, path, no credentials, query or fragment), and leave destination authorization to OpenShell.
  • Inference profiles keep deriving allowed_ips from a literal IP host. For a host name, they rely on OpenShell's exact-declared-host and gateway-alias modes.
  • The CLI's checks on the gateway endpoint it connects to itself stay; those are NemoClaw's own connections.
  • Update the configuration reference and docs/inference.md, which document the current rule.

Before relying on OpenShell alone

NemoClaw's rule also refuses plain HTTP to public addresses. With credential injection, a key could otherwise cross a public network unencrypted. Check whether OpenShell refuses credential injection over plain HTTP to public destinations. If it doesn't, raise it with OpenShell rather than keep enforcing it here.

Done when

  • A YAML provider and a hand-written registration can use http://host.openshell.internal:<port>/v1.
  • The travel example (examples/hcl/travel) defaults its sandbox endpoint to it.
  • Contract tests show NemoClaw no longer rejects those destinations itself.

Activity

  1. added
    v1
    on Oct 15, 2026
  2. cv commented on Oct 15, 2026

    @cv
    CollaboratorAuthor

    Finding from the open question, with OpenShell pinned at e1f3c82:

    In the supervisor's plain-HTTP forward path, credential placeholders are substituted whenever a secret resolver is configured and the endpoint is allowed. rewrite_forward_request calls rewrite_header_line_checked for every header line, and handle_forward_proxy passes the resolver into the HTTP context without checking the scheme or whether the destination is public (crates/openshell-supervisor-network/src/proxy.rs). I didn't trace every relay path, so this is moderate confidence. As far as I can tell, OpenShell doesn't refuse to send a credential over plain HTTP to a public address.

    So NemoClaw's rule still provides one protection OpenShell doesn't. Proposed narrowing:

    • Unauthenticated registrations: only well-formed-URL checks; destination checks are OpenShell's. host.openshell.internal, exactly declared private hosts, and container-network names work.
    • Registrations with a credential (credential_env or credential_source): plain HTTP only to loopback, private literal IPs, or host.openshell.internal, which OpenShell pins to the gateway's host. HTTPS is unrestricted.
    • Upstream: raise the gap with OpenShell. Once it refuses credential injection over plain HTTP to public destinations, drop the remaining rule.

    The travel example can then default its sandbox endpoint to http://host.openshell.internal:<port>/v1, since its Ollama server is unauthenticated.

  3. cv commented on Oct 15, 2026

    @cv
    CollaboratorAuthor

    Decision: NemoClaw relies on OpenShell for destination validation entirely, including credentialed plain HTTP. NemoClaw keeps only the endpoint parsing it needs itself, such as the host and port it builds profiles and grants from, and adds no address policy of its own. No upstream issue is planned. This supersedes the narrowed rule proposed above and the issue body's "Before relying on OpenShell alone" step.

  4. added a commit that references this issue on Oct 15, 2026
    1adeb72
  5. cv commented on Oct 15, 2026

    @cv
    CollaboratorAuthor

    Done in #13260: NemoClaw no longer applies its own address policy to inference endpoints and leaves destination checks to OpenShell.

  6. added
    area: providers
    area: security
    on Oct 29, 2026
  7. added theissue type on Oct 29, 2026
  8. added this to the Roadmap: GTC DC 2026 milestone on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: providersarea: securityv1

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions