Skip to content

egress: allow private address ranges per profile #1858

Backlog

Description

@nikhilunni

Problem

The egress proxy refuses every connection to a private address: loopback, RFC 1918, CGNAT, link-local, the metadata address and other reserved ranges (#1849). This stops a session from reaching the metadata server, cluster services and other hosts on the network. It is the correct default.

Many self-hosted deployments keep a Git server, a package registry or an artifact mirror on a private network. A session cannot reach these services now, and no setting turns the block off.

Proposal

Let an operator allow specific private address ranges, set per profile:

  • A profile names one or more CIDR ranges (for example 10.20.0.0/16), and optionally the hostnames that may resolve into them.
  • The proxy allows a connection to a private address only when the session's profile allows that range. All other private addresses stay blocked.
  • These never become allowable: the metadata address (169.254.169.254), loopback, and the host's own gateway addresses.
  • Who can edit the setting: only an org admin, because the allow-list opens a path from sessions into the network.

Questions to answer

  • Where the allow-list is stored and checked: profile config through to the proxy registry, the same path as other per-session egress policy.
  • Whether a deployment-wide setting is also needed, for example on engram-egress-proxyd, to put a ceiling on what a profile can allow.
  • DNS: the proxy connects to the address it checked, so the check must stay on the resolved address, not on the hostname.

🤖 Generated with Claude Code

Activity

  1. Xitric commented on Dec 4, 2026

    @Xitric
    Contributor

    Another use case for this: session telemetry to a cluster-local OpenTelemetry collector.

    We run Engrams on AKS, and every profile turns on Claude Code's telemetry (CLAUDE_CODE_ENABLE_TELEMETRY=1, OTLP exporter, OTEL_RESOURCE_ATTRIBUTES with team and profile). The data goes to the OTel collector that already runs in the cluster for the rest of our observability. That collector serves its OTLP endpoint on an internal load balancer, so it has a private VNet address. Each profile allows that endpoint as an egress host.

    Since #1849 the proxy refuses that address even though the profile allows it, so sessions can't send telemetry. We stay on v0.13.0 until a release has this feature.

    On the open questions, from our side:

    • Per profile fits us. Every profile needs the same collector range, but a deployment-wide ceiling would help, so a profile can't open more of the VNet than the operator intends.
    • Ranges and hostnames: we'd allow a single /32 (the load balancer's address) and its hostname. That works if the check stays on the resolved address, as the issue says.

    🤖 Generated with Claude Code

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions