interplane.Get Omega
Read in your language

aien-sovereign-core-mv

AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.

Brought by drakestapleton

branch main Branches Tags History

aien-sovereign-core-mv / docs / security / cockpit-access.md

46 lines · 3516 bytes Raw Blame History Rendered
1# Cockpit operator access
2
3## Opening the cockpit on the Spark (plain steps)
4
5The cockpit now asks for a password-like access token before it shows anything or lets anyone press a button. Only the Spark itself can reach it.
6
71. Open a terminal on the Spark and type:
8
9 ```
10 atlas-vault get AIEN_COCKPIT_TOKEN
11 ```
12
13 It prints one long line of letters and numbers. Select it and copy it. That line is the cockpit key; do not paste it into chats, issues or screenshots.
142. Open a web browser on the Spark and go to `http://127.0.0.1:18095` (or `http://localhost:18095`).
153. The browser shows a page titled "Sign in to AIEN". Paste the key into the box and press "Sign in".
164. The normal cockpit appears. The sign-in lasts one hour, and restarting the cockpit service also signs you out. After that, the browser returns to the sign-in page; repeat steps 1 to 3.
17
18From the MacBook, open a tunnel first (Terminal on the Mac: `ssh -L 18095:127.0.0.1:18095 <spark>`, leave it open), then follow steps 2 to 4 in a Mac browser at `http://127.0.0.1:18095`. The LAN address and the Tailscale address no longer work on purpose.
19
20## Token provisioning
21
22Both keys live in atlas-vault, the machine's TPM-sealed key store (encrypted by the Spark's security chip, kept under `~/.config/atlas/vault` with owner-only permissions). They never sit in a repository or a plain text file, and the services never print them to logs.
23
24| Key | Who reads it |
25| --- | --- |
26| `AIEN_COCKPIT_TOKEN` | spark-cockpit-rs at start; Drake pastes it at `/login` |
27| `AIEN_MAIL_API_TOKEN` | spark-mail (checks it) and the cockpit (sends it when forwarding mail requests) |
28
29Create or rotate a key, then restart the service that reads it:
30
31```
32head -c 48 /dev/urandom | base64 | tr -d '/+=\n' | atlas-vault add AIEN_COCKPIT_TOKEN
33```
34
35Store `AIEN_COCKPIT_TOKEN` and `AIEN_MAIL_API_TOKEN` with `atlas-vault add <NAME>`, which reads the value from standard input. Use a random token of at least 32 ASCII characters. The cockpit and mail service resolve these through process memory or `atlas-vault get <NAME>`. Plaintext token files are not supported. Missing credentials fail closed. Restart the cockpit after rotating its token; existing sessions are cleared.
36
37## What is protected
38
39- Listener: `127.0.0.1:18095` by default. `AIEN_COCKPIT_ADDR` changes it explicitly.
40- Allowed browser origins: `http://127.0.0.1:18095` and `http://localhost:18095`. `AIEN_COCKPIT_ORIGINS` (comma separated, exact origins) replaces the list. Use HTTPS for any remote browser origin.
41- Every route except `/login` and `/auth/session` needs either `Authorization: Bearer <token>` or a signed-in browser session. Browser sessions are random, HttpOnly, SameSite=Strict cookies with a server-enforced one-hour lifetime; HTTPS origins also get Secure cookies.
42- Browser mutations (anything other than GET/HEAD) and terminal upgrades additionally need an allowed Origin. A request carrying a foreign Origin gets 403.
43- The terminal (`/ws/terminal`) keeps its own check on top: exact loopback Origin and a loopback peer address. Remote origins cannot open a shell.
44- Health reads stay open for local monitors: `GET /api/pulse` and `GET /api/status` answer without a token, but only when the request's Host is `127.0.0.1`, `localhost` or `[::1]` (blocks DNS-rebinding pages) and it carries no foreign Origin. aien-cli, spark-debugger and spark-supervisor only use these reads.
45
46The token authorizes the operator's administrative surface, not an untrusted agent principal.