Skip to content

Bind Guardian Decisions requests to their credential source - #59914

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1d975613040e08c3825ba6355a166cf0fa812cad
Nov 6, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1d975613040e08c3825ba6355a166cf0fa812cad

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Bind Guardian Decisions requests to their credential source

Why

Guardian Decisions retained a copied login key after the saved login changed or was removed. Queued comparisons need to respect credential changes, while runtime-bound threads must remain tied to their startup credential source.

What changed

  • Select login credentials from the thread's ProviderAuthContext, falling back to the supplied auth manager when no context exists.
  • Resolve saved login keys before sending requests and reject queued comparisons if their credential source has changed. Pin runtime-bound credentials to the source selected at startup.
  • Revalidate implicit keys before sending, rejecting missing, padded, or FedRAMP keys. Preserve explicit key overrides and the environment-key fallback.

Testing

Extend credential lookup and queued-request tests to cover reloaded logins, runtime source pinning, rejection of stale queued comparisons, replacement-key authorization, invalid keys, and logout.

## Why

Guardian Decisions retained a copied login key after the saved login changed or was removed. Queued comparisons need to respect credential changes, while runtime-bound threads must remain tied to their startup credential source.

## What changed

- Select login credentials from the thread's `ProviderAuthContext`, falling back to the supplied auth manager when no context exists.
- Resolve saved login keys before sending requests and reject queued comparisons if their credential source has changed. Pin runtime-bound credentials to the source selected at startup.
- Revalidate implicit keys before sending, rejecting missing, padded, or FedRAMP keys. Preserve explicit key overrides and the environment-key fallback.

## Testing

Extend credential lookup and queued-request tests to cover reloaded logins, runtime source pinning, rejection of stale queued comparisons, replacement-key authorization, invalid keys, and logout.

GitOrigin-RevId: 1d975613040e08c3825ba6355a166cf0fa812cad
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/1d975613040e08c3825ba6355a166cf0fa812cad branch from cf03a94 to 2c502d8 Compare November 6, 2026 13:54
@copyberry
copyberry Bot merged commit 2c502d8 into main Nov 6, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-06T13:54:18.193950Z cf03a94 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.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/1d975613040e08c3825ba6355a166cf0fa812cad branch November 6, 2026 13:54
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 2026

This branch was previously deployed

1 inactive deployment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.