Listener TLS

A listener can terminate TLS so clients connect over HTTPS. Vrata handles the certificate and key; backends receive plaintext HTTP.

Configuration

{
  "name": "secure",
  "port": 443,
  "tls": {
    "cert": "/certs/tls.crt",
    "key": "/certs/tls.key",
    "minVersion": "TLSv1_2",
    "maxVersion": "TLSv1_3"
  }
}

All fields

FieldTypeDefaultDescription
certstringrequiredPEM-encoded TLS certificate or {{secret:...}} reference
keystringrequiredPEM-encoded private key or {{secret:...}} reference
minVersionstringTLSv1_2Minimum TLS protocol version
maxVersionstringMaximum TLS protocol version (empty = no upper bound)

Supported version values: TLSv1_0, TLSv1_1, TLSv1_2, TLSv1_3.

Examples

Basic HTTPS listener

{
  "name": "public",
  "port": 443,
  "tls": {
    "cert": "/certs/tls.crt",
    "key": "/certs/tls.key"
  }
}

Accepts HTTPS with TLS 1.2+ (the default). Most common setup.

Strict TLS 1.3 only

{
  "name": "strict",
  "port": 443,
  "tls": {
    "cert": "/certs/tls.crt",
    "key": "/certs/tls.key",
    "minVersion": "TLSv1_3",
    "maxVersion": "TLSv1_3"
  }
}

Rejects clients that don’t support TLS 1.3. Use for internal services where you control both sides.

HTTPS with HTTP/2

{
  "name": "h2",
  "port": 443,
  "tls": {
    "cert": "/certs/tls.crt",
    "key": "/certs/tls.key"
  },
  "http2": true
}

With TLS + HTTP/2, Go negotiates the protocol via ALPN. Clients that support HTTP/2 use it; others fall back to HTTP/1.1 automatically.

Let’s Encrypt / cert-manager certificates

In Kubernetes with cert-manager, the certificate is stored in a Secret and mounted as a volume:

volumeMounts:
  - name: tls
    mountPath: /certs
    readOnly: true
volumes:
  - name: tls
    secret:
      secretName: vrata-tls

Then configure the listener with the mounted paths:

{
  "name": "public",
  "port": 443,
  "tls": {
    "cert": "/certs/tls.crt",
    "key": "/certs/tls.key"
  }
}

Legacy compatibility (TLS 1.0+)

{
  "name": "legacy",
  "port": 443,
  "tls": {
    "cert": "/certs/tls.crt",
    "key": "/certs/tls.key",
    "minVersion": "TLSv1_0"
  }
}

Only use this for legacy clients that can’t be upgraded. TLS 1.0 and 1.1 are deprecated.

When to use TLS

When to skip TLS

Omit the tls field entirely to create a plaintext listener.