86 lines
3.5 KiB
Markdown
86 lines
3.5 KiB
Markdown
# Authentik — provisioning local
|
||
|
||
Blueprints in `blueprints/` are mounted into Authentik at `/blueprints/custom` and applied automatically by the worker on startup.
|
||
|
||
| Fichier | Rôle |
|
||
|---------|------|
|
||
| `01-ulti-enrollment.yaml` | Inscription self-service (`ulti-enrollment`) |
|
||
| `02-ulti-brand.yaml` | Branding Ultimail + lien « Créer un compte » sur login |
|
||
| `ulti-oidc.yaml` | App OIDC Ultimail |
|
||
| `nextcloud-oidc.yaml` | App OIDC Nextcloud |
|
||
|
||
Assets branding : générés depuis le frontend (`pnpm run brand:authentik` dans `gmail-interface-clone`) :
|
||
|
||
| Fichier Authentik | Thème | Description |
|
||
|-------------------|-------|-------------|
|
||
| `ultimail-logo-light.png` | clair | Picto + wordmark sur fond blanc |
|
||
| `ultimail-logo-dark.png` | sombre | Picto + texte clair, fond transparent |
|
||
| `ultimail-favicon.png` | — | Mark 32×32 transparent (favicon onglet, URL **sans** `%(theme)s`) |
|
||
| `ultimail-favicon-light.png` | clair | Variante archive (fond blanc) |
|
||
| `ultimail-favicon-dark.png` | sombre | Variante archive (fond sombre) |
|
||
|
||
Logo : placeholder Authentik `%(theme)s` + fallback CSS `prefers-color-scheme`.
|
||
Favicon onglet : **chemin statique** — Authentik ne substitue pas `%(theme)s` dans le `<link rel="icon">` SSR (erreur 400).
|
||
|
||
Regénérer après MAJ du master brand :
|
||
|
||
```bash
|
||
cd ../gmail-interface-clone
|
||
pnpm run brand:build && pnpm run brand:authentik
|
||
cd ../ulti-backend
|
||
./deploy/compose-up.sh up -d authentik-server authentik-worker
|
||
docker exec deploy-authentik-server-1 ak apply_blueprint /blueprints/custom/02-ulti-brand.yaml
|
||
```
|
||
|
||
## Inscription utilisateur
|
||
|
||
Flow public : `http://localhost/auth/if/flow/ulti-enrollment/`
|
||
|
||
Étapes collectées :
|
||
|
||
1. E-mail (identifiant), mot de passe
|
||
2. Nom et prénom, téléphone (optionnel), avatar (optionnel)
|
||
3. Création du compte + connexion automatique
|
||
|
||
Sur la page de connexion Authentik, lien **« Besoin d'un compte ? S'inscrire »** (identification stage).
|
||
|
||
## Branding
|
||
|
||
- Titre navigateur : **Ultimail**
|
||
- Logo / favicon : marque Ultimail, variantes **light** et **dark** (thème Authentik)
|
||
- CSS custom : masque « Powered by authentik » et liens goauthentik.io
|
||
- Locale par défaut : `fr`
|
||
|
||
Modifier le logo : `pnpm run brand:authentik` dans le repo frontend, puis redémarrer Authentik + réappliquer le blueprint brand.
|
||
|
||
## Secrets OIDC
|
||
|
||
| App | Slug | Client ID | Secret (`.env`) |
|
||
|-----|------|-----------|------------------|
|
||
| Ultimail | `ulti` | `ulti-backend` | `ULTID_OIDC_CLIENT_SECRET` |
|
||
| Nextcloud | `nextcloud` | `ulti-nextcloud` | `NC_OIDC_CLIENT_SECRET` |
|
||
|
||
Defaults blueprints : `changeme` — sync avec `.env`.
|
||
|
||
## Appliquer / vérifier
|
||
|
||
```bash
|
||
# Re-appliquer après modification
|
||
docker exec deploy-authentik-server-1 ak apply_blueprint /blueprints/custom/01-ulti-enrollment.yaml
|
||
docker exec deploy-authentik-server-1 ak apply_blueprint /blueprints/custom/02-ulti-brand.yaml
|
||
./deploy/compose-up.sh restart authentik-worker
|
||
|
||
# Vérifier OIDC Ultimail
|
||
curl -s http://localhost/auth/application/o/ulti/.well-known/openid-configuration | head -5
|
||
```
|
||
|
||
`redirect_uris` : objets `{ matching_mode, url }` (Authentik 2025.2+).
|
||
|
||
## Limites connues
|
||
|
||
- « Powered by authentik » masqué via CSS (pas d’option officielle en open source).
|
||
- Placeholder `%(theme)s` sur le **logo** : non remplacé sur certaines pages SSR ; fallback CSS `prefers-color-scheme`.
|
||
- Favicon onglet : pas de `%(theme)s` (bug SSR Authentik → 400) ; mark transparent unique.
|
||
- Avatar stocké en attribut utilisateur (data-URI), pas encore affiché dans Ultimail header.
|
||
- Multi-comptes simultanés type Gmail : non implémenté côté Ultimail.
|