install-newt: optional internet access via a Pangolin tunnel, with OIDC sign-in on the dashboard

A plain install is unchanged: LAN-only, dashboard behind the API key. `llmhost install-newt`
is the upgrade path. It installs a pinned, sha256-checked newt as a third user service and
switches the dashboard to an OIDC authorization-code + PKCE sign-in limited to allowed groups
or users. The API still takes the key. Secrets live in 0600 files, never in config.json, a
service file or argv. `llmhost remove-newt` undoes it; setup/update keep it; `logs --newt`
shows the tunnel (and `logs -f` now follows the service it was asked for).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
neil 2026-11-05 21:44:09 -08:00
parent d07a92e5b5
commit e814a2359d
11 changed files with 1155 additions and 26 deletions

View file

@ -40,7 +40,7 @@ def guard(paths, root):
paths.BIN_DIR = Path(root) / ".local/bin"
paths.SHIM = paths.BIN_DIR / "llmhost"
paths.LOG_DIR = Path(root) / "logs"
for name in ("DATA", "CONFIG_DIR", "CONFIG_FILE", "KEY_FILE", "BIN_DIR", "SHIM", "LOG_DIR"):
for name in ("DATA", "CONFIG_DIR", "CONFIG_FILE", "KEY_FILE", "OIDC_SECRET_FILE", "NEWT_SECRET_FILE", "NEWT_DIR", "BIN_DIR", "SHIM", "LOG_DIR"):
value = str(getattr(paths, name))
if not value.startswith(root):
sys.exit(f"ABORT: paths.{name} = {value} is outside the sandbox {root}")