Documentation audit across the repo found several places still describing finished work as pending or in-progress (Authentik Stage 2, Element Call fork, NetworkPolicies in TASKS.md's own Next Steps section, the Boje troubleshooting entry). Also moves CLAUDE.md from the untracked parent directory into the repo root and brings its content up to date, and documents the new host-config/ pattern in README.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
62 lines
2.7 KiB
Markdown
62 lines
2.7 KiB
Markdown
# Authentik als Identity Provider für Matrix
|
|
|
|
**Status**: ✅ Deployed (Stage 1 + Stage 2 + Enrollment/Recovery/2FA, Closes Issue #7)
|
|
**Domain**: `auth.axion1337.chat`
|
|
|
|
## Überblick
|
|
|
|
Authentik = OIDC Provider für MAS → Zentrales Login + Einladungs-basierte Registrierung.
|
|
|
|
## Stage 1: Authentik Deployment
|
|
|
|
**Dateien** (in `apps/authentik/`):
|
|
- `namespace.yaml`, `helm-repo.yaml`, `authentik-secret.yaml` (SOPS)
|
|
- `authentik.yaml` (HelmRelease v2026.x + embedded Postgres)
|
|
- `certificate.yaml`, `ingress.yaml`
|
|
|
|
**Flux Kustomization**: `clusters/matrix/flux-system/authentik-sync.yaml`
|
|
|
|
## Deployment-Schritte
|
|
|
|
1. **DNS A-Record**: `auth.axion1337.chat → 49.13.132.245`
|
|
2. **Pods hochfahren**: `kubectl get pods -n authentik -w`
|
|
3. **Authentik UI**: `https://auth.axion1337.chat/if/flow/initial-setup/` → Admin-Passwort setzen
|
|
4. **OIDC Provider**: Admin UI → OIDC Provider erstellen
|
|
5. **Application**: Slug `matrix` (wichtig für Issuer URL!)
|
|
6. **Redirect URIs**:
|
|
- `https://account.axion1337.chat/upstream/callback/01KQDJTR1ZVTG8JQ220F5BNBFZ`
|
|
- Post-logout: `https://axion1337.chat`
|
|
7. **Client ID + Secret kopieren**
|
|
|
|
## Stage 2: MAS Integration
|
|
|
|
1. Decrypt: `sops --decrypt --in-place apps/production/custom-configs/mas-secret.yaml`
|
|
2. `upstream_oauth2_config` + `passwords-config` Blöcke hinzufügen
|
|
3. Encrypt: `sops --encrypt --in-place ...`
|
|
4. Commit & Push
|
|
5. **WICHTIG**: `passwords: enabled: false` erst nach OIDC-Test!
|
|
|
|
## Einladungs-Links
|
|
|
|
Authentik Admin → Flows & Stages → Invitations → Create
|
|
|
|
## Enrollment/Recovery/2FA Fix (2026-07-27, Issue #7)
|
|
|
|
Der `matrix-invitation`-Flow hatte nur 2 von 5 nötigen Stages (kein Write/Password/Login) -
|
|
Nutzer wurden nie in Synapse angelegt. Behoben und als Authentik Blueprint
|
|
(`apps/authentik/authentik-blueprints.yaml`) deklarativ ins Repo übernommen: vollständiger
|
|
`matrix-invitation`-Flow (Invite → Prompt → Write → Password → Login → Redirect), leerer
|
|
`matrix-recovery`-Flow ergänzt, `Brand.default_application` gesetzt. 2FA/Passkey-Selbst-
|
|
Einrichtung optional (`not_configured_action=skip`), auffindbar über
|
|
`axion1337.chat/docs/setup/security.html`. Details: siehe Wiki
|
|
[Authentik-OIDC.md](https://rohana.axion1337.de/sorb/axion1337.chat-gitops/wiki/Authentik-OIDC).
|
|
|
|
**Issue #13 geschlossen (2026-07-29)**: der ursprünglich hier vorgesehene direkte 2FA-Link auf
|
|
`account.axion1337.chat/account/` (per MAS Custom-Template-Override) wurde verworfen - live
|
|
geprüfte OIDC-Discovery zeigt, dass MAS keine 2FA/Passkey-Deep-Link-Action unterstützt. Jetzt
|
|
als Client-seitige Änderung nachgehalten:
|
|
[ThreadNet-Web#4](https://rohana.axion1337.de/sorb/ThreadNet-Web/issues/4).
|
|
|
|
---
|
|
**Weitere Details**: Siehe Kapitel 2 in diesem Projekt.
|