Repository navigation
fix: authenticate the dsh web probes with the launch token - #5
Conversation
dsh-web-app >= 0.1.5-rc.x (dsh 0.1.7-rc.1) authenticates every web UI request: each process mints a random launch token and a tokenless GET / returns 401. The plugin-dsh probes hard-coded tokenless curl requests to http://127.0.0.1:3080/, so on the current dsh they get the auth fence's 401 — the two failing checks in pod-dsh's check-dsh-pod bed. - verb.go verbWebRunning: read the token the dsh candy's entrypoint persists to $DSH_HOME/web-token and probe ?token=<token>; a missing token file is a hard error, never a silent tokenless probe. - control.go DshStatusCmd.Run: same authenticated probe after dsh --version. - charly.yml: state the token semantics in the dsh-cli-skill prose.
Review — BLOCKHead SHA: Change class: code/config — plugin Go runtime ( Comment thread: 0 comments — nothing to adjudicate. Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…ecks dsh-web-app 0.1.7-rc.1 authenticates every web UI request: each process mints a random launch token and a tokenless GET / returns 401. Bump the pinned @deepseek-ai/dsh to 0.1.7-rc.1 (which also fixes the 0.1.0-rc.6 Cordis-HMR boot crash), capture the launch token from dsh web's readiness line to $DSH_HOME/web-token in the entrypoint, and authenticate every in-box web probe with ?token=<token>. - package.json: @deepseek-ai/dsh 0.1.0-rc.6 -> 0.1.7-rc.1. - dsh-entrypoint: run dsh web to a log, parse the token= readiness line, persist it to $DSH_HOME/web-token (on the dsh volume), then exec socat. - charly.yml: token-aware in-box checks (dsh-web-token / dsh-web-inbox / dsh-web-published) and a 401 auth-fence check on the published port. The two plugin-dsh-owned probes (dsh-verb-web-running, dsh-cmd-status) still fail until opencharly/plugin-dsh#5 lands.
Address the validator's R3 (the token-read + authenticated curl was copy-pasted at both call sites) and coverage blocks: - webprobe.go: one shared dshWebTokenProbe(port) fragment used by both verbWebRunning and DshStatusCmd.Run. - webprobe_test.go: locks in the token-authenticated shape (reads the token file, authenticates with ?token=$T, errors on a missing token, targets the requested port) — fails on a regression to the tokenless probe.
Review — PASSHead SHA: Security screen: PASS — no secrets/egress (probe targets loopback only), no guardrail/rulebook/branch-protection weakening, no supply-chain or schema-source edits; placement CORRECT (capability stays in the candy). Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
opencharly/plugin-dsh#5 merged (squash 819f6f9); dsh-verb-web-running and dsh-cmd-status pass once the plugin is compiled into the bed's charly build. Replace the stale 'until it lands' comment.
…are dsh) (#4) * feat: relocate check-dsh-pod bed from opencharly/charly Move the dsh-app box + check-dsh-pod R10 bed into the candy's owning repo. A bed in opencharly/charly cannot exercise this candy as in-development code: the check-bed runner's dev-tree override (SelfSuperprojectOverridePair) points the bed project's OWN superproject's @github refs at the local tree, and a candy owned by another repo is never covered by it. Locally here the box composes the local `dsh` candy with no @github pin, so a bed run always tests this checkout. The box needs an npm builder. The canonical fedora builder chain is FLAT-IMPORTED (the three box files fedora / fedora-nonfree / fedora-builder) rather than the distro-fedora NAMESPACE: the namespace drags in that repo's charly-marketplace candy, which references the remote opencharly/pod-dsh whose candy is ALSO named `dsh`, shadowing this project's local `dsh`. The flat import also gets the RPM Fusion chain (fedora-nonfree) that build-toolchain needs for its codec-devel packages (ffmpeg-devel / x264-devel) — a locally declared minimal builder without rpmfusion failed the image build (`No match for argument: ffmpeg-devel`). The receiving config is migrated to the current schema head, given a defaults.build, and the candy CI pin bumped (v2026.238.1242 -> v2026.256.1316). A standard .gitignore keeps the bed's .check/ scratch and .build/ artifacts out of the tree. R10: `charly check run check-dsh-pod` PASS (steps=14, 566s) — image-build, check-image, deploy, check-live, the dsh: verbs, fresh update, check-live-rebuild all green, teardown clean. Verdict: repo override active (CHARLY_REPO_OVERRIDE=github.com/opencharly/opencharly=...) — about the LOCAL tree. `charly box validate`: OK — checked 11 candies, 4 boxes, 1 deploy, 7 distros, 7 builders; 0 warnings, 0 errors. Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated) * docs: re-freeze the PR body * docs: reconcile the schema stamp with the CI pin in the PR body * fix(dsh): capture the web launch token and authenticate the in-box checks dsh-web-app 0.1.7-rc.1 authenticates every web UI request: each process mints a random launch token and a tokenless GET / returns 401. Bump the pinned @deepseek-ai/dsh to 0.1.7-rc.1 (which also fixes the 0.1.0-rc.6 Cordis-HMR boot crash), capture the launch token from dsh web's readiness line to $DSH_HOME/web-token in the entrypoint, and authenticate every in-box web probe with ?token=<token>. - package.json: @deepseek-ai/dsh 0.1.0-rc.6 -> 0.1.7-rc.1. - dsh-entrypoint: run dsh web to a log, parse the token= readiness line, persist it to $DSH_HOME/web-token (on the dsh volume), then exec socat. - charly.yml: token-aware in-box checks (dsh-web-token / dsh-web-inbox / dsh-web-published) and a 401 auth-fence check on the published port. The two plugin-dsh-owned probes (dsh-verb-web-running, dsh-cmd-status) still fail until opencharly/plugin-dsh#5 lands. * docs: the plugin-dsh token fix has landed; correct the bed comment opencharly/plugin-dsh#5 merged (squash 819f6f9); dsh-verb-web-running and dsh-cmd-status pass once the plugin is compiled into the bed's charly build. Replace the stale 'until it lands' comment. * docs: re-freeze the PR body against the final head Body-only fix (R8 tag-vs-candy-version reconciliation); the empty commit gives the validator a fresh head whose body is already final. --------- Co-authored-by: Andreas Trawoeger <[email protected]>
Bump github.com/opencharly/plugin-dsh/candy/plugin-dsh v0.2026237.1419 -> v0.2026266.2321 (the merged tag of opencharly/plugin-dsh#5). verbWebRunning + DshStatusCmd.Run now read $DSH_HOME/web-token and authenticate with ?token=<token>. go mod tidy updates go.sum. The charly binary builds green and its module buildinfo carries the new pin; the compiled-in probe string (web-token / ?token=$T) is present in the binary. R10 (live, charly rebuilt against the bumped pin): - check-dsh-pod: PASS (steps=14); dsh-verb-web-running and dsh-cmd-status PASS pre- and post-rebuild. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) Co-authored-by: Andreas Trawoeger <[email protected]>
Summary
Authenticate the two dsh web-UI probes with the launch token that
dsh web(>= dsh-web-app 0.1.5-rc.x, here
@deepseek-ai/dsh 0.1.7-rc.1) now requires.A tokenless
GET /returns 401, so both hard-coded tokenlesscurlprobesgot the auth fence's 401 — the two failing checks in
opencharly/pod-dsh'scheck-dsh-podR10 bed. After this change the bed passes end-to-end (see R10).Per-file change (
git diff --numstat origin/main...HEAD, head5649577):candy/plugin-dsh/webprobe.godshWebTokenProbe(port)fragment — reads the launch token from$DSH_HOME/web-token, hard-errors on a missing/empty token, and curlshttp://127.0.0.1:<port>/?token=$Tin-box. Used by both call sites (R3).candy/plugin-dsh/verb.goverbWebRunningusesdshWebTokenProbe("3080").candy/plugin-dsh/control.goDshStatusCmd.Runusesdsh --version && { dshWebTokenProbe("3080"); } && echo 'web UI: HTTP 200 on 127.0.0.1:3080'.candy/plugin-dsh/webprobe_test.gocandy/plugin-dsh/charly.ymldsh-cli-skillprose: theweb-runningandstatusbullets + the candy description state the token semantics.Why:
dsh-web-app 0.1.5-rc.xmints a random per-process launch token and printsit in its
dsh web: http://127.0.0.1:3080/?token=...readiness line; the dshcandy's entrypoint captures it to
$DSH_HOME/web-token. There is no flag orconfig that disables authentication. The probes must authenticate with it.
curl -faccepts the token exchange's 303 (no-Lneeded).Relates to:
opencharly/pod-dsh#3(the relocatedcheck-dsh-podbed thatexercises these two probes).
How tested
All commands run in
candy/plugin-dshwithGOWORK=off, on the final tree(head
5649577).R10 — the disposable
check-dsh-podbed passes with this plugin compiled incheck-dsh-podpod (disposable: true,lifecycle: dev) inopencharly/pod-dsh, driven by the pod's own working tree (CHARLY_REPO_OVERRIDE="github.com/opencharly/pod-dsh=/tmp/opencode/rem-dsh-6,...").charly update(stepupdatePASS), then re-ran the live checks (check-live-rebuildPASS) — i.e. proven again after a fresh rebuild, not just at first boot./tmp/opencode/charly-now/charly) with ago.workreplace github.com/opencharly/plugin-dsh/candy/plugin-dsh => <this branch's candy/plugin-dsh>— so the compiled-incommand:dsh+verb:dshproviders ARE this branch. Verified in the binary:strings … | grep -c "no dsh web token"= 1 andgrep -c "curl -fsS -o /dev/null http://127.0.0.1:3080/"= 0 (the tokenless probe is gone).The two previously-failing checks now pass, alongside every other check-live
step (
36 steps: 35 passed, 0 failed, 1 skipped):Coverage that fails without the change
webprobe_test.goasserts the probe reads"${DSH_HOME:-$HOME/.dsh}/web-token",authenticates with
http://127.0.0.1:<port>/?token=$T, errors withno dsh web tokenon a missing token, and contains NO tokenless127.0.0.1:3080/"request — so a regression to the tokenless probe failsgo test. Thecandyworkflow (buildjob, this PR) also passed:charly box validategreen at the CI pinv2026.238.1242.Rulebook compliance
dsh-web-app 0.1.5-rc.x; the probes were tokenless by construction.
behavior; the schema-stamp alignment to the CI pin is owned by the repo's
schema-migration batch (root manifest already at
2026.232.0520, accepted bythe pinned CI binary —
buildcheck PASS).dshWebTokenProbe(port)fragment(
webprobe.go), not a second copy — the earlier verbatim duplication at bothcall sites is removed.
is a hard, explicit error.
behind a fallback.
fix/token-aware-web-probe, no force-push.git-workflow,plugin); collision preflight: the onlyopen PR (feat(plugin-dsh): adopt spec 261 (schema-head pin bump) #4,
feat/schema-261) touchesgo.mod/go.sumonly — no overlap.check-dsh-podbed PASSES end-to-end (14 steps) with this plugincompiled in, including the fresh-rebuild
check-live-rebuildpass.Change classification
charly-or-sdk Go(plugin provider runtime + skill prose).gofmt -l ./go build ./.../go vet ./.../go test ./...green; the disposablecheck-dsh-podbed run to a freshrebuild with this plugin compiled in — PASS.
fully tested and validated— the full R10 gate passedon the final tree, and the changed runtime paths (
dsh-verb-web-running,dsh-cmd-status) executed live.Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)