Skip to content

Add mTLS proxy support for enterprise proxies#4498

Open
dhawalseth wants to merge 3 commits into
actions:masterfrom
dhawalseth:feature/mtls-proxy-support
Open

Add mTLS proxy support for enterprise proxies#4498
dhawalseth wants to merge 3 commits into
actions:masterfrom
dhawalseth:feature/mtls-proxy-support

Conversation

@dhawalseth
Copy link
Copy Markdown
Contributor

@dhawalseth dhawalseth commented May 19, 2026

Summary

Add mTLS (mutual TLS) proxy support for enterprise environments that require client certificate authentication for egress traffic (e.g., corporate proxies like Kraken, Zscaler, or other TLS-terminating proxies).

Motivation

Many enterprise environments route all egress traffic through proxies that require mutual TLS authentication. Currently, ARC only supports basic auth (username/password) for proxy authentication via credentialSecretRef. This PR adds the infrastructure to support mTLS by:

  1. Mounting client certificates and CA certificates to listener and runner pods
  2. Providing a clear configuration interface in Helm values
  3. Extending the CRD schema to include TLS configuration

Changes

New ProxyTLSConfig type

type ProxyTLSConfig struct {
    // Secret with 'tls.crt' and 'tls.key' for client auth
    ClientCertSecretRef string `json:"clientCertSecretRef,omitempty"`
    
    // Secret with 'ca.crt' for server verification
    CACertSecretRef string `json:"caCertSecretRef,omitempty"`
    
    // ConfigMap with 'ca.crt' (alternative to secret)
    CACertConfigMapRef string `json:"caCertConfigMapRef,omitempty"`
    
    // Skip server cert verification (testing only)
    InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
}

Updated Helm Configuration

proxy:
  https:
    url: https://proxy.example.com:443
    tls:
      # Create with: kubectl create secret tls proxy-client-cert --cert=client.crt --key=client.key
      clientCertSecretRef: proxy-client-cert
      # Create with: kubectl create secret generic proxy-ca --from-file=ca.crt=ca.pem
      caCertSecretRef: proxy-ca-cert

Certificate Mount Paths

Certificates are mounted to pods at:

  • /etc/proxy-tls/https-proxy/client/tls.crt - Client certificate
  • /etc/proxy-tls/https-proxy/client/tls.key - Client private key
  • /etc/proxy-tls/https-proxy/ca/ca.crt - CA certificate

Files Changed

  • apis/actions.github.com/v1alpha1/autoscalingrunnerset_types.go - New ProxyTLSConfig type
  • controllers/actions.github.com/resourcebuilder.go - Volume mount logic
  • charts/gha-runner-scale-set/values.yaml - Configuration examples
  • charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml - Template updates
  • CRDs regenerated

Usage Example

# Create client certificate secret
kubectl create secret tls proxy-mtls-client \
  --cert=client.crt \
  --key=client.key \
  -n arc-runners

# Create CA certificate secret
kubectl create secret generic proxy-mtls-ca \
  --from-file=ca.crt=proxy-ca.pem \
  -n arc-runners

# Install with mTLS proxy config
helm install arc-runner-set oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set \
  --set githubConfigUrl="https://github.com/myorg" \
  --set githubConfigSecret="github-secret" \
  --set proxy.https.url="https://proxy.example.com:443" \
  --set proxy.https.tls.clientCertSecretRef="proxy-mtls-client" \
  --set proxy.https.tls.caCertSecretRef="proxy-mtls-ca"

Related PRs

This is part of a coordinated effort to add mTLS proxy support across the GitHub Actions ecosystem:

Repository PR Description
actions/scaleset #101 Add WithTLSClientCertificate() HTTPOption for Go HTTP client
actions/runner #4430 Add HTTPS_PROXY_CLIENT_CERT/KEY/CA_CERT environment variables

How it all fits together

  1. This PR (ARC): Mounts certificates to listener/runner pods via Kubernetes secrets
  2. scaleset PR: Listener uses mounted certs via WithTLSClientCertificate()
  3. runner PR: Runner reads cert paths from environment variables set by ARC

Test Plan

  • Unit tests for proxyTLSVolumesAndMounts() helper
  • Helm template rendering tests with TLS config
  • Integration test with mock mTLS proxy
  • Manual verification of certificate mounts in pods

🤖 Generated with Claude Code

dseth-linkedin and others added 2 commits May 6, 2026 23:20
Addresses CVEs found in container image scanning:
- CVE-2026-27143 (Critical, CVSS 9.8)
- CVE-2026-27140 (High, CVSS 8.8)
- CVE-2026-33810 (High, CVSS 8.2)
- CVE-2026-32280 (High, CVSS 7.5)
- CVE-2026-32281 (High, CVSS 7.5)
- CVE-2026-32283 (High, CVSS 7.5)
- CVE-2026-27144 (High, CVSS 7.1)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This change adds support for mTLS authentication when connecting through
proxies that require client certificates (e.g., corporate proxies like Kraken).

Changes:
- Add ProxyTLSConfig type with fields for:
  - clientCertSecretRef: K8s secret with tls.crt and tls.key
  - caCertSecretRef: K8s secret with ca.crt
  - caCertConfigMapRef: ConfigMap with ca.crt (alternative)
  - insecureSkipVerify: Skip server cert verification (testing only)

- Update ProxyServerConfig to include optional TLS configuration

- Add proxyTLSVolumesAndMounts helper to create volumes and mounts
  for proxy TLS certificates

- Update listener pod creation to mount proxy TLS certs at
  /etc/proxy-tls/{http,https}-proxy/{client,ca}/

- Update runner pod creation to mount proxy TLS certs

- Update Helm values.yaml with mTLS configuration examples

- Update Helm templates to pass TLS config to CRD

- Regenerate CRDs with new ProxyTLSConfig schema

Note: This provides the infrastructure to mount certificates. The actual
TLS client configuration in ghalistener requires corresponding changes
in the github.com/actions/scaleset library to use these certificates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants