fleetwire: MintToken denies idm_admin 30/30 attempts though an on-box login succeeds with the same secret file seconds earlier #641

Closed
opened 2026-08-21 22:57:52 +00:00 by matou-build-agent · 3 comments

Failure

Activation leg red, signature 4c82deb1e678:

activation faulted: founding: mint the credential-enrolment token at seeding: fleetwire: mint the credential-enrolment token: kanidm did not settle within 30 attempts: kanidm: auth: no token issued (denied)

Run: test-results/drive-selfhosted/20260821T224036Z.

Evidence

internal/fleetwire/enrolment.go:175-203 (MintToken) races kanidm settling after the activation-phase switch-to-configuration restarts kanidm.service — this retry (mintTokenSettleAttempts = 30, 2s poll) was added by #635 and the Begin-step lockout classification by #636 (both already landed, confirmed in this run's git log). Both are working as designed here, and the leg still exhausts all 30 attempts with zero successes.

logs/droplet-journal.txt:

  • 22:48:11-13 — activation's second switch-to-configuration restarts kanidm.service (store path yd9kiw991c1cl53wsjwrqk3llqlxgxi9, a distinct generation from the 22:47:23 deploy-takeover switch).
  • 22:48:13 (line 494) — handle_admin_recover_account name: "idm_admin" fires (kanidm's built-in provisioning, sourced from config.clan.core.vars.generators.kanidm-admins.files.idm_admin.path per internal/clan/vmguest.go:703).
  • 22:48:13 (lines 503-511) — the on-box kanidm-credential-floor oneshot (internal/clan/vmguest.go:960-969, export KANIDM_PASSWORD="$(cat ${...idm_admin.path})", kanidm login --name idm_admin) succeeds immediately (Auth result: Success(Token) for idm_admin@id.rehearsal-b.idss.nz) — proving the generator file's current content is a working idm_admin password at this exact moment.
  • 22:48:21 through 22:49:33 (grep AuthenticationDenied) — fleetwire's MintToken, reading the SAME file over SSH (internal/fleetwire/enrolment.go:140-141, cat "$(cat /etc/idss/kanidm-idm-admin-path)"), is denied every single attempt: exactly 15 Handler::Password -> Result::Denied - incorrect password interleaved with 15 Account is temporarily locked (kanidm's own lockout, self-inflicted by the repeated wrong attempts) = 30/30, matching the error's "did not settle within 30 attempts" exactly. Not one attempt in the ~80s window succeeds, including attempts made while the account was provably unlocked — so this isn't kanidm settling slowly, it's a stable byte-level mismatch between what the on-box script reads and what fleetwire reads via SSH, for a file that (per the local clan-config state dirs, vars/per-machine/gateway/kanidm-admins/idm_admin/secret, byte-identical between state/clan-config and state/clan-config.pre-flip) was never regenerated during this run.

Suspected layer

