- config.example.yaml: listen 0.0.0.0:8080, base_url https://myday.sechpoint.app, trusted_proxies = Zoraxy; a comment stating :8080 must be firewalled to Zoraxy only and that the bootstrap is tunnel-only (D-025/D-043). - README: a Deployment section (TLS at the proxy, the app on 0.0.0.0:8080, the firewall rule) and the tunnel-only bootstrap (ssh -L 8080:127.0.0.1:8080 → http://127.0.0.1:8080/setup, the one path a proxy request cannot take).
63 lines
3.5 KiB
YAML
63 lines
3.5 KiB
YAML
# MyDay — example configuration.
|
|
#
|
|
# Copy to `config.yaml` (gitignored — NEVER committed, D-010) and fill in.
|
|
# Settings live HERE, not in the database (D-035).
|
|
|
|
# ── setup & recovery ─────────────────────────────────────────────────────────
|
|
setup: true # D-015 / D-026 — while true the app serves ONLY /setup.
|
|
# D-025 (revised): the wizard is reachable ONLY over the
|
|
# direct SSH tunnel — a request relayed by a proxy (a
|
|
# loopback peer carrying X-Forwarded-For) is 404'd.
|
|
admin_recovery: false # D-033 — set true + restart to email user 1 an enrolment link
|
|
|
|
# ── server ───────────────────────────────────────────────────────────────────
|
|
# D-043 (deployment behind Zoraxy): TLS terminates at the PROXY, so the app
|
|
# speaks plain HTTP and binds 0.0.0.0:8080. FIREWALL :8080 TO ZORAXY ONLY —
|
|
# anything else that can reach the port bypasses the proxy and its TLS.
|
|
server:
|
|
listen: "0.0.0.0:8080" # D-043 — any bind is allowed (no setup-mode refusal)
|
|
base_url: "https://myday.sechpoint.app" # the PUBLIC origin: invite / recovery links
|
|
trusted_proxies: # XFF + X-Forwarded-Proto are honoured from these (A6/D-043)
|
|
- "127.0.0.1" # Zoraxy's address (127.0.0.1 if it runs on this host)
|
|
|
|
# ── app ──────────────────────────────────────────────────────────────────────
|
|
app:
|
|
locale: "en-GB"
|
|
timezone: "Europe/London"
|
|
|
|
# ── enrollment (A1) ──────────────────────────────────────────────────────────
|
|
# The bounded invite window: outside it, /{GUID} enrollment is refused.
|
|
enrollment:
|
|
window: "72h"
|
|
|
|
# ── database (D-012) ─────────────────────────────────────────────────────────
|
|
database:
|
|
path: "./data/myday.db" # SQLite · WAL · foreign keys ON · one instance only
|
|
|
|
# ── secrets — generate strong random values; never commit (D-010) ────────────
|
|
# A placeholder is replaced with a strong value: at startup in setup mode
|
|
# (so the wizard's ceremony is never signed with a known key) and again by the
|
|
# wizard's `finish`. A restart adopts what `/setup` persisted.
|
|
secrets:
|
|
cookie_secret: "CHANGE_ME_32_BYTES_RANDOM"
|
|
csrf_key: "CHANGE_ME_32_BYTES_RANDOM"
|
|
totp_encryption_key: "CHANGE_ME_32_BYTES_RANDOM" # A9 — TOTP secrets are encrypted at rest
|
|
|
|
# ── mail — invites & recovery ────────────────────────────────────────────────
|
|
mail:
|
|
host: "smtp.example.com"
|
|
port: 587
|
|
username: ""
|
|
password: "CHANGE_ME"
|
|
from: "myday@example.com"
|
|
|
|
# ── modules (D-038) — required modules cannot be disabled ────────────────────
|
|
modules:
|
|
org: true
|
|
time: true
|
|
absence: true
|
|
requests: true # required
|
|
hr: true
|
|
expense: false
|
|
reports: true
|
|
integrations: false
|