configmap.yaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Non-secret server settings (task 46).
  2. #
  3. # Every key maps to a `D_OAUTH_*` environment variable read by
  4. # `Config::load` (prefix `D_OAUTH`, nested separator `__`). Secret material
  5. # (the database/redis passwords, token pepper, TOTP key) lives in
  6. # `secret.yaml` and is NEVER added here. The passwordless DSNs below are not
  7. # secret and live here; the workloads add the passwords from mounted files
  8. # (`D_OAUTH_DATABASE__PASSWORD_FILE` / `D_OAUTH_REDIS__PASSWORD_FILE`), and
  9. # their `*_FILE` paths are declared in `deployment.yaml`, not in this
  10. # ConfigMap (`scripts/check_manifests.py` rejects a secret-shaped key here and
  11. # a DSN with an embedded password).
  12. apiVersion: v1
  13. kind: ConfigMap
  14. metadata:
  15. name: d-oauth-config
  16. namespace: d-oauth
  17. labels:
  18. app.kubernetes.io/name: d-oauth-server
  19. app.kubernetes.io/part-of: d-oauth
  20. data:
  21. D_OAUTH_ISSUER: "https://auth.example.com"
  22. D_OAUTH_ENVIRONMENT: "production"
  23. D_OAUTH_BIND_ADDR: "0.0.0.0:8080"
  24. D_OAUTH_HEALTH_ADDR: "0.0.0.0:8081"
  25. # Passwordless DSN. Production requires `sslmode=verify-full`; the password
  26. # comes from the mounted `database-password` file. `verify-full` also needs a
  27. # trusted CA: put the Postgres CA at `/certs/db-ca.crt` (a `db-ca.crt` key on
  28. # the `d-oauth-tls` Secret; see tls-secret.example.yaml) and the root_cert_path
  29. # below pins it. A server with a publicly-trusted certificate can drop the
  30. # root_cert_path and rely on system roots instead. Edit the host/user/database
  31. # for the target environment.
  32. D_OAUTH_DATABASE__URL: "postgres://oauth@postgres.d-oauth.svc.cluster.local:5432/oauth?sslmode=verify-full"
  33. D_OAUTH_DATABASE__ROOT_CERT_PATH: "/certs/db-ca.crt"
  34. D_OAUTH_TLS__CERT_PATH: "/certs/tls.crt"
  35. D_OAUTH_TLS__KEY_PATH: "/certs/tls.key"
  36. # Client-CA enables in-process mTLS verification. While set, the cluster
  37. # MUST use L4/TCP passthrough (NLB gateway / TLSRoute); an L7 ingress that
  38. # terminates TLS strips the client certificate. See docs/DEPLOYMENT.md and
  39. # scripts/check_manifests.py, which rejects the forbidden pairing.
  40. D_OAUTH_TLS__CLIENT_CA_PATH: "/certs/client-ca.crt"
  41. # Single-Redis topology takes a bare URL (no credentials; the mounted
  42. # `redis-password` file is injected at connect time). The durability
  43. # contract the server asserts at startup is noeviction + AOF, configured on
  44. # the Redis side.
  45. D_OAUTH_REDIS__URL: "redis://redis.d-oauth.svc.cluster.local:6379"
  46. D_OAUTH_REDIS__DURABILITY: "waitaof"