docs(installer): record Phase 0.2 — the sidecar's CLI and settled data paths
Phase 0.2 landed in link#24: the sidecar gained a four-flag CLI, --print-config, and config-anchored data paths. Three sections of the installer plan asserted facts that change as a result, so they are corrected rather than appended to. - Status table: 0.1 merged (servuo-plugins#7/#8, overlay v0.1.1 released), 0.2 in review, repo bootstrap merged. 0.3 (bundle CI) is next and now unblocked — both components it composes exist. - Phase 0 item 2 gains an "As built" subsection matching item 1's: why four hand-rolled flags rather than a parsing crate, why --print-config provisions instead of only reporting, why config_created/token_generated exist, and why no platform data directories are compiled into the binary. - §2.3 (working-directory trap): half-closed in the sidecar — a relative [store].path now anchors to the config file's directory — while the service definitions still pin both env vars, and why that is not redundant. - §2.4 (token handoff): the installer reads the handoff block out of one --print-config call and never parses the log, which is not a contract. - §5 Phase 2 / Phase 4, §6: the ordering that follows (print-config before service registration), which doctor rows the CLI answers, that only the host is substituted into the printed URLs because web.bind is often 0.0.0.0, and that the printed token must not reach a log or support bundle. - link/INTEGRATION.md §1: how to read the token back, replacing "the sidecar logs it" with the supported command and its output. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,31 @@ Every route **except `GET /health`** requires the shared token from `sidecar.tom
|
||||
| REST | `X-Api-Key: <token>` |
|
||||
| WebSocket | `?token=<token>` in the connect URL (browsers can't set headers on a WS handshake) |
|
||||
|
||||
Missing or wrong token → **401** `{"error":"missing or invalid auth token"}`. The token is compared in constant time. It is generated automatically on first run (the sidecar logs it); rotate by editing `sidecar.toml` and restarting.
|
||||
Missing or wrong token → **401** `{"error":"missing or invalid auth token"}`. The token is compared in constant time. It is generated automatically on first run; rotate by editing `sidecar.toml` and restarting.
|
||||
|
||||
To read it back afterwards, ask the sidecar rather than hunting through the startup log or the TOML:
|
||||
|
||||
```console
|
||||
$ uo-link-sidecar --print-config --config /etc/runicgateway/sidecar.toml
|
||||
{
|
||||
"component": "uo-link-sidecar",
|
||||
"config_created": false,
|
||||
"config_path": "/etc/runicgateway/sidecar.toml",
|
||||
"protocol": 3,
|
||||
"shard": { "bind": "127.0.0.1:7788" },
|
||||
"store": { "path": "/var/lib/runicgateway/uo-link.db" },
|
||||
"token_generated": false,
|
||||
"version": "0.1.0",
|
||||
"web": {
|
||||
"auth_required": true,
|
||||
"auth_token": "c0f04ace…",
|
||||
"bind": "127.0.0.1:8080",
|
||||
"ws_path": "/ws"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
That is the same set of values Admin → Shard asks for — base URL and WS URL are `web.bind` (substituting a reachable host if it is `0.0.0.0`) plus `web.ws_path`. The output **contains the token in clear text**, so treat it as a secret: it belongs in a terminal, not in a log or a CI artifact. `--print-config` also performs first-run setup, writing the config file and generating a token if there is none, and reports whether it did via `config_created` / `token_generated`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user