feat(auth): integrate X.509 SDK clients - #936
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Castiron custom codeMixed files: 53 → 63 10 newly customized · 0 customizations removed · 2 existing customizations changed · 0 generated baselines changed Compared
51 existing customizations unchanged
11 more in the full report. A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload the exact patch produced by this run (requires repository access): gh run download 32915061907 --repo openai/openai-java \
--name castiron-custom-code-32915061907-1 --dir /tmp/castiron-custom-code-32915061907-1
git apply --stat /tmp/castiron-custom-code-32915061907-1/custom-code.patch
cat /tmp/castiron-custom-code-32915061907-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 04e7cf883c700e75ab72a34fcaf701bcf7b441c1 9a3ac279fa8a56edc9df884f923c777707c105c7
python3 scripts/castiron/custom_code_report.py report \
--base 04e7cf883c700e75ab72a34fcaf701bcf7b441c1 \
--head 9a3ac279fa8a56edc9df884f923c777707c105c7 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-9a3ac279fa8a
cat /tmp/castiron-custom-code-9a3ac279fa8a/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9603588c79
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
Reviewed the stacked client integration, provider isolation, fixed-origin transport, request headers, lifecycle, and sync/async dispatch. In addition to the existing unresolved cancellation and builder findings, the token-exchange leg currently bypasses the caller’s effective request timeout.
9603588 to
90412a6
Compare
51351c5 to
04e7cf8
Compare
90412a6 to
9a3ac27
Compare
57b2130
into
codex/x509-java-03-exchange-contract
## Summary - introduce a single retry/authentication orchestrator for X.509 requests while preserving the ordinary-client retry path unchanged - cache exchanged bearer tokens with expiry skew, single-flight refresh, rejected-generation invalidation, and one bounded 401 replay - propagate request deadlines, cancellation, stream close, and client close through authentication, backoff, transport calls, request bodies, responses, parsing, and logging - preserve exact client/pipeline ownership across sync/async views, reusable builders, generated `Unit` endpoints, and raw-response continuations - add installed-JAR documentation, a runnable example/runtime probe, and a protected opt-in live X.509 smoke workflow ## Compatibility and security boundaries - ordinary non-X.509 construction and retry/completion behavior remains on the pre-existing code path - X.509 remains fixed to the attested transport and fixed auth/API origins introduced by the earlier stack layers - credentials remain bearer-only at the API boundary and are never added to logs, fixtures, examples, or default test output - cleanup helpers act only on internal pipeline-owned markers; ordinary raw-response ownership remains unchanged - public/source compatibility was verified against both baseline and proposed API manifests ## Validation - focused sync/async X.509 lifecycle matrix: passed, including token races, cancellation, deadlines, retries, 401 replay, builder/view ownership, request/response cleanup, logging, parsing, streams, and ordinary-client regressions - repository lint: passed - full `scripts/test` graph with Steady: passed, including R8 and ProGuard artifacts - Java 21 runtime compatibility probe: passed for core, OkHttp, Bedrock, and runtime providers - API/source breaking-change detector: passed for baseline and proposed public APIs - staged secret-pattern scan and `git diff --check`: passed - Castiron custom-code budget: 1668 of 2000 lines, 332 lines headroom; ratchet unchanged - first review cycle: two independent agents clean after all findings were fixed; mandatory thermo-nuclear review clean - second clean-room review cycle: two fresh independent agents clean on the exact frozen 49-file diff (`1e5bba26e91a638915bfa509e87adee10b598c5d92bd23ae54a98a504a4e9fe6`) ## Stack 1. #929 — executable raw-wire oracle (merged) 2. #934 — fixed-alias direct mTLS transport capability 3. #935 — identity metadata and exact token exchange 4. #936 — minimal sync/async client integration with fixed origins and exclusive auth 5. this PR — lifecycle, cache/single-flight, 401 rotation, deadline/cancellation ownership, installed-JAR docs, and protected live E2E Stacked on #936.
Summary
x509Builderentry points backed only by caller-attestedX509TransportSecurity and ownership boundaries
https://mtls.api.openai.com/v1; the exchange origin remainshttps://mtls.auth.openai.com/oauth/tokenClientOptionsowns the real API clientValidation
Stack
Stacked on #935.