# Gungnir — the operating surface **Gungnir is the console an owner drives a node from.** It is the half of the pair that *acts*: the explorer's read model is called Hlidskjalf, Odin's high seat, and this is the spear. The oath half of the name is not decoration — every act on this surface is signed by a named principal, decided by **Themis**, and written into **Argus** whether it is allowed, denied or fails. It runs **inside a node**, on its own port, and it is not a route on the operator endpoint: `src/ops/astrolabe.ts` answers GET and HEAD and refuses every other method before routing, by design, and that is not weakened here. An operating surface needs a POST, so it gets its own socket. **Every claim on this page is labelled.** `MEASURED` means it was observed by running the thing named, on 2026-09-07, against a live node joined to a running Polaris network. `REASONED` means it is an argument from code that was read. **Read [RUNNING.md](RUNNING.md) first** if you have not started a node yet. This page assumes one is running. --- ## 1. Starting it Gungnir is on by default whenever `strblk node` runs. These flags decide what it is: | Flag | Default | What it decides | |---|---|---| | `--dashboard-port P` | `8082` | the port it listens on | | `--dashboard-host H` | `127.0.0.1` | what it binds. Loopback unless you say otherwise, and a non-loopback host is **refused** without one of the two below | | `--dashboard-tls-cert FILE` | none | terminate TLS in this process, with | | `--dashboard-tls-key FILE` | none | this private key | | `--dashboard-behind-tls-proxy` | — | assert that a TLS terminator stands in front of this port | | `--dashboard-name NAME[,NAME]` | none | names it is opened under, beside `127.0.0.1` and `localhost`. Any other `Host` is refused; see §3.3 | | `--dashboard-key FILE` | none | the identity it acts as. Without it, it reads and writes nothing | | `--no-dashboard` | — | do not open the surface at all | **`--dashboard-key` and `--dashboard-tls-key` are two different secrets and that is why they are two flags.** The first is the ed25519 account key this surface **acts as**; the second is the private key that **encrypts the socket**. One flag for both would have been the shorter list and the wrong one: an operator who pointed it at their operator key would have published that key to every client that connected. `MEASURED`, from `strblk --help` and from `planDashboard`. There is no `--dashboard-roles`: the roster is `--roles`, shared with the operator endpoint, because there is exactly one role table per node. A full start, joined to a running network: ```bash SOURCELESS_KEY_PASSPHRASE="a-passphrase-long-enough" \ node dist/src/cli/strblk.js node \ --dir .local/gnode --dev \ --peers 127.0.0.1:60003,127.0.0.1:60006,127.0.0.1:60010 \ --block-interval 0 \ --port 7500 --ops-port 8118 \ --dashboard-port 8120 --dashboard-host 127.0.0.1 \ --dashboard-key .local/gungnir-key.json \ --roles .local/roles.json ``` ```text operator endpoint http://127.0.0.1:8118 — read-only, GET and HEAD only operations roster 1 address(es) may authenticate audit trail durable, signed, 0 entr(ies) dashboard http://127.0.0.1:8120 — Gungnir, the operating surface dashboard acts as zk13str_aebead169184041ffc65b8c78d6468411be5bf2f_d6d4 as operator dashboard session e5dc221b2d29… (carried in every form this surface serves) ``` `MEASURED`. ### 1.1 The key file ```json { "role": "operator", "privateKeyHex": "" } ``` Two required fields. `role` is one of **`client`**, **`operator`**, **`auditor`**, **`governance`**. `privateKeyHex` is 64 hex characters — an ed25519 account key, from `strblk keygen`. Two optional fields, and both are *checked* rather than believed: `publicKeyHex` must derive from the private key, and `address` must derive from the public key. `REASONED`, from `loadGungnirSigner`: a file whose stated address does not derive from its private key is not a file with a typo in one field, it is a file that would have this dashboard signing as one address while telling you it was another, so it is refused rather than corrected. **The role in this file is a claim, not a grant.** `MEASURED`: the role that decides anything is the one the node's roster assigns to that address, and Themis never takes a role from the caller. Writing `"role": "governance"` in your own key file and putting nothing in the roles file gets you a dashboard that draws every governance control as available and has every one of them refused server-side. Section 3.2 shows exactly that, live. The private key is loaded once, from a file you already protect, and never appears on any interface: whoever loads it hands downstream code two closures, so nothing below can copy it, log it, or put it in an audit entry. `REASONED`, from the `GungnirSigner` interface. ### 1.2 The roles file ```json [ { "address": "zk13str_aebead169184041ffc65b8c78d6468411be5bf2f_d6d4", "role": "operator" } ] ``` `--roles` is the roster of who may act on this node. Without it the roster is **empty** and every privileged request is refused and recorded as denied. `MEASURED` — the node says so at start: ```text note no --roles file was supplied, so the roster is EMPTY and every privileged request to the operations surface is refused and recorded as denied. The surface authenticates against the roster and never against the role a caller declares. ``` That default is deliberate. `REASONED`: a surface with no authentication accepts whatever role a caller declares about itself, and the audit trail then names an address nobody checked. ### 1.3 The four roles, and what each may do `MEASURED`, from `ROLE_ACTIONS` and confirmed against the `permitted` list a live board publishes: | Role | May | |---|---| | **client** | `status:read`, `account:read-own`, `tx:submit`, `ghost:submit`, `ghost:read`, `contract:read`, `contract:call`, `domain:allocate`, `domain:register`, `domain:burn`, `wnft:submit`, `wnft:transfer`, `wrap:submit` | | **operator** | `status:read`, `account:read-own`, `account:read-any`, `tx:submit`, `block:produce`, `ghost:submit`, `ghost:read`, `ghost:reconcile`, `contract:deploy`, `contract:call`, `contract:read`, `domain:allocate`, `domain:register`, `domain:burn`, `wnft:submit`, `wnft:transfer`, `wrap:submit`, `chain:verify` | | **auditor** | `status:read`, `account:read-any`, `contract:read`, `audit:read`, `ghost:read`, `chain:verify` | | **governance** | `status:read`, `account:read-any`, `contract:read`, `audit:read`, `ghost:read`, `ghost:reconcile`, `validator:register`, `validator:deactivate`, `token:register`, `params:update`, `endpoints:update`, `governance:propose`, `governance:vote`, `governance:execute`, `chain:verify` | Three things to notice, because each one surprises somebody: - **No role holds everything.** An operator cannot read the audit trail; a governance role cannot submit a transfer or seal a block. `REASONED`: the split is the point — an administrator who can both act and edit the record of acting is not audited. - **`client` acts on its own account and no other.** `account:read-own` is enforced by an ownership check, not by convention, and a violation is refused as `OwnershipError`. - **A role decides who may SUBMIT, not who authorised.** Every record on this surface except a contract call is signed by the holder of the account, over the record's own fields plus the chain's genesis hash. The role gates the front door. ### 1.4 Binding it anywhere but loopback ```bash node dist/src/cli/strblk.js node … --dashboard-host 0.0.0.0 --dashboard-port 8142 … ``` ```text dashboard http://0.0.0.0:8142 — Gungnir, the operating surface dashboard acts as zk13str_aebead169184041ffc65b8c78d6468411be5bf2f_d6d4 as operator note the operating surface is bound to 0.0.0.0, not loopback. Anyone who can reach that address and obtain a session token acts as the key above. ``` `MEASURED`. That sentence is the whole security model in one line: **anyone who can reach this port and get a session token acts as the address in the key file.** The process holds a signing key, so a new listening socket on it is a new way to be that operator. This node was stopped immediately after the measurement above was taken. ### 1.5 The session token is not a credential, and since 2026-09-11 there is one `MEASURED`, by an independent red team and then by reproducing it. A node bound `127.0.0.1` with no flags is correct — `gungnirExposureRefusal` returns null and should. Put eleven lines of reverse proxy in front of it and: ```console $ curl -s http://console.example/ | grep -o 'value="[0-9a-f]\{64\}"' value="82ee9e0212d2…" # an unauthenticated GET hands out the token $ curl -X POST -d "token=82ee9e02…&action=block.produce" http://console.example/action # 303. Argus: block:produce / allowed / actorAuthenticated: true / the dashboard key ``` No Origin, no Referer, a stranger's `Host`, and it seals as the operator. **The token is not weak and that is not the finding.** It is a perfectly good CSRF token: a cross-origin page cannot read the response it would have to scrape it from, which is exactly the attack it was built for. The finding is that it was doing a **credential's** job, and against anything that can open a socket it does not do that one at all. On a loopback bind with nothing in front, this is fine and always was — reaching the socket means being on the host. §1.2 below is the rule, and the rule was enforced by nothing. #### The credential ```bash export SOURCELESS_DASHBOARD_SECRET='' node dist/src/cli/strblk.js node … --dashboard-port 8142 ``` ```text dashboard auth a shared secret is required on every route but /health (Authorization: Bearer …, or ?secret=… for a browser) ``` Send it as `Authorization: Bearer `, or as `?secret=` for a browser that cannot set a header. The header is checked first, deliberately: a query parameter lands in proxy access logs, browser history and any `Referer` the page emits. The query form exists anyway because this surface is a *page*, and a console nobody can open in a browser is a console nobody uses. It gates **every route but `/health`** — the page, `/api/board`, `/api/actions`, `/api/reach` and `/action` alike. Gating only the write would stop the writes and hand a stranger the whole operating board as JSON. `/health` stays open because a supervisor hits it every second, holds no secret, and it asks the node nothing. ##### Opening it in a browser: the secret once, then a cookie A page is not one request. `?secret=…` authenticates the request that carries it, and the browser's next three requests carry nothing — so until 2026-09-21 a console started with a secret came up **unstyled, unscripted and unable to perform a single action**. MEASURED against a node started with `--dashboard-secret`: ```text GET /?secret=… 200 the page renders GET /gungnir.css 401 in the page it just served GET /gungnir.js 401