internal/fleetwire/fleetwire.go:33-43 — ExecRunner.Run uses cmd.CombinedOutput(), merging the remote command's stdout AND stderr into the single string that becomes the password (enrolment.go:154, strings.TrimSpace(secret)). If the SSH remote shell ever writes anything to stderr on this command (a login/profile message, a transient stat race on the sops-nix symlink, etc.), it silently rides into the "secret" string as extra bytes — an exact-match password consumer (kanidm's /v1/auth Cred step, internal/kanidm/auth.go:78) would reject it outright, while the CA read on the same double-cat pattern (enrolment.go:135-138) would tolerate trailing garbage silently (x509.CertPool.AppendCertsFromPEM ignores bytes outside the PEM block), which is consistent with the CA read never erroring in this run while only the password read fails. internal/fleetwire/*_test.go has no test exercising ExecRunner/CombinedOutput at all — this path is untested against real stderr contamination. This is GOTCHAS #4's byte-disagreement class (docs/GOTCHAS.md:63-78) in a new shape: not a generator-side trailing newline, but a possible transport-side stderr splice.

What plugging it needs

Not confident enough to land a fix blind on a security-sensitive auth path with no droplet left to reproduce against. A swarm worker should:

  1. Add a redacted diagnostic (length/hash only, never the raw secret — ADR 0051) around enrolment.go:140-154 so the next red run shows whether the SSH-read secret differs in byte length from the generator file's known length (openssl rand -base64 24 after tr -d '\n' is a fixed 32 chars) — that alone would confirm or rule out contamination.
  2. If confirmed, change ExecRunner.Run (fleetwire.go:33-43) to capture stdout and stderr separately for exact-match secret reads (keep combined output for error reporting), or add a length/format sanity check before use.
  3. If NOT contamination, the next suspect is the own-VPS GuestForwards.KanidmPort/SSH tunnel resolution possibly routing to a stale endpoint post-restart — worth ruling in/out with the same diagnostic pass.

Unrelated to this signature but adjacent: #635 and #636 are both already-landed fixes for symptoms of this same failure family; this issue is the residual case neither actually resolves.

drive 20260821T224036Z red at activation: activation faulted: founding: mint the credential-enrolment token at seeding: fleetwire: mint the credential-enrolment token: kanidm did not settle within 30 attempts: kanidm: auth: no token issued (d
evidence: test-results/…/20260821T224036Z/ on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)

## Failure Activation leg red, signature `4c82deb1e678`: ``` activation faulted: founding: mint the credential-enrolment token at seeding: fleetwire: mint the credential-enrolment token: kanidm did not settle within 30 attempts: kanidm: auth: no token issued (denied) ``` Run: `test-results/drive-selfhosted/20260821T224036Z`. ## Evidence `internal/fleetwire/enrolment.go:175-203` (`MintToken`) races kanidm settling after the activation-phase `switch-to-configuration` restarts `kanidm.service` — this retry (`mintTokenSettleAttempts = 30`, 2s poll) was added by #635 and the Begin-step lockout classification by #636 (both already landed, confirmed in this run's git log). Both are working as designed here, and the leg still exhausts all 30 attempts with **zero** successes. `logs/droplet-journal.txt`: - `22:48:11-13` — activation's second `switch-to-configuration` restarts `kanidm.service` (store path `yd9kiw991c1cl53wsjwrqk3llqlxgxi9`, a distinct generation from the `22:47:23` deploy-takeover switch). - `22:48:13` (line 494) — `handle_admin_recover_account name: "idm_admin"` fires (kanidm's built-in provisioning, sourced from `config.clan.core.vars.generators.kanidm-admins.files.idm_admin.path` per `internal/clan/vmguest.go:703`). - `22:48:13` (lines 503-511) — the **on-box** `kanidm-credential-floor` oneshot (`internal/clan/vmguest.go:960-969`, `export KANIDM_PASSWORD="$(cat ${...idm_admin.path})"`, `kanidm login --name idm_admin`) **succeeds immediately** (`Auth result: Success(Token)` for `idm_admin@id.rehearsal-b.idss.nz`) — proving the generator file's current content is a working idm_admin password at this exact moment. - `22:48:21` through `22:49:33` (grep `AuthenticationDenied`) — fleetwire's `MintToken`, reading the SAME file over SSH (`internal/fleetwire/enrolment.go:140-141`, `cat "$(cat /etc/idss/kanidm-idm-admin-path)"`), is denied **every single attempt**: exactly 15 `Handler::Password -> Result::Denied - incorrect password` interleaved with 15 `Account is temporarily locked` (kanidm's own lockout, self-inflicted by the repeated wrong attempts) = 30/30, matching the error's "did not settle within 30 attempts" exactly. Not one attempt in the ~80s window succeeds, including attempts made while the account was provably unlocked — so this isn't kanidm settling slowly, it's a stable byte-level mismatch between what the on-box script reads and what fleetwire reads via SSH, for a file that (per the local clan-config state dirs, `vars/per-machine/gateway/kanidm-admins/idm_admin/secret`, byte-identical between `state/clan-config` and `state/clan-config.pre-flip`) was never regenerated during this run. ## Suspected layer `internal/fleetwire/fleetwire.go:33-43` — `ExecRunner.Run` uses `cmd.CombinedOutput()`, merging the remote command's stdout AND stderr into the single string that becomes the password (`enrolment.go:154`, `strings.TrimSpace(secret)`). If the SSH remote shell ever writes anything to stderr on this command (a login/profile message, a transient stat race on the sops-nix symlink, etc.), it silently rides into the "secret" string as extra bytes — an exact-match password consumer (kanidm's `/v1/auth` Cred step, `internal/kanidm/auth.go:78`) would reject it outright, while the CA read on the same double-cat pattern (`enrolment.go:135-138`) would tolerate trailing garbage silently (`x509.CertPool.AppendCertsFromPEM` ignores bytes outside the PEM block), which is consistent with the CA read never erroring in this run while only the password read fails. `internal/fleetwire/*_test.go` has no test exercising `ExecRunner`/`CombinedOutput` at all — this path is untested against real stderr contamination. This is GOTCHAS #4's byte-disagreement class (`docs/GOTCHAS.md:63-78`) in a new shape: not a generator-side trailing newline, but a possible transport-side stderr splice. ## What plugging it needs Not confident enough to land a fix blind on a security-sensitive auth path with no droplet left to reproduce against. A swarm worker should: 1. Add a redacted diagnostic (length/hash only, never the raw secret — ADR 0051) around `enrolment.go:140-154` so the next red run shows whether the SSH-read secret differs in byte length from the generator file's known length (`openssl rand -base64 24` after `tr -d '\n'` is a fixed 32 chars) — that alone would confirm or rule out contamination. 2. If confirmed, change `ExecRunner.Run` (`fleetwire.go:33-43`) to capture stdout and stderr separately for exact-match secret reads (keep combined output for error reporting), or add a length/format sanity check before use. 3. If NOT contamination, the next suspect is the own-VPS `GuestForwards.KanidmPort`/SSH tunnel resolution possibly routing to a stale endpoint post-restart — worth ruling in/out with the same diagnostic pass. Unrelated to this signature but adjacent: #635 and #636 are both already-landed fixes for symptoms of this same failure family; this issue is the residual case neither actually resolves. drive `20260821T224036Z` red at `activation`: `activation faulted: founding: mint the credential-enrolment token at seeding: fleetwire: mint the credential-enrolment token: kanidm did not settle within 30 attempts: kanidm: auth: no token issued (d` evidence: `test-results/…/20260821T224036Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596) <!-- rehearsal-sig: 4c82deb1e678 -->
Owner

CONFIRMED (not just suspected) — stderr splice from #633's host-key rotation. Skip the diagnostic pass, land the stdout-only fix directly.

The reporter's CombinedOutput() hypothesis is exactly right, and this run's own logs carry the contaminating bytes — no length/hash diagnostic pass (recommendation #1) is needed to confirm it. Root cause chain, fully evidenced from test-results/drive-selfhosted/20260821T224036Z:

  1. founding-state.log:300 — "rotating the machine's pinned SSH host key across the takeover reboot before reconnecting over your own SSH key (#633)". #633 (just landed) rotates the box's SSH host key across the takeover.
  2. Fleetwire's SSH posture is accept-new (internal/fleetwire/carrier.go:17,104,130-143). After the rotation drops the stale pin, the first reconnect is accept-new against an unknown key.
  3. droplet-journal.txt:1 — Warning: Permanently added '170.64.193.163' (ED25519) to the list of known hosts. — accept-new emits this to stderr.
  4. ExecRunner.Run (internal/fleetwire/fleetwire.go:38) uses cmd.CombinedOutput() → that Warning: line is merged into the string returned by liveIDP's cat "$(cat /etc/idss/kanidm-idm-admin-path)" (enrolment.go:140-141), then strings.TrimSpace'd (:154) — so the password handed to kanidm.New is Warning: Permanently added…\n<secret>, not <secret>.
  5. kanidm's Cred step is exact-match (internal/kanidm/auth.go:78) → Denied - incorrect password × 30 → self-inflicted lockout. The on-box kanidm-credential-floor reads the file with a local cat (no SSH, no warning) → Success at 22:48:13. The CA read rides the same double-cat but x509.CertPool.AppendCertsFromPEM ignores the non-PEM Warning: line → tolerated. Both asymmetries the reporter flagged are explained by this single cause.

This also explains why it survives #635/#636: neither touches transport. #635's retry can't help (every attempt re-reads the same contaminated value); ddbc3d13's typed-denial is correct but the denial is real, not a settle race.

Fix (land directly — safe regardless of this being the only cause)

A secret read must return the command's stdout only; stderr is diagnostics and must never reach a credential. Two-way door, correct on its own merits:

  • Change ExecRunner.Run to capture stdout as the success value and fold stderr into the error on non-zero exit (keep the honest failure output there). Audit the handful of Run callers (carrier.go host-key learn returns ssh-keyscan stdout; supply/seed/idp all want stdout) — none rely on stderr in the success string.
  • Alternatively, if a narrower blast radius is preferred on this security path: give the secret reads (liveIDP idm_admin + the CA read) a stdout-only variant and leave the generic Run combined.
  • Test the untested path (internal/fleetwire/*_test.go never exercises ExecRunner/CombinedOutput): a unit test that a runner whose command writes a Warning: line to stderr yields a secret string with no stderr bytes. Guards the regression directly.

Belt-and-braces worth considering (not required for green): -o LogLevel=ERROR on the ssh args would suppress the "Permanently added" notice too — but the stdout/stderr split is the load-bearing fix; keep it primary.

GOTCHAS #4 (byte-disagreement) in a new transport-side shape — worth a GOTCHAS entry in the fix commit. Left ready-for-session — this is now a scoped, high-confidence code fix, not an investigation.

## CONFIRMED (not just suspected) — stderr splice from #633's host-key rotation. Skip the diagnostic pass, land the stdout-only fix directly. The reporter's `CombinedOutput()` hypothesis is exactly right, and this run's own logs carry the contaminating bytes — no length/hash diagnostic pass (recommendation #1) is needed to confirm it. Root cause chain, fully evidenced from `test-results/drive-selfhosted/20260821T224036Z`: 1. **`founding-state.log:300`** — `"rotating the machine's pinned SSH host key across the takeover reboot before reconnecting over your own SSH key (#633)"`. #633 (just landed) rotates the box's SSH host key across the takeover. 2. Fleetwire's SSH posture is **accept-new** (`internal/fleetwire/carrier.go:17,104,130-143`). After the rotation drops the stale pin, the first reconnect is accept-new against an unknown key. 3. **`droplet-journal.txt:1`** — `Warning: Permanently added '170.64.193.163' (ED25519) to the list of known hosts.` — accept-new emits this to **stderr**. 4. `ExecRunner.Run` (`internal/fleetwire/fleetwire.go:38`) uses `cmd.CombinedOutput()` → that `Warning:` line is merged into the string returned by `liveIDP`'s `cat "$(cat /etc/idss/kanidm-idm-admin-path)"` (`enrolment.go:140-141`), then `strings.TrimSpace`'d (`:154`) — so the password handed to `kanidm.New` is `Warning: Permanently added…\n<secret>`, not `<secret>`. 5. kanidm's Cred step is exact-match (`internal/kanidm/auth.go:78`) → `Denied - incorrect password` × 30 → self-inflicted lockout. The **on-box** `kanidm-credential-floor` reads the file with a **local** `cat` (no SSH, no warning) → `Success` at 22:48:13. The **CA** read rides the same double-cat but `x509.CertPool.AppendCertsFromPEM` ignores the non-PEM `Warning:` line → tolerated. Both asymmetries the reporter flagged are explained by this single cause. This also explains why it survives #635/#636: neither touches transport. `#635`'s retry can't help (every attempt re-reads the same contaminated value); `ddbc3d13`'s typed-denial is correct but the denial is real, not a settle race. ### Fix (land directly — safe regardless of this being the only cause) A secret read must return the command's **stdout only**; stderr is diagnostics and must never reach a credential. Two-way door, correct on its own merits: - Change `ExecRunner.Run` to capture **stdout as the success value** and fold **stderr into the error** on non-zero exit (keep the honest failure output there). Audit the handful of `Run` callers (`carrier.go` host-key learn returns `ssh-keyscan` stdout; supply/seed/idp all want stdout) — none rely on stderr in the success string. - Alternatively, if a narrower blast radius is preferred on this security path: give the secret reads (`liveIDP` idm_admin + the CA read) a stdout-only variant and leave the generic `Run` combined. - **Test the untested path** (`internal/fleetwire/*_test.go` never exercises `ExecRunner`/`CombinedOutput`): a unit test that a runner whose command writes a `Warning:` line to stderr yields a secret string with **no** stderr bytes. Guards the regression directly. Belt-and-braces worth considering (not required for green): `-o LogLevel=ERROR` on the ssh args would suppress the "Permanently added" notice too — but the stdout/stderr split is the load-bearing fix; keep it primary. GOTCHAS #4 (byte-disagreement) in a new transport-side shape — worth a GOTCHAS entry in the fix commit. Left `ready-for-session` — this is now a scoped, high-confidence code fix, not an investigation.
Author
Member

Ruled by agent under ADR 0174 — veto anytime.

Ruling: land the code fix and the requested diagnostic now; this is a two-way door — a code change to internal/fleetwire/fleetwire.go and enrolment.go, revertible by commit, provable by new tests, no credential/posture/trust-surface change.

What I found: ExecRunner.Run (fleetwire.go:33-43) used cmd.CombinedOutput(), so a successful remote command's stderr rides silently into the returned string. For most callers (git-ish command output, error text) that's harmless, but two callers treat the return value as exact byte content: enrolment.go's liveIDP hands it byte-for-byte to kanidm's /v1/auth Cred step as the idm_admin password. Confirmed this reproduces the exact failure class described in the ticket's evidence — wrote TestExecRunner_SeparatesStdoutFromStderrOnSuccess first (red): a command that writes clean-secret to stdout and noise to stderr while exiting 0 came back as "clean-secretnoise". That is a stable, unconditional corruption of any successful command that writes anything at all to stderr — matching the evidence's "not one attempt in an ~80s window succeeds" far better than a settling delay would.

Fix: ExecRunner.Run now keeps stdout and stderr apart (cmd.Output() + a dedicated stderr buffer) — a successful run returns stdout ONLY; a failing run's wrapped error still concatenates both, so diagnostics lose nothing. TestExecRunner_FailureStillSurfacesStderr proves the failure path is unchanged.

Diagnostic (ticket's ask #1): added a redacted length-only log (ADR 0051 — never the secret bytes) around the idm_admin read in liveIDP, logging raw_bytes/trimmed_bytes. The generator writes a fixed 32-char secret, so a future red run's logs alone will confirm or rule out a splice — TestEnrolment_LiveIDPLogsSecretLengthNotSecret proves the fields land and the secret itself never does.

What I did NOT do: run a live rehearsal drive to directly confirm this was THE cause of 20260821T224036Z's denial. This session (ready-for-session, session-runner) holds /tmp/matou-session-runner.lock for its whole lifetime, and the standing self-hosted rehearsal's host_capacity_acquire_exclusive (#577/ADR 0184) grabs the same lock non-blockingly — a prior #636 session found empirically that the standing drive structurally cannot be fired from inside a session like this one, and bypassing that guard to hand-drive one would defeat a deliberate host-contention protection on a shared box. So the live proof is the next cron-triggered rehearsal that reaches activation, not something this session can produce.

Relationship to #640: #640 (open, ready-for-human) is the deeper "does the on-box secret genuinely desync across the two switch-to-configuration applies" question, deferred by #636. This ticket's fix is a different, independent mechanism (fleetwire's own transport layer, not kanidm/sops materialization) — if the next rehearsal greens past activation, that's evidence for the transport-splice explanation over #640's materialization-divergence one; if it still reds at this exact signature even with this fix, #640 is where that narrower live-droplet forensic belongs (not a new ticket).

Ruled by agent under ADR 0174 — veto anytime. **Ruling:** land the code fix and the requested diagnostic now; this is a two-way door — a code change to `internal/fleetwire/fleetwire.go` and `enrolment.go`, revertible by commit, provable by new tests, no credential/posture/trust-surface change. **What I found:** `ExecRunner.Run` (`fleetwire.go:33-43`) used `cmd.CombinedOutput()`, so a *successful* remote command's stderr rides silently into the returned string. For most callers (git-ish command output, error text) that's harmless, but two callers treat the return value as exact byte content: `enrolment.go`'s `liveIDP` hands it byte-for-byte to kanidm's `/v1/auth` Cred step as the idm_admin password. Confirmed this reproduces the exact failure class described in the ticket's evidence — wrote `TestExecRunner_SeparatesStdoutFromStderrOnSuccess` first (red): a command that writes `clean-secret` to stdout and `noise` to stderr while exiting 0 came back as `"clean-secretnoise"`. That is a stable, unconditional corruption of any successful command that writes anything at all to stderr — matching the evidence's "not one attempt in an ~80s window succeeds" far better than a settling delay would. **Fix:** `ExecRunner.Run` now keeps stdout and stderr apart (`cmd.Output()` + a dedicated stderr buffer) — a successful run returns stdout ONLY; a failing run's wrapped error still concatenates both, so diagnostics lose nothing. `TestExecRunner_FailureStillSurfacesStderr` proves the failure path is unchanged. **Diagnostic (ticket's ask #1):** added a redacted length-only log (ADR 0051 — never the secret bytes) around the idm_admin read in `liveIDP`, logging `raw_bytes`/`trimmed_bytes`. The generator writes a fixed 32-char secret, so a future red run's logs alone will confirm or rule out a splice — `TestEnrolment_LiveIDPLogsSecretLengthNotSecret` proves the fields land and the secret itself never does. **What I did NOT do:** run a live rehearsal drive to directly confirm this was THE cause of `20260821T224036Z`'s denial. This session (`ready-for-session`, session-runner) holds `/tmp/matou-session-runner.lock` for its whole lifetime, and the standing self-hosted rehearsal's `host_capacity_acquire_exclusive` (#577/ADR 0184) grabs the *same* lock non-blockingly — a prior #636 session found empirically that the standing drive structurally cannot be fired from inside a session like this one, and bypassing that guard to hand-drive one would defeat a deliberate host-contention protection on a shared box. So the live proof is the next cron-triggered rehearsal that reaches activation, not something this session can produce. **Relationship to #640:** #640 (open, `ready-for-human`) is the deeper "does the on-box secret genuinely desync across the two `switch-to-configuration` applies" question, deferred by #636. This ticket's fix is a *different*, independent mechanism (fleetwire's own transport layer, not kanidm/sops materialization) — if the next rehearsal greens past activation, that's evidence for the transport-splice explanation over #640's materialization-divergence one; if it still reds at this exact signature even with this fix, #640 is where that narrower live-droplet forensic belongs (not a new ticket).
Author
Member

Close-report

Landed: bd353b34 on main — "sandcastle: #641 — fleetwire: idm_admin secret read no longer swallows stderr into the exact-match password". STATUS.md updated in the same commit.

What landed (ticket's "What plugging it needs" items 1 and 2):

  1. Redacted diagnostic (raw_bytes/trimmed_bytes, ADR 0051 — never the secret) around the idm_admin secret read in enrolment.go's liveIDP.
  2. ExecRunner.Run (fleetwire.go) now captures stdout and stderr separately: a successful command returns stdout ONLY (previously cmd.CombinedOutput() merged both), while a failing command's wrapped error still carries both concatenated, so failure diagnostics are unchanged.

Proof:

  • TestExecRunner_SeparatesStdoutFromStderrOnSuccess — confirmed RED first: a command writing clean-secret to stdout and noise to stderr while exiting 0 came back as "clean-secretnoise" under the old CombinedOutput() implementation, reproducing exactly the byte-splice class the ticket's suspected-layer analysis named. Green after the fix.
  • TestExecRunner_FailureStillSurfacesStderr — the failure path still surfaces stderr text for diagnosis.
  • TestEnrolment_LiveIDPLogsSecretLengthNotSecret — the new diagnostic logs the length fields and never the secret itself.
  • Full suite green: go build ./..., go vet ./..., go test ./... — no regressions across the repo.

Item 3 (own-VPS forwards alternate theory): not pursued — it was scoped as "if NOT contamination," and the reproducing test confirms this IS the contamination class.

Not done — and why that's still an honest close: did not run a live rehearsal to directly confirm this was THE cause of 20260821T224036Z's specific denial. This ready-for-session session holds /tmp/matou-session-runner.lock for its lifetime, and the standing self-hosted rehearsal's host-capacity guard (#577/ADR 0184) grabs the same lock non-blockingly — a prior #636 session confirmed empirically that the standing drive cannot be fired from inside a session like this one, and hand-driving one to bypass that guard would defeat a deliberate host-contention protection on a shared box. So the live proof is the next cron-triggered rehearsal reaching activation, mirroring the #635/#636 precedent (ship a test-proven hardening, watch the next rehearsal, rather than block indefinitely on a live drive this session structurally cannot produce).

Ruling and full technical detail already posted above under ADR 0174. Closing.

## Close-report **Landed:** `bd353b34` on `main` — "sandcastle: #641 — fleetwire: idm_admin secret read no longer swallows stderr into the exact-match password". `STATUS.md` updated in the same commit. **What landed** (ticket's "What plugging it needs" items 1 and 2): 1. Redacted diagnostic (`raw_bytes`/`trimmed_bytes`, ADR 0051 — never the secret) around the idm_admin secret read in `enrolment.go`'s `liveIDP`. 2. `ExecRunner.Run` (`fleetwire.go`) now captures stdout and stderr separately: a successful command returns stdout ONLY (previously `cmd.CombinedOutput()` merged both), while a failing command's wrapped error still carries both concatenated, so failure diagnostics are unchanged. **Proof:** - `TestExecRunner_SeparatesStdoutFromStderrOnSuccess` — confirmed RED first: a command writing `clean-secret` to stdout and `noise` to stderr while exiting 0 came back as `"clean-secretnoise"` under the old `CombinedOutput()` implementation, reproducing exactly the byte-splice class the ticket's suspected-layer analysis named. Green after the fix. - `TestExecRunner_FailureStillSurfacesStderr` — the failure path still surfaces stderr text for diagnosis. - `TestEnrolment_LiveIDPLogsSecretLengthNotSecret` — the new diagnostic logs the length fields and never the secret itself. - Full suite green: `go build ./...`, `go vet ./...`, `go test ./...` — no regressions across the repo. **Item 3 (own-VPS forwards alternate theory):** not pursued — it was scoped as "if NOT contamination," and the reproducing test confirms this IS the contamination class. **Not done — and why that's still an honest close:** did not run a live rehearsal to directly confirm this was THE cause of `20260821T224036Z`'s specific denial. This `ready-for-session` session holds `/tmp/matou-session-runner.lock` for its lifetime, and the standing self-hosted rehearsal's host-capacity guard (#577/ADR 0184) grabs the same lock non-blockingly — a prior #636 session confirmed empirically that the standing drive cannot be fired from inside a session like this one, and hand-driving one to bypass that guard would defeat a deliberate host-contention protection on a shared box. So the live proof is the next cron-triggered rehearsal reaching activation, mirroring the #635/#636 precedent (ship a test-proven hardening, watch the next rehearsal, rather than block indefinitely on a live drive this session structurally cannot produce). Ruling and full technical detail already posted above under ADR 0174. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#641
No description provided.