mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-08 05:34:43 +02:00
docs: hub SSO complet sur le domaine public funklab.online (HTTPS) (#94)
Met à jour toute la doc pour l'état final du 2026-07-07 : - CLAUDE.md : état actuel (hub SSO + domaine/TLS), rôle Traefik versionné, secrets OIDC au vault, date - README : section « Accès & authentification » réécrite (5 apps sur le domaine, chaîne DNS/Freebox/Traefik, lab-admins), roadmap, vault - public-domain.md : tableau des apps déployées (URL, auth, redirect_uri) + modes d'intégration (OIDC / Proxy Provider / route seule) - auth-portal.md : section « Accès externe » → domaine HTTPS (URLs à jour) - auth-portal-admin.md : URL admin + pièges (slug/discovery 404 ArgoCD) - guide utilisateur + index admin/ : URLs funklab.online Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
502403d0f9
commit
a13b5a70cd
7 changed files with 92 additions and 55 deletions
|
|
@ -15,6 +15,7 @@
|
|||
| Problème NFS / stockage | [infra/nfs.md](infra/nfs.md) |
|
||||
| Gérer les utilisateurs du portail (créer/révoquer/assigner) | [k8s/auth-portal-admin.md](k8s/auth-portal-admin.md) |
|
||||
| Portail consoles / SSO — architecture & pièges | [k8s/auth-portal.md](k8s/auth-portal.md) |
|
||||
| Domaine public `funklab.online` + HTTPS (Traefik/Let's Encrypt) | [k8s/public-domain.md](k8s/public-domain.md) |
|
||||
| Accès distant VPN (WireGuard, dormant) | [infra/wireguard.md](infra/wireguard.md) |
|
||||
| Serveur de jeu Satisfactory | [ops/satisfactory.md](ops/satisfactory.md) |
|
||||
| Incident passé | [incidents.md](incidents.md) |
|
||||
|
|
@ -67,6 +68,7 @@
|
|||
| [k8s/ghostfolio.md](k8s/ghostfolio.md) | Ghostfolio — suivi de portefeuille (PostgreSQL s01 + Redis) |
|
||||
| [k8s/auth-portal.md](k8s/auth-portal.md) | Authentik + Guacamole — architecture, déploiement, accès Internet, pièges |
|
||||
| [k8s/auth-portal-admin.md](k8s/auth-portal-admin.md) | Portail — administration : utilisateurs, machines, apps du hub, révocation |
|
||||
| [k8s/public-domain.md](k8s/public-domain.md) | Domaine public `funklab.online` — HTTPS Let's Encrypt, apps exposées, ajout d'app |
|
||||
| [k8s/k9s.md](k8s/k9s.md) | k9s — TUI de gestion du cluster |
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ sont dans **`admin/k8s/auth-portal.md`** ; le guide à envoyer aux utilisateurs
|
|||
|
||||
| Console | URL | Compte |
|
||||
|---|---|---|
|
||||
| **Authentik** (identités, apps du hub) | `http://auth.lab.local` (LAN) ou `http://kaya.freeboxos.fr:9081` → icône ⚙ | `akadmin` |
|
||||
| **Authentik** (identités, apps du hub) | `https://auth.funklab.online` (ou `http://auth.lab.local` en LAN) → icône ⚙ | `akadmin` |
|
||||
| **Guacamole** (connexions, sessions) | tuile « Portail consoles » puis *Settings* | `Alkatrazz` (SSO, « Administer system ») |
|
||||
|
||||
> `guacadmin` (compte local) est **inaccessible** tant que le SSO est prioritaire —
|
||||
|
|
@ -139,7 +139,8 @@ kubectl -n auth logs deploy/authentik-server --tail=50 # flows, redirect_uri,
|
|||
|
||||
| Symptôme | Cause probable |
|
||||
|---|---|
|
||||
| « Redirect URI Error » (page Authentik) | Redirect URI du provider ≠ `http://kaya.freeboxos.fr:9080/` au caractère près |
|
||||
| « Redirect URI Error » (page Authentik) | Redirect URI du provider ≠ l'URL publique de l'app au caractère près (cf. tableau `public-domain.md`) |
|
||||
| « failed to query provider … 404 » (ArgoCD/OIDC) | Application Authentik absente ou **slug** ≠ celui attendu (ex. `argocd`) → discovery 404 |
|
||||
| Login SSO accepté puis retour à la page de login Guacamole | Signing Key absente du provider, ou slug ≠ `guacamole` (JWKS 404 dans les logs) |
|
||||
| Tout le monde bloqué au login | Anti-bruteforce (piège n°5) — attendre ~5 min ou redémarrer le pod guacamole |
|
||||
| Tuile absente pour un utilisateur | Pas membre du groupe `guacamole` |
|
||||
|
|
|
|||
|
|
@ -90,35 +90,30 @@ kubectl -n auth create secret generic guacamole-secret \
|
|||
3. Settings → Users : les comptes Authentik apparaissent après leur **premier login**
|
||||
(`POSTGRESQL_AUTO_CREATE_ACCOUNTS=true`) → leur assigner les connexions (READ).
|
||||
|
||||
## Accès externe (Internet) — Authentik en hub utilisateur
|
||||
## Accès externe (Internet) — domaine public HTTPS
|
||||
|
||||
**Authentik est la porte d'entrée** (page « My applications » : une tuile par app
|
||||
autorisée), le SSO fait le reste. Choix assumé 2026-07-07 : exposition directe sans
|
||||
VPN, simplicité d'abord (WireGuard reste dispo, cf. `admin/infra/wireguard.md`).
|
||||
**Depuis le 2026-07-07, tout passe par le domaine `funklab.online` en HTTPS** (Let's
|
||||
Encrypt). Authentik (`auth.funklab.online`) est la porte d'entrée ; le SSO fait le reste.
|
||||
Détail complet de la chaîne (DNS OVH, Freebox, Traefik/TLS) : **`admin/k8s/public-domain.md`**.
|
||||
|
||||
| URL publique | Service | Chaîne |
|
||||
|---|---|---|
|
||||
| `http://kaya.freeboxos.fr:9081` | **Authentik** (hub + login) | Freebox `9081/tcp → s01` → DNAT → VIP MetalLB `192.168.10.201:9000` |
|
||||
| `http://kaya.freeboxos.fr:9080` | Guacamole (via tuile SSO) | Freebox `9080/tcp → s01` → DNAT → VIP `192.168.10.202:8080` |
|
||||
| URL publique | Service |
|
||||
|---|---|
|
||||
| `https://auth.funklab.online` | **Authentik** — hub + login |
|
||||
| `https://portail.funklab.online` | Guacamole (consoles) |
|
||||
| `https://grafana.funklab.online` · `https://openwebui.funklab.online` · `https://argocd.funklab.online` | apps SSO |
|
||||
| `https://n8n.funklab.online` | n8n (login natif) |
|
||||
|
||||
- **URL canonique unique** : les endpoints OIDC de Guacamole pointent sur
|
||||
`kaya.freeboxos.fr` → **tout le monde, LAN inclus**, doit utiliser ces URLs (le LAN
|
||||
repasse par la Freebox, hairpin NAT). `portail.lab.local` affiche encore l'UI mais
|
||||
le SSO ramène sur l'URL publique.
|
||||
- Les VIPs dédiées **contournent Traefik** : un DNAT par port ne peut pas router par
|
||||
Host sur l'entrypoint unique :80.
|
||||
- **Un seul compte par personne (Authentik)** — plus de comptes locaux Guacamole.
|
||||
Parcours ami : `kaya.freeboxos.fr:9081` → login → tuile « Portail consoles » →
|
||||
console. Nouvelle app plus tard = nouveau provider + tuile, zéro compte en plus.
|
||||
- **Garde-fous** : rate-limit nftables (30 connexions neuves/min par service) +
|
||||
protections applicatives (Authentik : flows/lockout ; Guacamole : ban 5 échecs).
|
||||
⚠️ HTTP **non chiffré** : mots de passe interceptables en théorie — mots de passe
|
||||
dédiés, MFA/TOTP Authentik recommandé pour durcir, TLS (vrai domaine + Let's
|
||||
Encrypt) si l'usage s'installe.
|
||||
- **URL canonique = le domaine**, LAN inclus (dnsmasq split-horizon : `*.funklab.online`
|
||||
→ Traefik en interne). Les endpoints OIDC des apps pointent sur `*.funklab.online`.
|
||||
- Les anciens ports `kaya.freeboxos.fr:9080/9081` (DNAT → VIPs MetalLB `.202`/`.201`)
|
||||
**restent un chemin réseau** mais le SSO ramène sur le domaine.
|
||||
- **Un seul compte par personne (Authentik)**. Nouvelle app = nouveau provider + tuile.
|
||||
- **Garde-fous** : rate-limit nftables + TLS Let's Encrypt (plus de HTTP clair) +
|
||||
protections applicatives (Authentik lockout, Guacamole ban 5 échecs). Durcissement
|
||||
possible : MFA/TOTP Authentik.
|
||||
|
||||
Config côté Authentik (UI) : provider `guacamole` → **Redirect URI
|
||||
`http://kaya.freeboxos.fr:9080/`** ; application « Portail consoles » → **Launch URL
|
||||
`http://kaya.freeboxos.fr:9080/`**.
|
||||
Config côté Authentik (UI) — Redirect URI par app : voir le tableau de
|
||||
`admin/k8s/public-domain.md` (ex. Guacamole `https://portail.funklab.online/`).
|
||||
|
||||
## Pièges / notes
|
||||
|
||||
|
|
|
|||
|
|
@ -85,12 +85,37 @@ spec:
|
|||
|
||||
Le certificat est émis automatiquement au premier accès (challenge HTTP-01 sur le port 80).
|
||||
|
||||
## Intégration auth par app
|
||||
## Apps exposées (état 2026-07-07)
|
||||
|
||||
| App | Mode | Note |
|
||||
Toutes en HTTPS (cert Let's Encrypt par sous-domaine), accessibles depuis le hub
|
||||
Authentik (`https://auth.funklab.online`) et directement par leur URL.
|
||||
|
||||
| App | URL publique | Auth | Redirect URI OIDC (Authentik) |
|
||||
|---|---|---|---|
|
||||
| **Portail consoles** (Guacamole) | `portail.funklab.online` | SSO OIDC | `https://portail.funklab.online/` |
|
||||
| **Grafana** | `grafana.funklab.online` | SSO OIDC (lab-admins→Admin, sinon Viewer) | `https://grafana.funklab.online/login/generic_oauth` |
|
||||
| **Open WebUI** | `openwebui.funklab.online` | SSO OIDC | `https://openwebui.funklab.online/oauth/oidc/callback` |
|
||||
| **Argo CD** | `argocd.funklab.online` | SSO OIDC (lab-admins→admin) | `https://argocd.funklab.online/auth/callback` |
|
||||
| **n8n** | `n8n.funklab.online` | **login natif** (SSO = Enterprise, indispo en communautaire) | — |
|
||||
|
||||
- Chaque app OIDC : provider Authentik **Confidential**, client secret archivé au vault
|
||||
(`vault_<app>_oauth_client_secret` / `vault_argocd_oidc_client_secret`) et dans un
|
||||
secret k8s. `token_url`/discovery joignent Authentik **server-side via hairpin**
|
||||
(vérifié : un pod atteint `auth.funklab.online`).
|
||||
- **Non exposés** (volontaire) : Prometheus, Alertmanager, SearXNG — pas de login propre,
|
||||
nécessiteraient un **Proxy Provider** (forward-auth) avant toute exposition Internet.
|
||||
|
||||
Manifests : `k8s/apps/*/ingress-public.yaml`, `k8s/infra/monitoring/ingressroute-public.yaml`,
|
||||
`k8s/argocd-bootstrap/ingressroute-public.yaml`. Config OIDC : Grafana/ArgoCD dans leurs
|
||||
`values.yaml` helm, Guacamole/Open WebUI dans leur `deployment.yaml`.
|
||||
|
||||
## Intégration auth — comment ajouter une app
|
||||
|
||||
| Type d'app | Mode | Étapes |
|
||||
|---|---|---|
|
||||
| Grafana, Open WebUI, ArgoCD | **OIDC natif** | redirect_uri sur l'URL publique `*.funklab.online` |
|
||||
| Prometheus, Alertmanager, n8n, SearXNG | **Proxy Provider Authentik** | middleware forward-auth Traefik (app sans login propre) |
|
||||
| App avec OIDC natif (Grafana, Open WebUI, ArgoCD…) | **OIDC** | provider Confidential + app (slug) dans Authentik, config OIDC côté app avec l'URL publique, IngressRoute websecure |
|
||||
| App sans login (Prometheus…) | **Proxy Provider** | outpost Authentik + middleware forward-auth Traefik (non déployé à ce jour) |
|
||||
| App avec login propre non-OIDC (n8n…) | **route seule** | IngressRoute websecure + tuile-lien Authentik (comptes gérés dans l'app) |
|
||||
|
||||
Détail de l'ajout d'une app au hub : `admin/k8s/auth-portal-admin.md`.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue