Update Authelia protection matrix, remove hoarder references

This commit is contained in:
2025-12-20 02:24:15 +01:00
parent b5d6f652d5
commit c15da603a6
3 changed files with 39 additions and 84 deletions

View File

@@ -1,61 +1,64 @@
# Authelia - SSO
Authelia fournit l'authentification unique (SSO) pour tous les services Talloires.
Authelia fournit l authentification unique (SSO) pour tous les services Talloires.
## Accès
## Acces
| Paramètre | Valeur |
| Parametre | Valeur |
|-----------|--------|
| URL | [auth.talloires.local](https://auth.talloires.local) |
| Utilisateur | lionel |
| Email | dflected@dflected.org |
| 2FA | TOTP activé |
| 2FA | TOTP active |
## Services protégés (forward_auth)
## Matrice de protection des services
Ces services requièrent une authentification via Authelia avant d'accéder au backend :
| Service | Authelia | Raison |
|---------|----------|--------|
| **docs** | ✅ | Documentation interne |
| **portainer** | ✅ | Admin Docker |
| **dockge** | ✅ | Admin Docker Compose |
| **transmission** | ✅ | Client torrent |
| **netdata** | ✅ | Monitoring systeme |
| **grafana** | ✅ | Dashboards / Logs |
| **uptime** | ✅ | Monitoring disponibilite |
| **cockpit** | ✅ | Admin systeme |
| **languagetool** | ✅ | API grammaire |
| **auth** | ❌ | C est Authelia lui-meme |
| **git** | ❌ | Auth OIDC propre |
| **jellyfin** | ❌ | Auth propre |
| **homeassistant** | ❌ | Auth propre |
| **linkwarden** | ❌ | Auth propre |
| **vikunja** | ❌ | Auth propre |
| **outline** | ❌ | Auth OIDC propre |
| Service | URL |
|---------|-----|
| docs | docs.talloires.local |
| portainer | portainer.talloires.local |
| dockge | dockge.talloires.local |
| transmission | transmission.talloires.local |
| netdata | netdata.talloires.local |
| homeassistant | homeassistant.talloires.local |
| uptime | uptime.talloires.local |
| cockpit | cockpit.talloires.local |
| vikunja | vikunja.talloires.local |
| hoarder | hoarder.talloires.local |
| linkwarden | linkwarden.talloires.local |
| languagetool | languagetool.talloires.local |
| jellyfin | jellyfin.talloires.local |
> **Note** : Cette protection s applique aux domaines `.local` ET `.1871.zt`
## Services avec OAuth/OIDC
Ces services utilisent Authelia comme provider OpenID Connect :
### Gitea
| Paramètre | Valeur |
| Parametre | Valeur |
|-----------|--------|
| Client ID | gitea |
| Redirect URI | https://git.talloires.local/user/oauth2/Authelia/callback |
| Scopes | openid, email, profile |
### Outline
| Paramètre | Valeur |
| Parametre | Valeur |
|-----------|--------|
| Client ID | outline |
| Redirect URI | https://outline.talloires.local/auth/oidc.callback |
| Scopes | openid, offline_access, profile, email |
### Grafana (Header Auth)
Grafana utilise l'authentification par header via Authelia (pas OIDC) :
Grafana utilise l authentification par header via Authelia (pas OIDC) :
| Header | Valeur |
|--------|--------|
| Remote-User | Utilisateur authentifié |
| Remote-Email | Email de l'utilisateur |
| Remote-User | Utilisateur authentifie |
| Remote-Email | Email de l utilisateur |
## Configuration
@@ -64,27 +67,16 @@ Grafana utilise l'authentification par header via Authelia (pas OIDC) :
|---------|-------|
| ~/docker/authelia/config/configuration.yml | Config principale |
| ~/docker/authelia/config/users_database.yml | Base utilisateurs |
| ~/docker/authelia/config/oidc.key | Clé privée OIDC |
| ~/docker/authelia/config/oidc.key | Cle privee OIDC |
### SMTP (Proton Mail)
| Paramètre | Valeur |
| Parametre | Valeur |
|-----------|--------|
| Serveur | smtp.protonmail.ch:465 |
| Protocol | TLS implicite (submissions://) |
| Protocol | TLS implicite |
| From | Talloires <dflected@dflected.org> |
### Buffers HTTP
Pour éviter l'erreur 431 (Request Header Fields Too Large), la config inclut :
```yaml
server:
buffers:
read: 8192
write: 8192
```
## Intégration Caddy
## Integration Caddy
### Snippet forward_auth
```
@@ -98,30 +90,21 @@ server:
### Usage dans Caddyfile
```
monservice.talloires.local {
monservice.talloires.local, monservice.talloires.1871.zt {
import authelia
reverse_proxy backend:port
tls internal
}
```
### Bypass Authelia (accès ZeroTier)
```
monservice.talloires.1871.zt {
# Pas de forward_auth = pas d'Authelia
reverse_proxy backend:port
tls internal
}
```
## Ajouter un client OIDC
1. Générer le hash du secret :
1. Generer le hash du secret :
```bash
docker exec authelia authelia crypto hash generate pbkdf2 --password "mon-secret"
```
2. Ajouter dans configuration.yml (section identity_providers.oidc.clients) :
2. Ajouter dans configuration.yml :
```yaml
- client_id: nouveau_client
client_name: Mon Service
@@ -134,10 +117,9 @@ docker exec authelia authelia crypto hash generate pbkdf2 --password "mon-secret
- openid
- email
- profile
token_endpoint_auth_method: client_secret_post
```
3. Redémarrer Authelia :
3. Redemarrer Authelia :
```bash
docker restart authelia
```
@@ -148,35 +130,12 @@ docker restart authelia
# Logs
docker logs authelia -f
# Générer un hash de mot de passe utilisateur
# Hash mot de passe utilisateur
docker exec authelia authelia crypto hash generate argon2 --password "motdepasse"
# Générer un hash pour OIDC client secret
# Hash OIDC client secret
docker exec authelia authelia crypto hash generate pbkdf2 --password "secret"
# Valider la configuration
docker exec authelia authelia validate-config
```
## Dépannage
### Erreur 431 (Header Fields Too Large)
Augmenter les buffers dans configuration.yml :
```yaml
server:
buffers:
read: 8192
write: 8192
```
### OIDC "invalid_client"
Vérifier que le client_secret est hashé avec pbkdf2 (pas argon2).
### Cookies non persistants
Vérifier que le domain est correct dans session :
```yaml
session:
cookies:
- domain: talloires.local
authelia_url: https://auth.talloires.local
```