refactor: use filesystem notifier instead of SMTP
Solo-admin setup; enrollment codes in config/notification.txt. Drop 0012 SMTP/secret files. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -40,8 +40,9 @@ Zusätzlich in diesem Repo unter `config/configuration.yml` → `access_control.
|
||||
| `compose.yml` | Authelia, Redis, whoami-Smoke |
|
||||
| `config/configuration.yml` | Authelia-Config (kein Secret-Inhalt) |
|
||||
| `config/users_database.yml.example` | User-Template |
|
||||
| `secrets/` | `jwt_secret.txt`, `session_secret.txt`, `storage_encryption_key.txt`, `smtp_username.txt`, `smtp_password.txt`, `smtp_sender.txt` (nur auf dem Server) |
|
||||
| `.env` | `TZ` (+ optional Log-Level); SMTP-Passwort gehört in `secrets/smtp_*.txt` |
|
||||
| `config/notification.txt` | Filesystem-Notifier-Ausgabe (gitignored, nur Server) |
|
||||
| `secrets/` | `jwt_secret.txt`, `session_secret.txt`, `storage_encryption_key.txt` (nur auf dem Server) |
|
||||
| `.env` | `TZ` (+ optional Log-Level) |
|
||||
|
||||
## Deploy (boka)
|
||||
|
||||
@@ -52,7 +53,6 @@ ssh frank-schwenk.de
|
||||
git clone ssh://git@gitea.schwenk.online:2222/froxxxy/authschwenkonline.git /home/frank/auth.schwenk.online
|
||||
cd /home/frank/auth.schwenk.online
|
||||
cp .env.example .env
|
||||
# SMTP_PASSWORD und Sender aus 0012 server.env eintragen
|
||||
```
|
||||
|
||||
### Secrets erzeugen
|
||||
@@ -65,18 +65,6 @@ docker run --rm -u 8000:8000 -v "$(pwd)/secrets:/secrets" authelia/authelia:4.39
|
||||
session_secret.txt storage_encryption_key.txt jwt_secret.txt'
|
||||
```
|
||||
|
||||
SMTP (0012.de) — Dateien unter `secrets/` (UID 8000):
|
||||
|
||||
```bash
|
||||
# as root / via docker if secrets/ is 0700 for uid 8000
|
||||
printf '%s\n' 'auth@0012.de' > secrets/smtp_username.txt
|
||||
printf '%s\n' 'YOUR_SMTP_PASSWORD' > secrets/smtp_password.txt
|
||||
printf '%s\n' 'Authelia <auth@0012.de>' > secrets/smtp_sender.txt
|
||||
chown 8000:8000 secrets/smtp_*.txt && chmod 600 secrets/smtp_*.txt
|
||||
```
|
||||
|
||||
Notifier: `submissions://ha01s019.org-dns.com:465` (implizites TLS). Sender-Format muss RFC5322 sein: `Name <user@domain>` — kein unquoted `foo.bar.baz <…>`.
|
||||
|
||||
### User-DB
|
||||
|
||||
```bash
|
||||
@@ -84,7 +72,7 @@ cp config/users_database.yml.example config/users_database.yml
|
||||
docker run --rm authelia/authelia:4.39 \
|
||||
authelia crypto hash generate argon2 --password 'YOUR_PASSWORD'
|
||||
# Hash in users_database.yml bei frank.password einsetzen
|
||||
# email: Postfach, das Mail von 0012.de SMTP annimmt (Tuta oft problematisch)
|
||||
# email: beliebig (Notifier schreibt lokal, kein SMTP)
|
||||
```
|
||||
|
||||
### Start
|
||||
@@ -94,25 +82,27 @@ docker compose up -d
|
||||
docker compose logs -f authelia
|
||||
```
|
||||
|
||||
## SMTP (0012.de)
|
||||
## Notifier (filesystem)
|
||||
|
||||
- Host `ha01s019.org-dns.com`, Port **465** (`submissions://`), Auth z.B. `auth@0012.de`
|
||||
- Credentials nur in `secrets/smtp_*.txt` (siehe oben)
|
||||
- Startup-Check sendet **keine** Mail — nur Verbindungs-Check
|
||||
- Test von boka: Python/`swaks` an `cuidas@gmail.com`; Authelia-Logs bei Erfolg: Trace `Timing Attack Delay successful: true` nach „Sending an email…“
|
||||
Codes / Reset-Links landen in `config/notification.txt` auf dem Server:
|
||||
|
||||
```bash
|
||||
ssh frank-schwenk.de
|
||||
# config/ is often root-owned after first start:
|
||||
docker run --rm -v /home/frank/auth.schwenk.online/config:/config:ro alpine cat /config/notification.txt
|
||||
```
|
||||
|
||||
## TOTP-Enrollment
|
||||
|
||||
1. `https://auth.schwenk.online` öffnen, einloggen
|
||||
2. Enrollment-Code kommt per Mail
|
||||
2. Gerät registrieren → Code/Link aus `notification.txt` (siehe oben)
|
||||
3. QR mit Google Authenticator (o.ä.) scannen
|
||||
|
||||
## Verify
|
||||
|
||||
1. Portal erreichbar: `https://auth.schwenk.online`
|
||||
2. Smoke hinter 2FA: `https://whoami-auth.schwenk.online` → Login + TOTP → whoami-Body
|
||||
3. Mail-Test: Passwort-Reset oder Enrollment löst SMTP aus
|
||||
4. `docker compose ps` — alle Services `running`
|
||||
3. `docker compose ps` — alle Services `running`
|
||||
|
||||
whoami nach dem Smoke optional aus `compose.yml` entfernen oder Router-Label deaktivieren.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user