clusev/app/Livewire/Modals
boban 4c67b278bd fix(docker): admin-gate the host target + honour a "0" key passphrase (Codex review)
Two findings from the Codex review of the host-Docker changes:

1. Under-gated host target (security). Listing/actioning/log-reading the
   CLUSEV HOST's containers only required `operate`, but the host is the
   control-plane machine — a `Stop` on clusev-mariadb takes Clusev down —
   and the host TERMINAL is already `manage-fleet`-only. Align it:
   - effectiveTarget() resolves to the host only for manage-fleet users;
     everyone else is pinned to a fleet server (no host default, no toggle).
   - action()/viewLogs() and the ContainerLogs host sentinel (serverId 0)
     now abort_unless manage-fleet.
   A viewer/operator can no longer reach the host, even by forcing
   target=host.

2. HostCredential::toServer() dropped a key passphrase equal to the string
   "0" via a falsy `if ($this->passphrase)` check, which would break key
   auth. Use an explicit null/'' check.

Added tests: non-admin never targets the host, a forced target=host still
hits a fleet server, operator cannot open host logs. 751 tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 23:43:18 +02:00
..
.gitkeep feat: scaffold — Dockerized Laravel 13 + Livewire 3 + Tailwind 4 + Reverb 2026-06-12 00:31:50 +02:00
AddSshKey.php feat(rbac): gate fleet, host terminal + domain/TLS actions (manage-fleet/operate/manage-panel) 2026-07-05 01:01:24 +02:00
ConfirmAction.php feat(security): signed confirm-action tokens + airtight backup-code reveal 2026-06-15 18:35:33 +02:00
ContainerLogs.php fix(docker): admin-gate the host target + honour a "0" key passphrase (Codex review) 2026-07-05 23:43:18 +02:00
CreateServer.php feat(rbac): gate fleet, host terminal + domain/TLS actions (manage-fleet/operate/manage-panel) 2026-07-05 01:01:24 +02:00
CreateUser.php feat(rbac): user-management roles UI — role badge, selector, role-change with last-admin guard 2026-07-05 01:15:32 +02:00
EditCredential.php feat(rbac): gate fleet, host terminal + domain/TLS actions (manage-fleet/operate/manage-panel) 2026-07-05 01:01:24 +02:00
Fail2banBan.php feat(rbac): gate network + panel actions (manage-network/manage-panel) 2026-07-05 00:52:09 +02:00
Fail2banBans.php feat(rbac): gate network + panel actions (manage-network/manage-panel) 2026-07-05 00:52:09 +02:00
Fail2banConfig.php feat(rbac): gate network + panel actions (manage-network/manage-panel) 2026-07-05 00:52:09 +02:00
FileEditor.php fix(security): close file-read RBAC gap + fail2ban arg-injection + update/HMAC hardening 2026-07-05 16:05:16 +02:00
FirewallRule.php feat(rbac): gate network + panel actions (manage-network/manage-panel) 2026-07-05 00:52:09 +02:00
HardeningAction.php feat(rbac): gate network + panel actions (manage-network/manage-panel) 2026-07-05 00:52:09 +02:00
HostShell.php feat(rbac): gate fleet, host terminal + domain/TLS actions (manage-fleet/operate/manage-panel) 2026-07-05 01:01:24 +02:00
RecoveryCodes.php fix(2fa): bound the backup-code reveal flag with a 10-minute TTL 2026-06-15 18:42:58 +02:00
SshKeyProvision.php feat(rbac): gate fleet, host terminal + domain/TLS actions (manage-fleet/operate/manage-panel) 2026-07-05 01:01:24 +02:00
SystemUpdate.php feat(rbac): gate fleet, host terminal + domain/TLS actions (manage-fleet/operate/manage-panel) 2026-07-05 01:01:24 +02:00