feat(settings): add browser setup and administration (#10)
This commit is contained in:
+18
-3
@@ -157,9 +157,24 @@ only, then removed.
|
||||
## 7. Security
|
||||
|
||||
- The app can run commands on every host → treat access as root-equivalent.
|
||||
- Built-in login: one password (scrypt hash in config), session cookie signed with a
|
||||
secret persisted on disk → **logins survive restarts**. Optional: trust a
|
||||
forward-auth header from Traefik instead.
|
||||
- Built-in login: one scrypt password hash in `auth.json`; session cookies are HMAC
|
||||
signed with a persisted mode-0600 secret and bound to the current password hash.
|
||||
Logins survive restarts; changing the password invalidates other cookies.
|
||||
- First run creates a random mode-0600 `setup-token` in the data directory. Only its
|
||||
path is logged. Public GET `/api/auth/setup` reports whether setup is needed;
|
||||
POST requires the token (constant-time comparison), matching passwords of at
|
||||
least 12 characters (maximum 4096 bytes), and consumes the token once. Configured
|
||||
instances reject setup with 409. Setup and login share a per-IP rate limit.
|
||||
- Settings changes require the current password, or atomically rotate the signing
|
||||
secret to sign out all sessions. Both issue a fresh cookie to the current browser
|
||||
and close existing WebSockets; future connections must authenticate again.
|
||||
Forward-auth identities remain governed by the upstream proxy.
|
||||
- Every API route is authenticated except exact health, login, and setup paths;
|
||||
the origin check also covers those exceptions and WebSocket upgrades.
|
||||
Optional forward-auth headers are accepted only from configured trusted peers.
|
||||
- Claude status executes only `claude --version` with argv, timeout, and output limit.
|
||||
Login status checks only the existence of `~/.claude/.credentials.json` under the
|
||||
service user home; credential contents are never read or returned.
|
||||
- Listens on `127.0.0.1` or LAN; intended behind Traefik + firewall (LAN/Tailscale only).
|
||||
- Terminal panel = shell as the service user: same trust level as the app itself.
|
||||
- No secrets in notebooks, audit log or artifacts metadata.
|
||||
|
||||
Reference in New Issue
Block a user