Repository navigation
[Codex Security] REST configuration overrides can redirect a retained OAuth client secret during token refresh - #21
Closed
manuzhang wants to merge 1 commit into
Conversation
Server-provided catalog configuration could override the OAuth token endpoint or catalog base URI and redirect a retained client secret during token refresh. Disable trust in server-selected OAuth endpoints by default. When client credentials are configured, require an explicit absolute HTTP(S) token endpoint before any I/O and preserve the client endpoint and trust policy after merging server configuration. Keep server endpoint overrides available through explicit opt-in, preserve token-only and unauthenticated behavior, and update regression tests to verify the refresh destination and client-secret submission.
manuzhang
force-pushed
the
codex-security/arp_58d1a99827c52fa3a41aeaead8b257b3
branch
from
November 17, 2026 08:41
cecf63c to
91e7ed8
Compare
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.
The patch defaults credential-bearing OAuth refreshes to the operator endpoint and keeps server endpoint selection as explicit opt-in.
kTrustServerOAuth2Urinow defaults to false, requiring a lowercase absolute HTTP(S) token endpoint for client credentials before any I/O.RestCatalog::Makerestores operator trust policy and token endpoint after server configuration merging, closing direct endpoint and catalog-base rebinding.Static Verification Checks
Operator endpoint pinning (Passed) — RestCatalog::Make restores the client token endpoint after MergeConfigs, preventing server overrides from redirecting retained secrets.
Absolute endpoint rejection (Passed) — RestCatalog::Make rejects missing, relative, non-HTTP, and uppercase-scheme endpoints before credential-bearing initialization, closing base-URI rebinding.
Refresh sink binding (Passed) — OAuth2Session::RefreshToken passes pinned refresh properties to OAuth2Util::FetchToken, closing secret-bearing endpoint rebinding.
Noncredential path compatibility (Passed) — RestCatalog::Make gates validation and pinning on nonempty credentials, preserving token-only and unauthenticated catalog behavior.
Regression behavior coverage (Passed) — rest_catalog_unit_test.cc asserts default pinning, invalid endpoint rejection, secret destination, and explicit trust opt-in behavior.
Formatting preserves semantics (Passed) — cmp matched whitespace-normalized reviewed and final files, preserving reviewed attack-path closure and legitimate behavior.
Patch whitespace integrity (Passed) — git diff HEAD --check reported no whitespace errors across all changed files, preserving legitimate source layout.
Finding:
acf_f8f907964600e5519354244212161700Patch:
arp_58d1a99827c52fa3a41aeaead8b257b3Base commit:
cda824400a9032b72850d92df507009da80cebe5Patch SHA-256:
0ca9ce3e7ea8ff2bc592befe8a95f80a163dcc2f4d45aa5b5e96e947c0da390e