ghostunnel

by QuenchWorks

Helm chartv0.0.2App 1.11.5Apache-2.0Verified publisher

ghostunnel: a TLS proxy with mutual authentication that wraps a plaintext service in mTLS. Hardened by QuenchWorks: built from source, nonroot, CVE-gated, cosign-signed and pinned by digest.

About this chart

Quenchworks ghostunnel

Hardened ghostunnel, a TLS proxy with mutual authentication. This chart runs it in server mode: it accepts mTLS on its listener, checks the client certificate against a client CA and an allow list, and forwards accepted connections to a plaintext service. The image is built from source with PKCS#11 support, runs as uid 1001 and is CVE-gated at build, cosign-signed and pinned by digest.

Install

helm install pg-mtls oci://ghcr.io/quenchworks/charts/ghostunnel --set target=postgres:5432

Clients verify the server with ca.crt from the Secret pg-mtls-ghostunnel-tls. Unless you bring your own client CA, the chart also generates one plus a client certificate (CN pg-mtls-ghostunnel-client) in the Secret pg-mtls-ghostunnel-client; mount it in the client. A plaintext client can run ghostunnel in client mode next to it:

ghostunnel client --listen localhost:5432 --target pg-mtls-ghostunnel:8443 \
  --cert tls.crt --key tls.key --cacert server-ca.crt

Configuration

KeyDefaultWhat it does
targetrequiredPlaintext backend, host:port
port8443mTLS listener
allow.allfalseAccept any certificate the client CA signed
allow.cns, allow.ous, allow.dnsNames, allow.uris[]Allow lists (CN, OU, DNS SAN, URI SAN such as SPIFFE IDs)
clientCA.existingSecret""Secret with ca.crt for client certificates; empty generates one
status.enabled, status.porttrue, 6060Plain-HTTP /_status and /_metrics
tls.existingSecret, tls.certManagerself-signedServer certificate source; TLS is always on
extraArgs[]More ghostunnel server flags (--timed-reload, --proxy-protocol)

Verify the image

cosign verify ghcr.io/quenchworks/images/ghostunnel \
  --certificate-identity-regexp 'https://github.com/quenchworks/.+' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Deploy ghostunnel with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ghostunnel on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartghostunnel is pinned at v0.0.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply