clusev/app/Models
boban e38409bf31 security: harden proxy trust + model mass-assignment + terminal-token log hygiene
Fixes from the security audit (the brute-force/rate-limiting angle matters more now that the
password policy is min(6)/no-complexity, so IP-keyed throttles must not be spoofable):

- bootstrap/app.php: trustProxies(at: '*') → trust only PRIVATE ranges in prod. Caddy reaches
  app:80 from the docker bridge (private IP) so it stays trusted, but a public/off-network source
  can no longer forge X-Forwarded-For to spoof request()->ip() and bypass the login/2FA/forgot
  throttles + the brute-force ban.
- TerminalSession + HostCredential: replace $guarded=[] with an explicit $fillable allowlist; add
  $hidden=[secret,passphrase] to HostCredential so it never serializes its credential fields.
- nginx /terminal/ws: access_log off — the single-use session token rode the query string into the
  access log.

Verified: full suite 467 pass; all panel pages 200 with zero console errors; server terminal still
connects + runs commands.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 07:16:10 +02:00
..
AuditEvent.php feat(release): publish + yank UI, strings, audit labels 2026-06-23 03:28:49 +02:00
BannedIp.php feat(auth): BannedIp model + migration 2026-06-20 17:26:28 +02:00
HostCredential.php security: harden proxy trust + model mass-assignment + terminal-token log hygiene 2026-06-26 07:16:10 +02:00
MetricSample.php feat(metrics): persistent resource-history graph on the Server-Details page 2026-06-25 01:31:27 +02:00
Server.php chore(audit): full code sweep — fix open-redirect, drop dead code, clean docs 2026-06-13 12:54:26 +02:00
Setting.php feat(security): dashboard hardening, credential mgmt, system domain/TLS + channel, self-hardening 2026-06-13 02:25:23 +02:00
SshCredential.php chore(audit): full code sweep — fix open-redirect, drop dead code, clean docs 2026-06-13 12:54:26 +02:00
TerminalSession.php security: harden proxy trust + model mass-assignment + terminal-token log hygiene 2026-06-26 07:16:10 +02:00
User.php fix(security): harden brute-force, rate-limiting and auth-DoS (audit follow-up) 2026-06-17 17:59:45 +02:00
WebauthnCredential.php fix(webauthn): hash-indexed credential ids + reset keys on 2FA disable 2026-06-14 18:40:24 +02:00
WgTrafficSample.php feat(wg): wg_traffic_samples table + model 2026-06-20 23:59:11 +02:00