plan: DEC-9/10 decided, DEC-12 TLS proposed, add WS-I TLS card, update WS-H
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b5b3466e1d
commit
7b588120e0
6 files changed
+91
-27
No files matched your search
@@ -5,7 +5,7 @@
|
||||
| Status | Backlog |
|
||||
| Owner | — |
|
||||
| Phase | 4 (single track, after release candidate) |
|
||||
| Depends on | P3 (final unit hardening, `--print-config`, README) |
|
||||
| Depends on | P3 (final unit hardening, `--print-config`, README); WS-I (TLS options) |
|
||||
| Blocks | — |
|
||||
| Owned files | `flake.nix`, `nix/package.nix`, `nix/module.nix`, `nix/tests/`, `README.md` (NixOS section only) |
|
||||
|
||||
@@ -22,7 +22,8 @@ Tick these in [`TODO.md`](../../TODO.md).
|
||||
- **H3** `nix/module.nix` options under `services.skyg-linux-tracker`:
|
||||
- `enable`, `package`
|
||||
- `port` (default **1984**; the app default is unchanged, DEC-9)
|
||||
- `bind` (default `"127.0.0.1"`)
|
||||
- `bind` (default `"127.0.0.1"`; LAN exposure is set per install)
|
||||
- `tls.enable`, `tls.certFile`, `tls.keyFile` (passed via systemd `LoadCredential`, DEC-12)
|
||||
- `openFirewall` (default `false`)
|
||||
- `allowedHosts` (extra Host/Origin entries for `/mcp`; the module adds `networking.hostName` automatically)
|
||||
- `docker.enable` (default `false`; adds the `docker` group and sets the socket path, DEC-6)
|
||||
@@ -34,15 +35,15 @@ Tick these in [`TODO.md`](../../TODO.md).
|
||||
- `SupplementaryGroups=systemd-journal` (plus `docker` when enabled)
|
||||
- the P3 hardening set (`NoNewPrivileges`, `ProtectSystem=strict`, `ProtectHome`, `PrivateTmp`, `RestrictAddressFamilies`, …), reusing `systemd/skyg-linux-tracker.service` rather than diverging
|
||||
- config written to `/etc/skyg-linux-tracker.toml`, the default path the app already reads, so the CLI and the service always agree
|
||||
- **H5** CLI install (required): `environment.systemPackages = [ cfg.package ]`. A thin wrapper on `PATH` re-execs `slinuxm token create|list|revoke …` as the service user via `sudo -u`, and passes every other subcommand through untouched. Without privileges it prints a clear message instead of a permission error (DEC-10).
|
||||
- **H5** CLI install (required): `environment.systemPackages = [ cfg.package ]`, plain binary, no wrapper (DEC-10). Mint tokens with `sudo -u skyg-linux-tracker slinuxm token create <name>`; the module's NixOS notes and the README show this exact command. The root guard in `slinuxm` (token commands refuse to run as root against another user's DB and print the command above) is implemented here as a small change in the CLI code.
|
||||
- **H6** Firewall: `openFirewall` opens the port globally. Also support an interface-scoped option (`networking.firewall.interfaces.<if>.allowedTCPPorts`), which is the recommended LAN setup. Assert at eval time that `bind` non-loopback is accompanied by auth enabled.
|
||||
- **H7** README NixOS section: flake input, minimal config, token workflow (`sudo slinuxm token create <name>`), the exposure model (loopback + Tailscale or TLS proxy recommended, since bearer tokens over plain HTTP are readable on a LAN), `allowedHosts` for `bind = 0.0.0.0`.
|
||||
- **H7** README NixOS section: flake input, minimal config, token workflow (`sudo -u skyg-linux-tracker slinuxm token create <name>`), the exposure model (loopback + Tailscale or TLS proxy recommended, since bearer tokens over plain HTTP are readable on a LAN), `allowedHosts` for `bind = 0.0.0.0`.
|
||||
- **H8** NixOS VM test (`nix/tests/`):
|
||||
1. service starts and `curl :1984/healthz` returns 200 unauthenticated
|
||||
1. service starts and `curl :1984/healthz` returns 200 unauthenticated (a second case with TLS enabled and a test cert)
|
||||
2. `/api/v1/systemd/units` returns 401 without a token
|
||||
3. `sudo slinuxm token create t` prints a token, and the same request with it returns 200
|
||||
3. `sudo -u skyg-linux-tracker slinuxm token create t` prints a token, and the same request with it returns 200
|
||||
4. `/mcp` initialize and tools/list work with the token
|
||||
5. `sudo slinuxm token revoke t` makes the same request return 401 without a restart
|
||||
5. `slinuxm token revoke t` (same `sudo -u` form) makes the same request return 401 without a restart
|
||||
6. bad Origin on `/mcp` returns 403
|
||||
|
||||
## Done when
|
||||
@@ -54,7 +55,7 @@ Tick these in [`TODO.md`](../../TODO.md).
|
||||
## Notes
|
||||
|
||||
- Port 1984 is set in the module only, so the non-Nix path is unchanged.
|
||||
- Declarative/hash-imported tokens and activation-time `bootstrapTokens` are out of scope for v1 (DEC-11). They would need a `slinuxm` change to import hashes from a file.
|
||||
- Tokens are printed once and never stored (DEC-11). Declarative/hash-imported tokens and activation-time `bootstrapTokens` are out of scope for v1 are not offered.
|
||||
- The module must not put secrets in the generated TOML. Anything sensitive goes through `environmentFile`.
|
||||
|
||||
## Log
|
||||
|
||||
Reference in new issue
Block a user