feat(web): relay --auth-file with robot keys, viewer tokens, and the … - #3953
feat(web): relay --auth-file with robot keys, viewer tokens, and the …#3953paul-nechifor wants to merge 1 commit into
Conversation
|
| for key, value in self.config_overrides.items() | ||
| if _config_field_name(key) not in SECRET_CONFIG_FIELDS | ||
| } | ||
| self.original_argv = _without_secret_options(self.original_argv) |
There was a problem hiding this comment.
This removes configured --relay-key, --dimos-api-key, and --unitree-aes-128-key values from the stored restart command. dimos restart then launches only that sanitized command, so an authenticated relay or hardware/cloud operation starts without its required credentials and fails. Preserve credentials through a secure restart mechanism, or reject restart requests for runs that require them before merging.
Knowledge Base Used: Core runtime lifecycle
Artifacts
- Observed output from the final executed validation, including successful pre-restart authentication and failed authentication after the actual restart path.
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #3953 +/- ##
==========================================
- Coverage 78.53% 78.50% -0.03%
==========================================
Files 1457 1458 +1
Lines 137798 138012 +214
Branches 11842 11849 +7
==========================================
+ Hits 108217 108351 +134
- Misses 26283 26322 +39
- Partials 3298 3339 +41
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
c332da6 to
0af7149
Compare
0af7149 to
b8d9e06
Compare
b8d9e06 to
b473fe6
Compare
b473fe6 to
ad3ba7b
Compare
ad3ba7b to
6b9642a
Compare
6b9642a to
97a6a7a
Compare
97a6a7a to
b7f9915
Compare
b7f9915 to
dda5ffb
Compare
dda5ffb to
b33169b
Compare
b33169b to
296b454
Compare
…cockpit login
A relay that can be exposed: `--auth-file auth.json` maps robot ids to keys
and viewer names to tokens (static secrets, >= 16 chars, no secret twice,
constant-time compares, never logged). Robots and viewers present them in
the hello (`hello.token`, optional, <= 256 chars, no version bump); the
relay answers `auth_failed`, which is terminal on both clients. `/api/stats`
needs `Authorization: Bearer <viewer token>` and drops its CORS header once
auth is on. A non-loopback host binds with cert + key + auth together (or
`--unsafe-non-loopback` as before) and refuses `--serve-dir` there.
Bridge: `GlobalConfig.relay_key` (`RELAY_KEY`, mirrored on
`RelayBridgeConfig`, external relay only) rides `RelayClient.hello(token=)`;
an over-long token is refused before pydantic can quote it. `dimos
show-config` masks `relay_key` and `dimos_api_key`. `RelayProcess(auth_file=)`
joins the relay's read scope.
SDK: `connect({token})`, `TransportPhase.failed.code`. Cockpit: the token
form on `auth_failed` (stored in localStorage, page reload), "log out" in
the status bar.
Tests: deno auth/session/server (hello cases, stats bearer, mode gate),
fixtures with a token hello, pytest mirror + e2e + CLI masking, vitest
SDK/cockpit, and a Playwright login flow (added to the CI list).
296b454 to
77f387a
Compare
--auth-file. Robots connect with keys tied to their IDs, and viewers connect with access tokens.