Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
33 lines
1.3 KiB
Markdown
33 lines
1.3 KiB
Markdown
# authentik
|
|
|
|
## Compose-Setup (Dev)
|
|
|
|
`docker compose --profile authentik up -d` startet authentik 2026.2 (Server, Worker, Postgres). Der Blueprint
|
|
`docker/authentik/blueprints/homebrewery.yaml` legt Provider und Anwendung `homebrewery` sowie den Benutzer
|
|
`testuser` / `testuser-dev` an (Admin `akadmin` / `admin-dev`). Der erste Start braucht mehrere Minuten
|
|
(Migrationen, Blueprints). Bereit, sobald die Discovery-URL antwortet.
|
|
|
|
```env
|
|
HB_AUTH_PROVIDERS=oidc
|
|
HB_PUBLIC_URL=http://localhost:8000
|
|
HB_OIDC_ISSUER=http://authentik.localhost:9000/application/o/homebrewery/
|
|
HB_OIDC_CLIENT_ID=homebrewery
|
|
HB_OIDC_CLIENT_SECRET=dev-only-client-secret
|
|
HB_SESSION_SECRET=<mindestens 32 Byte>
|
|
```
|
|
|
|
Der Issuer enthält den Schrägstrich am Ende genau so, wie authentik ihn in der Discovery ausgibt.
|
|
|
|
## Eigener authentik
|
|
|
|
1. *Applications → Create with Provider*, Typ *OAuth2/OpenID*, Slug z. B. `homebrewery`.
|
|
2. *Client type*: Confidential. Client-ID und Secret in die Umgebung übernehmen.
|
|
3. *Redirect URIs* (Strict): `${HB_PUBLIC_URL}/auth/oidc/callback`.
|
|
4. *Scopes*: `openid`, `profile`, `email`. *Signing Key*: ein Zertifikat auswählen (RS256).
|
|
5. Issuer: `https://<host>/application/o/<slug>/`.
|
|
|
|
## Geprüft
|
|
|
|
E2E gegen authentik 2026.2 (Compose-Profil) mit laufender App:
|
|
`node scripts/oidc-e2e.mjs --idp authentik` (der Skript fährt den Flow-Executor der API durch).
|