Skip to content

Egress gateway: trust extra CAs for upstream TLS without replacing the public roots #100

Open

Description

@fiunchinho

Problem

The egress gateway terminates the actors' TLS on https rules and dials the upstream itself. Its dynamic HTTPS backend trusts the image's public bundle only:

- backends:
- dynamic: {}
policies:
backendTLS:
root: /etc/ssl/certs/ca-certificates.crt

An upstream behind a private CA fails every call with invalid peer certificate: UnknownIssuer, and the actor gets a 503. Examples are an in-cluster model gateway with a private CA, or a corporate TLS proxy. The CAs that the actor's runtime trusts do not help here. The trust bundle in docs/egress-trust-bundle.md configures the actor side only.

Pointing backendTLS.root at the private CA replaces the public roots, so public endpoints then fail.

Change

  • A chart value atenetEgress.upstreamTrust.caBundle renders a PEM bundle as a ConfigMap. The ConfigMap is mounted on the egress agentgateway next to the image bundle.
  • The container sets SSL_CERT_DIR to the mount, beside SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt. rustls-native-certs then loads both.
  • With a bundle set, the dynamic HTTPS backend leaves out backendTLS.root. agentgateway reads the native roots only when root is unset (backendtls.rs).
  • The value is empty by default, and the rendered manifests do not change.
  • A checksum annotation on the pod template rolls the gateway when the bundle changes, because the roots are read at start.

kagent is one consumer: in kagent-dev/kagent#3258 the RemoteMCPServer.spec.tls and ModelConfig.spec.tls blocks are deferred "until upstream trust can be configured at the component that owns the connection".

Activity

  1. added a commit that references this issue on Oct 26, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions