Quader Docs 0.176.0

TLS and certificates

Every connection Quader accepts or opens runs TLS with a verified peer, and every certificate rotates without a restart.

On this page

Where Quader uses TLS

Listeners and TLSClients reach the ingress controller with the public certificate; the controller reaches the client and endpoint listeners over HTTPS and verifies each pod under its kind's name. The kubelet and monitoring reach the ops listener. The worker and the scanner pods talk over mutual TLS, and the scanners read from the scan listener of packages. Every role verifies PostgreSQL, Valkey, the object store and the upstreams.HTTPS · the publiccertificateHTTPS · verified as<fullname>-<kind>HTTPSmutual TLSmutual TLSverify-fullClientsIngresscontrollerclient :8080endpointlistenerskubelet ·monitoringops :8081workerscanner podsscan listener:8082api · packages ·workerPostgreSQL ·Valkeyobject store ·upstreams
Connection Configured by Default
Client and endpoint listeners tls, endpoints.<name>.tls of the chart HTTPS with the pod's pair; TLS 1.2 or 1.3 (tls.minVersion), AEAD suites only, h2
Ops listener tls.ops The client listener's pair, no client certificate (the probes cannot present one)
Worker, scanners, scan listener the chart Mutual TLS, each side checking the other's name
PostgreSQL database.ssl_mode, secrets.databaseCA verify-full
Valkey and its Sentinels valkey.tls, secrets.valkeyCA verify-full
Each object-store connection its endpoint, the ca of its entry in secrets.storageConnections https, the outbound trust store
Upstreams of remote repositories proxy.outbound.tls, trustedCA System roots, TLS 1.2 or later

Plaintext to a data service needs an explicit switch (allow_insecure, allow_insecure_endpoint). A ca of an object-store connection becomes its whole trust store. Every key: Configuration keys, Helm values.

Certificates in the Helm chart

Every kind of pod has a pair of its own: api, packages, worker and each scanner (vuln-scanner-trivy, malware-scanner-clamav, malware-updater-freshclam). A pair names <fullname>-<kind>.<namespace>.svc and <fullname>-ops.<namespace>.svc; those of the worker and the scanners also allow client auth. No pod holds another kind's pair, so a pod taken over cannot pose as another kind.

The plain path is one value: the cert-manager issuer of one CA. The chart then renders the Certificate <fullname>-tls-<kind> per kind and cert-manager writes and renews its Secret; pods wait in ContainerCreating until it exists.

yaml
tls:
  certManager:
    issuerRef:
      kind: ClusterIssuer       # default; or Issuer
      name: cluster-ca          # example
    duration: 2160h             # default
    renewBefore: 720h           # default

Without cert-manager

Name an existing Secret per kind with tls.crt, tls.key and ca.crt, all of one CA, with the names and usages above. The chart refuses one Secret for two kinds, and an issuer and Secrets together.

yaml
tls:
  existingSecrets:
    api: quader-tls-api                                     # example; server auth
    packages: quader-tls-packages                           # example; server auth
    worker: quader-tls-worker                               # example; server auth and client auth
    vuln-scanner-trivy: quader-tls-vuln-scanner-trivy       # while the image scanning is on
    malware-scanner-clamav: quader-tls-malware-scanner-clamav           # while the malware scanning is on
    malware-updater-freshclam: quader-tls-malware-updater-freshclam     # while its signatures come from the updater

How the ingress controller verifies Quader

The controller verifies each backend under its kind's name and refuses one that serves another kind's pair. The chart writes it as secure-sni and secure-verify-ca-secret for HAProxy Ingress, a ServersTransport per kind for Traefik (ingress.backendTLS.serversTransports), an Ingress per kind with proxy-ssl-name for ingress-nginx, and a BackendTLSPolicy for the Gateway API (tls.backendTLSPolicy.enabled). The edge's own certificate, ingress.tls, is yours to issue.

The worker calls a scanner, and the scanner reads from the scan listener of packages, both over mutual TLS. Each side presents its kind's pair, verifies the other against its own ca.crt and admits only the expected name, never a wildcard. A pair without client auth keeps the scanner unready, and scans wait as scanner_unavailable.

Client certificates (mutual TLS)

tls.clientCA.secretName makes the client listener ask for a certificate of that CA (auth: require or verify_if_given), meant for the ingress controller; with HAProxy Ingress also set ingress.backendTLS.clientCertSecret. A further endpoint takes its own clientCaSecret (Endpoints and exposure). A client certificate identifies no user, and Quader checks no revocation list: issue short-lived ones.

Rotate a listener certificate

Quader compares each file's content every reload_interval (10 s by default). A changed pair serves new handshakes; a file that does not load leaves the old one in service and counts in quader_tls_reload_errors_total. At start a missing pair keeps the replica unready, while the ops listener answers with a temporary in-memory certificate so the pod is not restarted.

  1. Update the Secret, or let cert-manager renew it.
  2. Wait for the kubelet to update the mount and one reload_interval.
  3. Check that quader_tls_reloads_total grew and quader_tls_certificate_expiry_timestamp_seconds shows the new date.

To rotate a CA, trust the old and the new CA in the bundle, rotate the server certificates, then remove the old CA. Quader keeps serving an expired pair; the alerts of both charts (metrics.prometheusRule.enabled) warn 14 days ahead and once it has ended: QuaderTLSCertificateExpiring and …Expired, on a Bastion QuaderBastionTLSCertificateExpiring and …Expired.

Common failures

Symptom Cause and action
The render fails: tls.certManager.issuerRef.name or tls.existingSecrets is required Name the issuer, or a Secret per kind
Pods hang in ContainerCreating waiting for <fullname>-tls-<kind> The issuer has not issued it: kubectl describe certificate <fullname>-tls-<kind>
Pods unready, /readyz?verbose=1 shows tls failing The pair is missing, mismatched, expired or not valid yet; the log names the file
The ingress answers a gateway error A wrong ingress.backendTLS.controller, or a pair without its kind's name or without ca.crt
400 "Client sent an HTTP request to an HTTPS server" Use https://
A renewed certificate is not served The file did not load, or a hand-written mount uses subPath
Start ends naming a database, Valkey or object-store file The CA or client certificate Secret is missing
Scanner pods unready, scans scanner_unavailable A named pair lacks client auth or its kind's name