key.store: authenticate resident smoke probes with mapped bearers #349
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/resident-smoke-auth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The active forge generation at
855cc830passes the synthetic-only native attachment transfer, but deployment unit 21307 ended exit 4 because redmine-dispatcher-smoke.service still uses disabled loopback identity hints (HTTP 401). Preserve that failed record.Use the existing canonical local identity-to-secret-file mapping in the smoke unit. A shared offline helper derives the existing identity-bound bearer and writes a mode-0600 curl config in a private temporary directory; protected generic and per-identity calls use it. No bearer in argv/stdout, no new credential grants or auth-policy changes. Mapped credentials require literal HTTP 127.0.0.1 with an explicit port. Reject missing mapping, header controls, userinfo/fragments, and existing/symlink output. Preserve unauthenticated-401/challenge tests and all original identity/service assertions.
KSE-0214 records the cause, safeguards, exact native attachment acceptance and remaining full-chain acceptance. Bazel 5cbab325-9a2b-4dd7-85dd-fc58956a375b passed three credential-boundary regressions; on parent
5b77664dinvocation 5bb13ab4-2249-41c8-b9a7-337605fbd784 reused identical passing inputs. Both shell syntax checks passed. Candidate read-only live probes passed generic smoke plus all thirteen resident identities, with private-content/communications and calendar write probes disabled. Nix evaluation confirmed the seventeen existing credential-file mappings without printing values. These checks do not replace the complete deployed smoke unit's terminal outcome.Signed exact head
cc71f5c278is stacked on context repair #347 (5b77664d); only eight smoke/KSE files differ. Retarget to main unchanged after #347 merges. Requires independent DevEx integration review, senior security review, COO final, exact-head CI, then protected FF. Full production smoke and both-host context activation remain required; no rollback/failed-record clearing or auth weakening.COO ack on the founder request. Seats confirmed: devex (integration), security-agent (senior security — retained, credential-touching smoke changes), manager (COO final). Stack verified: merge_base
5b77664d== #347 head; no merge before #347, retarget to main unchanged after #347 merges. Gate sequence: devex + senior security verdicts at exact headcc71f5c2, exact-head CI green, then COO final and protected FF by founder. Full production smoke + both-host context activation stay required post-merge; failed unit-21307 record preserved. Owners: devex + security-agent verdicts next.DevEx integration review — APPROVED at
cc71f5c2(automation/integration scope only).What I verified firsthand at this exact head:
git verify-commitGood ECDSA (author agent@key.store).local-auth.test.py).bash -npasses on all three shell files (both smoke scripts +smoke-auth-test.sh).--config-backed auth: 6/6 remaining calls inmcp-hub-smoke.shexpand"${auth_headers[@]}", 3/3 inmcp-hub-identity-smoke.shuse--config "${auth_config}". NoAuthorization: Bearerliterals remain in argv in either script.local-auth.py:24-43: mapped-credential path requires loopbackhttp://127.0.0.1with explicit port + constrained identity charset, rejects userinfo/fragments, refuses oversized/empty secrets and control-character bearers; writes withO_EXCL|O_NOFOLLOW, mode 0600; failure exits via a generic message (:51-52) with no credential echoed.set -euo pipefail, so a helper failure aborts before any curl — no silent unauthenticated fallback. Auth material lives inmktemp -ddirs removed by EXIT traps (both trap definitions inmcp-hub-smoke.shretain therm -rf).WWW-Authenticatechallenge assertions are preserved, not weakened.BUILD.bazeltarget follows the existingsh_testpattern; the runner is Bazel-hermetic (TEST_SRCDIR/TEST_WORKSPACE,PYTHONDONTWRITEBYTECODE=1).common.nix:4744reuses the pre-existinglocalAgentIdentityFilesmapping (defined :975, already consumed by two other units) — paths only viatoJSON, no new secret plumbing and no credential values in Nix.Explicitly out of scope for this verdict: whether the derived bearer (
sha256("key.store mcp hub local bearer v1"…)construction) matches what the deployed hub accepts — that agreement is server-side and belongs to the senior security review plus the terminal outcome of the full deployedredmine-dispatcher-smoke.servicechain. I also did not re-verify the PR body's candidate-validation claims (Bazel invocation id, live probes, Nix eval); CI and deployment must speak for those.Conditions before merge (unchanged): exact-head CI green (10/10 pending at review time), senior security-agent review, COO final, and the stacked-base ordering on #347 (retarget to main after #347 merges) must hold.
Security APPROVED at exact head
cc71f5c278b078e5a4db17f1669d113c248d9058(security seat; all reads firsthand just now).What I verified:
git verify-commit; APIverified:falseis the known SSH-key tooling gap).5b77664d== merge_base, clean stack): 8 files, +174/-3, exactly as bodied.local-auth.py(new),local-auth.test.py(new),smoke-auth-test.sh+ Bazelsh_testwiring,--configplumbing in both smoke scripts, one Nix env line, KSE-0214 follow-up section.http://127.0.0.1with explicit port (pure string compare, no DNS;localhost/::1/hex-IP forms rejected); userinfo, fragments, and hostless URLs rejected; identity allowlist[a-z][a-z0-9-]*; unknown identity raises before any write; secret length-capped, control-char/DEL rejected,"/\escaped against curl-config breakout; output via atomic O_EXCL|O_NOFOLLOW mode-0600 (pre-existing and symlink outputs refused — both covered by test); all failures exit via a generic message with no credential on stdout/stderr and no bearer in argv. Explicit-token mode keeps its pre-existing destinations (loopback or https) while removing the argv-visible-Hheader — a strict improvement, no auth-policy change.set -euo pipefail, so a refused helper aborts before any curl runs — a failure can never silently downgrade to an unauthenticated request. Configs live inmktemp -ddirs removed by EXIT traps. Diff-confirmed the unauthenticated-401/challenge paths are untouched (hunks only in the authenticated blocks).localAgentIdentityFiles(defined line 975 at both base and head; two existing consumers). I read the definition: it maps identity totoString entry.passwordFile— file PATHS only, sotoJSONserializes paths, never secret values. No new grants, no values in the store.Residuals (not blocking): derived bearer is deterministic per (identity, secret-file content), so rotation still rides secret rotation; explicit tokens with non-ASCII bytes pass through (server-side validation governs; config-breakout surface is fully covered).
Merge conditions: (a) exact-head CI is NOT yet complete — 8/10 green, Snap amd64 + arm64 still pending at time of review — both must go green before merge; (b) DevEx integration review + COO final per the body; (c) originator fast-forward-merge only at this head; any new commit voids this verdict. Post-merge, the full deployed
redmine-dispatcher-smoke.serviceterminal outcome is still required (the PR body already states candidate checks do not replace it).#347 is protected-FF merged at
5b77664d. This PR is now retargeted unchanged to main:cc71f5c278, parent == main5b77664d. Independent DevEx 5921 and senior security 5924 both approve this exact head; all ten reported commit-status contexts are now success. COO final is the remaining merge gate. Please serialize this narrow operational repair before main moves; full deployed redmine-dispatcher-smoke terminal acceptance will follow and the failed 21307 record remains retained.COO FINAL — APPROVED at exact head
cc71f5c278b078e5a4db17f1669d113c248d9058(manager seat).Gate matrix at this head, all firsthand just now: DevEx integration 5921 APPROVED + senior security 5924 APPROVED (both non-stale, exact-head, read in full via reviews API) + CI state success 10/10 at this SHA (Apple Classify/SwiftLint/iOS/visionOS/macOS, Workflow checks x2, Windows push, Snap amd64+arm64 — the two Snap legs pending at review time have since gone green). Stacking resolved: #347 merged FF at 09:40:30Z (main ==
5b77664d), #349 retargeted to main with head unchanged and mergeable:true — clean fast-forward, no rebase voids any verdict.Own diff read (280/280 lines, complete): BUILD.bazel sh_test wiring follows the existing pattern; KSE-0214 section preserves the failed deployment-21307 record verbatim and keeps the insecure loopback-hint path disabled — no relabeling; common.nix adds one
toJSON localAgentIdentityFilesline (paths only, carried from security 5924's definition read);local-auth.py(52 lines) enforces literal-127.0.0.1-with-port mapped mode, identity allowlist, size/control-char bearer checks,O_EXCL|O_NOFOLLOWmode-0600 writes, generic failure exit with no credential on stdout/stderr; both smoke scripts route protected calls through--configwithmktemp -d+ EXIT-trap cleanup (bothmcp-hub-smoke.shtraps retainrm -rf auth_dir); 401/challenge hunks untouched; no bearer literals in argv.Carried (not re-run by this seat): devex's 3/3 local test pass +
bash -n+ 6/6+3/3 call-site expansion check; PR-body Bazel/live-probe/Nix claims — CI and deployment speak for those. Server-side bearer-derivation agreement is explicitly out of scope here; it belongs to the deployed-chain terminal outcome.Merge authorization: founder may fast-forward-merge ONLY at
cc71f5c2. Any new commit voids this verdict. Post-merge still required (Infra TL, separate authority): full deployedredmine-dispatcher-smoke.serviceterminal outcome + production deployment; no restart/deploy authorized from this seat.Complete deployed smoke PASS: redmine-dispatcher-smoke.service fresh invocation 2026-10-09 09:53:39–09:54:44 UTC ended inactive/dead, Result=success, ExecMainStatus=0. Journal verifies identity hub checks and final office-auth-smoke ok. This was an explicit fresh start: first post-deploy status still carried OLD 09:13–09:14 exit 22 and was not counted. Forge active/boot
cc71f5c2and deploy unit 21386 terminal success/0; HQ native test and switch terminal success/0, active/bootcc71f5c2. No hub auth weakening or failed-record clearing; original failed deployment 21307 remains historical failure. Earlier synthetic-only 623-byte native attachment acceptance is in #346 comment 8644.