gameservers-control/.env.example
Shinuwa 7d89a4e646
All checks were successful
Deploy Gameservers Control / check (push) Successful in 6s
Deploy Gameservers Control / deploy (push) Has been skipped
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>
2026-12-02 12:34:11 +01:00

45 lines
1.6 KiB
Text

# Port HTTP de l'interface web.
# Exemple: PORT=8080
PORT=3000
# Chemin du JSON de statut partage depuis la VM des serveurs de jeu.
# En production, renseigner le chemin du montage NFS.
# Exemple: GAMESERVERS_STATUS_FILE=/mnt/gameservers/status.json
GAMESERVERS_STATUS_FILE=./mocked/dev-gameservers-status.json
# Dossier de stockage local de l'application.
# Contient notamment groups.json, servers.json, launch-logs.json et server-images/.
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,
# GAME_1_SSH_KEY_FILE et GAME_1_START_COMMAND.
# La cible peut etre un alias SSH, un hostname, une IP, ou user@host.
# Exemples:
# GAME_1_SSH_TARGET=game-server
# GAME_1_SSH_PORT=2222
# GAME_1_SSH_KEY_FILE=/home/app/.ssh/game-server-key
# GAME_1_SSH_TARGET=user@192.0.2.10
GAME_1_SSH_TARGET=game-server-1
GAME_1_SSH_PORT=
GAME_1_SSH_KEY_FILE=
GAME_1_START_COMMAND="bash /opt/game-server-1/start.sh"
GAME_2_SSH_TARGET=game-server-2
GAME_2_SSH_PORT=
GAME_2_SSH_KEY_FILE=
GAME_2_START_COMMAND="bash /opt/game-server-2/start.sh"