Skip to content

Keep runtime-proof API refresh credentials in root custody - #985

Merged
GraciousGazelles merged 18 commits into
mainfrom
fix/w15784-r3-credential-custody-20261023
Oct 23, 2026
Merged

GraciousGazelles merged 18 commits into
mainfrom
fix/w15784-r3-credential-custody-20261023

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

The HTTP credential provisioner currently stores its refresh profile in the invoking user's keyring and transfers the access token back to the root launcher over a private descriptor. This moves the fixed OAuth transaction into the non-dumpable root provisioner and keeps the existing refresh rotation, bearer publication, and logout under one root credential lock.

The profile is stored only as a fixed host-encrypted systemd credential, using the existing host key and an explicit credential name. The provisioner atomically persists refresh-token rotation before returning a bearer and fails closed on persistence errors. The browser helper receives only the authorization URL and drops to the invoking desktop UID/GID. The MCP credential path and claim service's loaded bearer cleanup remain unchanged.

Validation: rustfmt --edition 2024 and git diff --check passed. Local build/test execution is prohibited for this assignment; hosted validation should use the existing Codex branch CI and Linux x86_64 package/install smoke. The exact candidate is b0a5e0c3a46f04d80ec11e44fb458475777582a6.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-23T10:16:35.710597Z b0a5e0c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the fixed API bearer provisioning flow to store the API refresh profile as a root-owned, encrypted blob at /etc/credstore.encrypted/codex-runtime-proof-api-refresh using the systemd-creds utility, replacing the previous implementation that stored it in the invoking user's OS keyring. This eliminates the need for spawning an unprivileged child process and the associated seqpacket IPC handoff. Feedback on the changes points out an issue in the pre_exec closure for systemd-creds where std::io::Error::last_os_error() is incorrectly returned on a geteuid check failure, and suggests returning an explicit EPERM error instead.

@GraciousGazelles
GraciousGazelles force-pushed the fix/w15784-r3-credential-custody-20261023 branch from f1e16e4 to 72ffc85 Compare October 23, 2026 16:32
@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit bf88738 Oct 23, 2026
85 checks passed
@GraciousGazelles
GraciousGazelles deleted the fix/w15784-r3-credential-custody-20261023 branch October 23, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant