feat(auth): throttle logins, close sessions on password change, password policy
- limit login attempts per IP (5 per 15 min by default, counted before the password check so parallel requests cannot exceed it), 429 + Retry-After, failed logins logged with the client IP - TRUSTED_PROXIES env to honour X-Forwarded-For from the reverse proxy only - changing or regenerating a group password closes that group's other sessions; deleting a group closes all of its sessions - new group passwords: 12 to 256 characters and not shared with another group (login opens the first matching group) - PATCH /groups/:id/password no longer echoes the password - purge expired sessions every 10 minutes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
55be6bf034
commit
7d89a4e646
10 changed files with 280 additions and 16 deletions
10
.env.example
10
.env.example
|
|
@ -14,6 +14,16 @@ STORAGE_DIR=./storage
|
|||
# Duree de validite des sessions web, en heures.
|
||||
SESSION_TTL_HOURS=12
|
||||
|
||||
# Reverse proxys dont l'en-tete X-Forwarded-For est accepte, separes par des virgules.
|
||||
# Indispensable derriere un proxy: sinon tous les clients partagent l'adresse du proxy
|
||||
# pour la limitation des tentatives de connexion.
|
||||
# Exemple: TRUSTED_PROXIES=loopback,192.168.0.104
|
||||
TRUSTED_PROXIES=
|
||||
|
||||
# Limitation des tentatives de connexion par adresse IP.
|
||||
LOGIN_MAX_ATTEMPTS=5
|
||||
LOGIN_WINDOW_MINUTES=15
|
||||
|
||||
# Profils de lancement SSH.
|
||||
# Chaque serveur dans storage/servers.json reference un profil via startProfile.
|
||||
# Exemple: "startProfile": "GAME_1" utilise GAME_1_SSH_TARGET, GAME_1_SSH_PORT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue