Add device: platform-aware one-liner installs from the Devices page #5

Merged
gsadmin merged 17 commits from dev into main 2026-08-08 23:54:02 +00:00

17 Commits

Author SHA256 Message Date
gsadmin 5f9e915a82 nginx sample: only the WebSocket map is http-level
CI / build-test (push) Successful in 15m47s
CI / images (push) Successful in 2m20s
CI / build-test (pull_request) Successful in 3m20s
CI / images (pull_request) Has been skipped
The rate-limit zones sit fine in the site file, so they move back into
executer.conf; executer-http.conf keeps just the upgrade map that Nginx
UI cannot host in a site.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 18:59:01 -04:00
gsadmin 3a0797ebf4 nginx sample: split http-level directives for Nginx UI
CI / build-test (push) Successful in 16m6s
CI / images (push) Successful in 2m44s
CI / build-test (pull_request) Successful in 3m21s
CI / images (pull_request) Has been skipped
limit_req zones and the WebSocket map move to executer-http.conf
(conf.d / Manage Configs) because Nginx UI site files expect
server/upstream blocks and http-level directives there fail its config
check. The site keeps a pointer, and the commented allow-lists gain the
CGNAT range.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 18:51:27 -04:00
gsadmin a2cbc53a3e Caddy and HAProxy edge samples alongside nginx
CI / build-test (push) Successful in 17m9s
CI / build-test (pull_request) Successful in 3m44s
CI / images (pull_request) Has been skipped
CI / images (push) Successful in 6m7s
Same single-file shape as the nginx site: banner header with routes and
BEFORE-USE placeholders, forwarded headers with the trust note,
WebSocket handling, commented IP allow-lists, enrollment/sign-in rate
limits where the engine supports them natively, and the commented
TLS_SELF_SIGNED upstream variant (skip verify or pin the exported
roots). The Caddyfile is validated with caddy itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 18:11:31 -04:00
gsadmin c80f0b909d Trim TLS docs, drop the MVP section, agent MSI gains a skip-verify box
CI / build-test (push) Successful in 14m59s
CI / build-test (pull_request) Successful in 3m21s
CI / images (pull_request) Has been skipped
CI / images (push) Successful in 3m29s
The self-signed TLS docs now state the default plainly without
deployment-specific caveats, the README loses the MVP demo sequence,
and the agent installer's Connection page gets a Skip TLS certificate
verification checkbox — unchecked by default, prefilled from the
registry on upgrades, same SKIPTLSVERIFY property silently.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 17:32:40 -04:00
gsadmin b2aa8a1a13 Agents follow self-signed servers: skip-verify via registry/GPO
CI / build-test (push) Successful in 15m39s
CI / images (push) Successful in 3m27s
CI / build-test (pull_request) Successful in 3m54s
CI / images (pull_request) Has been skipped
New TlsSkipVerify agent setting (DWORD, GPO policy key beats local
registry, ADMX template included) accepts the server certificate
without validation on both the enrollment HTTP call and the NATS
websocket — for servers on the managed self-signed chain with no proxy
in front; the connection stays fully TLS-encrypted. Set it via
configure --skip-tls-verify, the agent MSI SKIPTLSVERIFY=1 property
(remember-pattern like the rest), GPO, or the registry directly.

The server detects direct self-signed serving (HTTPS + no forwarded
headers) and the UI one-liners plus all generated install scripts pick
the correct scheme and add the skip-verify bits automatically —
PS5-safe callback on Windows, curl -k on unix — and configure the
agent to match. Proxied deployments are untouched: agents validate the
edge certificate normally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 17:18:41 -04:00
gsadmin 33b8a8a0bf Self-Signed TLS is now opt-out, with a PEM mirror on Windows
TLS_SELF_SIGNED defaults on everywhere (0 / setup --tls 0 / unchecking
the pre-checked MSI box opts out); the compose stack alone keeps its
internal hop plain HTTP by default because the bundled nginx site
proxies http upstreams. On Windows the machine stores stay
authoritative, but every chain settle now also mirrors certs, keys and
fullchain.crt to <data>/tls (keys marked exportable for refresh) so a
local Caddy / Nginx UI / nginx can bind or trust the files and
renewals keep them current. Test hosts opt out to avoid chain
generation racing across parallel fixtures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 17:18:30 -04:00
gsadmin 28e4878cc9 Optional Self-Signed TLS: encrypted proxy-to-server hop
CI / build-test (push) Successful in 15m9s
CI / images (push) Successful in 2m15s
CI / build-test (pull_request) Successful in 3m17s
CI / images (pull_request) Has been skipped
TLS_SELF_SIGNED=1 (env/appsettings), setup --tls 1, or the new MSI
checkbox switch the listener to HTTPS with a managed ECDSA chain —
root > intermediate > leaf, issued on first boot, auto-renewed ahead
of expiry and hot-swapped via Kestrel's certificate selector without
a restart. Windows persists the chain in the machine stores (Trusted
Roots / Intermediate CAs / Personal, so local browsers trust it);
Linux/macOS/containers use PEM files under <data>/tls with a
fullchain.crt for pinning. Reverse proxies either skip verification
(the hop stays encrypted — the roots just aren't distributed) or
import root+intermediate, re-importing when the chain rotates.

The MSI finish link follows the checkbox to https; short port flag
aliases keep the setup command inside the 255-char CA column, and the
quoted empty ENABLETLS keeps unchecked installs on plain HTTP.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 16:50:55 -04:00
gsadmin 03bce4de65 CI: run only when buildable paths change
CI / build-test (push) Successful in 20m52s
CI / images (push) Successful in 1m58s
CI / build-test (pull_request) Successful in 3m33s
CI / images (pull_request) Has been skipped
Docs-only commits were queueing full build/test runs. Both workflows
now filter on src/tests/scripts/assets, the workflow files and the
root build manifests, so README/docs pushes skip the runner queue.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 16:26:47 -04:00
gsadmin c840088a4c README: Networking and TLS section
States plainly that in-service SSL termination is out of scope and
points at edge terminators (Caddy, nginx/Nginx UI, HAProxy, Zoraxy)
that renew certificates and provide layer-7 visibility, including the
Windows-friendly options for the standalone server.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 16:26:47 -04:00
gsadmin 0c6abc65b0 Server MSI finish page offers to open the console
CI / build-test (push) Successful in 15m11s
CI / build-test (pull_request) Successful in 3m22s
CI / images (pull_request) Has been skipped
CI / images (push) Successful in 5m24s
Checked-by-default exit checkbox launches the UI via WixShellExec; the
URL resolves at Finish time so wildcard binds (0.0.0.0, ::) open
http://localhost:<port> while a concrete bind address opens directly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 16:17:34 -04:00
gsadmin 228c1791e5 Server MSI wizard gains a Network settings page
CI / build-test (push) Successful in 15m2s
CI / images (push) Successful in 2m13s
CI / build-test (pull_request) Successful in 3m23s
CI / images (pull_request) Has been skipped
Bind address, HTTP port and the three loopback-only NATS ports join the
wizard with their defaults and an inline explanation for each — bind
0.0.0.0 vs 127.0.0.1-for-a-local-proxy, what the HTTP port serves, and
why the NATS ports never need exposing — so a next-next-next install
works and informed changes are one field away. The values flow through
the same public properties silent installs use and into the binary''s
`setup` flags. Service naming stays out of the MSI deliberately: it
installs exactly one instance; multi-instance boxes use the ZIP with
distinct ports and service names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 16:04:21 -04:00
gsadmin 872a09724e Multi-instance standalone servers: port, bind and service-name control
CI / build-test (push) Successful in 15m19s
CI / images (push) Successful in 2m11s
CI / build-test (pull_request) Successful in 3m54s
CI / images (pull_request) Has been skipped
`setup` gains --http-port (default 9080), --bind (default 0.0.0.0, IPv6
literals bracketed automatically), and --nats-port/--nats-ws-port/
--nats-monitor-port for the loopback-only sidecar listeners — all
flowing into the generated nats.conf and appsettings.json, with the
sidecar health poll reading NATS_MONITOR_URL instead of a hardcoded
8222. `service install|uninstall --name <n>` registers instances side
by side (Windows service or systemd unit). One directory per instance
owns its config, database, keys, NATS state and agent packages, so
instances never share anything. Re-running setup over existing config
now says so instead of silently keeping old ports.

Verified live: setup with custom ports produced matching nats.conf and
appsettings values, and --bind 127.0.0.1 landed in Urls.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 15:56:17 -04:00
gsadmin 2bd87f8924 Standalone servers surface the proxy trust and public URL knobs
CI / build-test (push) Successful in 15m19s
CI / images (push) Successful in 2m2s
CI / build-test (pull_request) Successful in 3m19s
CI / images (pull_request) Has been skipped
The Windows and Linux binaries are the same backend, so they already
honor the private-network trust defaults; setup now pre-writes the
optional keys — PUBLIC_SERVER_URL, TRUST_PROXY, TRUSTED_NETWORKS,
TRUSTED_HOSTS — as empty placeholders in the generated appsettings.json
(empty means unset everywhere), and QUICKSTART/README explain the
configuration model: flat keys in appsettings.json next to the binary
or the same names as environment variables, env winning.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 15:44:00 -04:00
gsadmin 0e014b7e1d Trust reverse proxies from private networks by default
CI / build-test (push) Successful in 15m30s
CI / images (push) Successful in 2m13s
CI / build-test (pull_request) Successful in 3m29s
CI / images (pull_request) Has been skipped
Forwarded headers now work with zero configuration behind any cloud or
LAN reverse proxy: the default trust set is loopback (127/8, ::1),
RFC1918 (10/8, 172.16/12, 192.168/16) and CGNAT (100.64/10). Explicit
TRUSTED_PROXIES / TRUSTED_NETWORKS replaces those defaults with an
allow-list for networks where peers are untrusted, and TRUST_PROXY=0
opts out entirely — the old fail-at-startup requirement is gone, and
the applied trust set is logged at boot. Five unit tests pin the
semantics (defaults present, explicit replacement, opt-out, options
wiring); README and .env.example describe the new model.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 15:41:39 -04:00
gsadmin 80e62ef4c7 The install command re-issues live as token options change
CI / build-test (push) Successful in 15m14s
CI / images (push) Successful in 2m10s
CI / build-test (pull_request) Successful in 3m19s
CI / images (pull_request) Has been skipped
After the first Generate, switching single/multi, editing the use
count or toggling Unlimited re-issues the token automatically
(debounced 600ms) — the command dims with an updating hint and the
superseded token is revoked so toggling never leaves live tokens
behind. A pending debounce is cancelled on dismissal to avoid minting
an orphan after the modal closes. Platform switching still reuses the
current token, since only the command text differs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 14:06:24 -04:00
gsadmin 6b76a13282 Token use limits: any count up to 9999, or unlimited
CI / build-test (push) Successful in 23m19s
CI / images (push) Failing after 3m1s
CI / build-test (pull_request) Successful in 3m56s
CI / images (pull_request) Has been skipped
The Add device modal keeps the single/multi flow: multi now takes a
use count (default 1, up to 9999) or an Unlimited checkbox instead of
the hardcoded 100. MaxUses 0 is the unlimited sentinel — enrollment
only counts uses against a positive limit, expiry and revocation still
gate the token, and creation validates the 0-9999 range. The Settings
token form and list follow (0 = unlimited input hint, infinity in the
uses column, Consumed/Revoke logic aware of unlimited).

Changing the count or unlimited flag after generating invalidates the
shown command — limits are properties of the token, so a new one is
issued on the next confirm. Five new endpoint tests cover the sentinel
round-trip, the bounds and the rejections (the test client now sends
the double-submit CSRF header for cookie-authenticated POSTs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 14:02:59 -04:00
gsadmin 083e207cc4 Add device from the Devices page: one-liner installs for every platform
CI / build-test (push) Successful in 15m53s
CI / images (push) Successful in 2m20s
CI / build-test (pull_request) Successful in 3m26s
CI / images (pull_request) Has been skipped
Devices gains an Add device modal (visible with settings.manage): a
horizontal Windows / Linux / macOS selector, a single-use or multi-use
token choice (24-hour expiry), and Generate command — nothing is
created until confirmed; Esc, click-outside or Cancel dismiss without
side effects, and each open starts fresh. The generated one-liner is
copy-ready per platform.

The install endpoint grew unix variants: ?type=linux|osx returns a bash
script that detects the architecture, downloads the matching agent zip
from the same origin, unpacks to /opt/executer/agent, configures
enrollment through the agent''s new cross-platform `configure --url
--token` verb (registry on Windows, agent.json elsewhere) and registers
the systemd unit / launchd daemon. The agent package service serves the
four unix zips alongside Agent.msi/Agent.zip, and both the CI image
bake and the standalone server bundles stage them.

Covered by seven endpoint tests (PowerShell variants, bash variants
with arch detection, token refusal); modal verified live — it issued a
real token and built the Linux one-liner in the shot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 12:48:25 -04:00