Files
homelab-infra/ops/restore-tests/authelia-compose.test.yml
T
Micha 52fc007123 fix(restore): authelia smoke without dump-restore, drop bogus env, disable ntp
Erstlauf 2026-06-03 hat einen by-design-Konflikt offengelegt: pg_restore des
produktiven postgresql17-authelia.dump in eine Test-Instanz mit Wegwerf
AUTHELIA_STORAGE_ENCRYPTION_KEY scheitert im Authelia-Startup-Check mit
"the configured encryption key does not appear to be valid for this database".
Productive Storage-Werte werden mit dem produktiven Key verschluesselt; ein
Wegwerf-Key kann sie nicht entschluesseln. Smoke ist deshalb explizit auf
Config-Restore + Boot reduziert, nicht Daten-Decrypt.

Zwei Nebenbefunde aus demselben Lauf:
- AUTHELIA__SERVER__ADDRESS (Doppel-Underscore) wurde von Authelia 4.39
  abgelehnt ("configuration environment variable not expected"). ENV
  entfernt; server.address kommt eh aus der generierten configuration.yml.
- ntp-Startup-Check schlug fehl ("Could not determine the clock offset
  ... lookup time.cloudflare.com on 127.0.0.1:53: server misbehaving"),
  weil das isolierte Test-Compose-Netz keinen DNS-Resolver fuer NTP hat.
  Neuer Test-Config-Block setzt ntp.disable_startup_check: true.

Doku nachgezogen (Plan + Runbook): Encryption-Key-Konflikt ist explizit
als "nicht Teil dieses Smokes" dokumentiert; Fehler-Matrix hat Eintraege
fuer Doppel-Underscore-ENV und NTP-Lookup.

Frische des produktiven authelia-Dumps wird unveraendert ueber
check-restore-freshness.sh ueberwacht; Daten-Decrypt-Drill ist eine eigene
DR-Aufgabe mit kontrollierter Schluessel-Verwendung.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 08:27:40 +02:00

54 lines
2.2 KiB
YAML

services:
restoretest-authelia-postgres:
# Gleiche Major-Version wie shared PostgreSQL 18 in Produktion.
image: postgres:18.4@sha256:8ff36f3c66371cba71d20ceedccfc3de9669a68737607888c4ef0af93abe8e39
container_name: restoretest-authelia-postgres
restart: "no"
environment:
TZ: Europe/Berlin
POSTGRES_USER: authelia
POSTGRES_DB: authelia
POSTGRES_PASSWORD: restoretest-authelia-db
PGDATA: /var/lib/postgresql/18/docker
volumes:
- /mnt/user/backups/restore-lab/authelia/postgres:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U authelia -d authelia"]
interval: 10s
timeout: 5s
retries: 10
security_opt:
- no-new-privileges:true
restoretest-authelia:
# Gleicher Image-Digest wie security/authelia/docker-compose.yml in Produktion.
image: authelia/authelia:4.39.20@sha256:1b363e9279e742397966333f364e0876ae02bf5c876de73e83af6d48c57ff51b
container_name: restoretest-authelia
restart: "no"
depends_on:
restoretest-authelia-postgres:
condition: service_healthy
command:
- authelia
- --config=/config/configuration.yml
environment:
TZ: Europe/Berlin
# Wegwerf-Secrets nur fuer den isolierten Smoke. Niemals produktive
# Authelia-Secrets in diesem Compose verwenden. Die produktiven
# authelia_*_FILE-Mounts werden bewusst NICHT eingebunden.
AUTHELIA_SESSION_SECRET: restoretest-authelia-session-secret-placeholder-32
AUTHELIA_STORAGE_ENCRYPTION_KEY: restoretest-authelia-storage-enc-key-placeholder-32
AUTHELIA_STORAGE_POSTGRES_PASSWORD: restoretest-authelia-db
# server.address wird in der vom Skript erzeugten configuration.yml
# gesetzt (tcp://0.0.0.0:9091). Eine zusaetzliche ENV waere
# redundant - und in Authelia 4.39 nicht als Doppel-Underscore
# akzeptiert (war Ursache des "configuration environment variable
# not expected"-Warnings im Lauf 2026-06-03).
volumes:
- /mnt/user/backups/restore-lab/authelia/test-config:/config
ports:
# nur 127.0.0.1, keine Public-Route, keine Traefik-Labels
- "127.0.0.1:19091:9091"
security_opt:
- no-new-privileges:true