Repository navigation
feat(clientauth): headless Linux credential storage - #1291
Merged
Merged
Conversation
Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
Add the fixture checker and manual qualification guide. Keep the acceptance plan in-progress: Linux detector qualification, complete aggregate gates, and live platform journeys remain outstanding. Co-Authored-By: mecatl <[email protected]>
…aries Exercise real private D-Bus wire fixtures and cross-process credential rotation. Add Linux discovery/dial isolation fixtures and unsupported-platform tests; these platform binaries are compile-checked here, not executed. Keep manual qualification pending. Co-Authored-By: mecatl <[email protected]>
…on wiring Exercise real opener boundaries, durable selection before OAuth, connect refresh, existing-only reauth, and logout. Assert actual Taskfile wiring and joined SIGKILL; inventory persistent plaintext selection resources. Co-Authored-By: mecatl <[email protected]>
Correct the credential-store resource inventory symbol citation. Co-Authored-By: mecatl <[email protected]>
Use the real CLI for manual qualification and retain detailed persistence assertions in hermetic tests, as approved. Co-Authored-By: mecatl <[email protected]>
Scenario 5's manual macOS explicit-file and Linux headless-auto journeys against the deploy/mecak8s-kind fixture completed successfully. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Non-production, test-only diagnostic to capture why TestHeadlessCredentialStorage_Scenario1_LinuxDiscoveryBudget fails on the GH-hosted ubuntu-24.04 runner but not in local repro. Writes uid/gid, /run/user/0 listing, and the raw dbus dial error to a debug.log inside the fixture root, logged on assertion failure. To be reverted once the CI failure is understood. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The GH-hosted ubuntu-24.04 runner permits creating the unprivileged
user+mount namespace (the existing outer probe passes) but its LSM/kernel
policy still denies chroot(2) inside it with EPERM, which the child
previously treated as a generic detection failure (exit 82) and made the
test fail hard instead of recognising the fixture itself as unsupported
here - the same class of case the outer probe already skips for a denied
clone(2).
The child now exits a distinct sentinel (83) specifically for an
EPERM/EINVAL chroot, and the test skips on that sentinel instead of
failing, mirroring the existing outer-probe skip.
Diagnosed via a temporary debug.log dump from the sandboxed child on CI
(reverted here) that showed:
chroot("/tmp/...")=operation not permitted chdir(/)=<nil>
Co-Authored-By: Claude Sonnet 5 <[email protected]>
jhrozek
force-pushed
the
impl/headless-client-credential-storage
branch
from
September 9, 2026 20:28
c2714e7 to
6b16150
Compare
Contributor
|
Woohoo! Thank you! |
jbeda
added a commit
that referenced
this pull request
Sep 11, 2026
* commit 'cc6b16afbf7feec3e16451fdc590a3265fbf0c0b': docs: amend Shell diagnostic ownership (#1330) fix(mecatui): refresh status context on session continuation (#1328) fix(jsonlstore): preserve session saves with legacy lineage (#1327) test(sessiondebug): eliminate handle tampering flake (#1323) fix(agent): authorize structured subagent results (#1317) feat(mcp): support attachment-backed broker queries for CallMcpWithQuery (#1309) docs(agents): document full-gate timeout guidance (#1316) fix(server): let the stale-session sweep re-acquire a lost lease (#1302) feat(clientauth): headless Linux credential storage (#1291) chore(mcpbroker): trace protected call latency (#1314) # Conflicts: # docs/acceptance/canonical-shell-command-tool.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds file-backed credential storage for headless Linux
mecatui login, per theapproved acceptance plan. A new owner-only plaintext CAS backend
(
credentialstore.PlainFileStore) sits alongside the existing keyring-backedstore;
internal/adapter/clientauthgainsResolveCredentialStore,OpenCredentialStore, andOpenExistingCredentialStoreto pin one backend percanonical credential-store root before OAuth starts, and every later login,
connect, refresh, reauthentication, and logout goes through that pin (no
fallback, switch, or migration). On Linux,
autoperforms a private,deadline-bounded Secret Service detection (never a mutating probe) to decide
between keyring and file; macOS keeps the current keyring-default
auto.mecatui logingains--credential-store=auto|keyring|file.feat(credentialstore): owner-only plaintext CAS backend (0700/0600, CAS + ABA resistance).feat(clientauth): backend pinning, stored-login lifecycle wiring, Linux Secret Service detector.test(clientauth): detector-stage and backend-lifecycle boundary tests, production-route and qualification-wiring tests.fix(credentialcheck): resolve the credential-store fixture boundary from an absolute cwd.test(clientauth): remove the standalone Kind credential checker in favor of the real CLI for manual qualification.Development stage
Contract linkage
docs/acceptance/headless-client-credential-storage.mdInterface conformance
Matches approved contract:
CredentialStoreMode/CredentialBackend/CredentialStoreSelection,ResolveCredentialStore/OpenCredentialStore/OpenExistingCredentialStore,NewPlainFile/OpenExistingPlainFile, the privatedetectLinuxSecretServicehelperprotocol,
mecatui login --credential-store, and theclientauth-credential-backend.json/clientauth-plaintext/on-disk layout, all as specified in the plan's Interface contractsection.
Scenario 5's manual Kind/Keycloak live qualification (macOS explicit-file and
Linux headless-auto journeys — login, authenticated connect, natural
token-refresh window, new-process connect, logout, failed post-logout connect)
has been run and passed against the
deploy/mecak8s-kindfixture, and isrecorded in the plan's AC5.2 evidence note. Remaining before the plan can be
marked landed is the full baseline-checks list in Definition of done item 4
(
task lint,task test,task api:check,task docs,task site:build,go run ./cmd/mecademo).Issue relationship
Relates to #1271
Type of change
Test plan
Baseline checks
task lint) — deferred to CItask test)go run ./cmd/mecademo) — unaffected by this changetask docs)task site:build)task api:check) —engine/untouchedtask api:update+engine/CHANGELOG.mdtask ac-trace-strict) — plan not yet fully landed/panel-reviewUser-facing change
mecatui loginaccepts a new--credential-store=auto|keyring|fileflag(default
auto). On headless Linux without a running desktop Secret Service,login now falls back to an owner-only plaintext credential file instead of
failing with
authentication unavailable: storage_unavailable, printing aone-time notice. macOS behavior is unchanged.
Special notes for reviewers
deploy/mecak8s-kindKeycloak/TLSfixture (macOS explicit-file + Linux headless-auto journeys) has passed —
see the plan's Scenario 5 AC5.2 evidence note for the recorded result.
exec.CommandContextwith reserved exit codes (80/81/82); it is not asupported user-facing command.