This commit is contained in:
2026-09-22 23:37:05 +03:00
parent cf1c31eb2a
commit 0fc35589e6
25 changed files with 2616 additions and 245 deletions

View File

@@ -35,7 +35,7 @@ and returns liveness only. The complete route table is in
`../docs/architecture.md`. Limits default to 64 KiB bodies, 32 concurrent calls,
five-second requests, 10 read rps, 2 write rps, and burst 20.
System data comes from `/proc` and `/sys`; fixed `ip`, `nft`/`iptables`,
System data comes from `/proc` and `/sys`; fixed `ip`, `iptables`,
`fail2ban-client`, `wg`, and `systemctl` invocations augment it. User input is
never part of a command string. Jail names and IPs are validated, and systemd
names must exactly match the configuration allow-list.
@@ -49,15 +49,17 @@ administrator must opt in after review.
## systemd and privilege
Install `packaging/vps-agent.service`. It caps memory at 64 MiB, CPU at 10%,
Install `packaging/vps-agent.service`, `vps-agent-helper.socket`, and
`vps-agent-helper@.service`. The daemon unit caps memory at 64 MiB, CPU at 10%,
tasks at 64, removes all capabilities, sets `NoNewPrivileges`, and enables
filesystem/kernel/namespace hardening. The agent logs to journald and does not
write successful polls or metrics to disk.
Read APIs work unprivileged on ordinary supported distributions. Process owners
may be absent due to `/proc` permissions. Fail2Ban changes and service restarts
will return an error unless the administrator adds narrowly scoped polkit/sudo
policy; the installer deliberately grants none. Firewall is read-only in v1.
may be absent due to `/proc` permissions. The socket-activated root helper runs
one typed request at a time and has no shell/command endpoint. Writes remain off
until their local allow-lists and `management_enabled` flags are configured.
Firewall persistence requires `iptables-persistent`/`netfilter-persistent`.
## Lifecycle and troubleshooting