Skip to content

feat(auth): add caller-attested X.509 transport capability - #2428

Open
jbeckwith-oai wants to merge 2 commits into
mainfrom
codex/x509-transport-capability
Open

feat(auth): add caller-attested X.509 transport capability#2428
jbeckwith-oai wants to merge 2 commits into
mainfrom
codex/x509-transport-capability

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

  • Add an isolated, preview openai/auth/x509-transport entrypoint for one explicitly caller-attested Node.js Undici Agent or ProxyAgent.
  • Freeze and privately brand each opaque transport generation; snapshot its dispatcher; reject unsupported runtimes, executable getters, JavaScript proxies, unknown options, plaintext targets, and per-request dispatcher replacement without examining Undici private state.
  • Keep Undici optional for ordinary SDK consumers and verify installed-package CommonJS/ESM behavior with the optional peer both absent and present.
  • Exercise genuine direct mTLS and independently authenticated HTTPS CONNECT, including distinct proxy/workload certificate authorities, certificate fingerprints, proxy credential isolation, and post-construction option mutation.

This is PR 2 of 5, following #2417. Certificate stability, safe proxy TLS separation, and fresh-dispatcher rotation are application attestations—not claims that transport identity cryptographically proves certificate selection. OAuth exchange, OpenAI client integration, credential caching, and lifecycle policy remain explicitly out of scope.

Verification

  • pnpm install --frozen-lockfile --ignore-scripts
  • pnpm lint
  • pnpm exec tsc --noEmit
  • pnpm build
  • node --experimental-strip-types scripts/test-packed-package.ts — CommonJS, ESM, TypeScript 4.9/current, browser-safe source navigation, and optional Undici absent/present
  • Node 22.15.1, 22.22.0, 24.16.0, and 26.2.0: all 30 focused X.509 and real-wire conformance tests pass
  • env NODE_USE_ENV_PROXY=0 CI=1 ./scripts/test --testNamePattern='^(?!.*(?:pre-opened readable original inode|original held inode)).*$'4,064 handwritten tests passed; two pre-existing Linux-only inode cases skipped on macOS; 559 generated tests and 12 snapshots passed
  • Exact-head Codex Security diff scan a3ac2b08-df37-44b8-9ba1-e105c884df5e — complete changed-source coverage, zero findings

@jbeckwith-oai
jbeckwith-oai requested a review from a team as a code owner August 20, 2026 01:13
@openai-sdks

openai-sdks Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

237/237 SDK tests passed in 9.179s for Node SDK PR #2428.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 136ms
tests/chat-completions-create.test.ts ✅ Passed 167ms
tests/chat-completions-stream.test.ts ✅ Passed 113ms
tests/files-content-binary.test.ts ✅ Passed 95ms
tests/files-create-multipart.test.ts ✅ Passed 116ms
tests/files-list-pagination.test.ts ✅ Passed 117ms
tests/initialize-config.test.ts ✅ Passed 111ms
tests/instance-isolation.test.ts ✅ Passed 111ms
tests/models-list.test.ts ✅ Passed 104ms
tests/responses-background-lifecycle.test.ts ✅ Passed 241ms
tests/responses-body-method-errors.test.ts ✅ Passed 258ms
tests/responses-cancel-timeout.test.ts ✅ Passed 212ms
tests/responses-cancel.test.ts ✅ Passed 178ms
tests/responses-compact-retries.test.ts ✅ Passed 202ms
tests/responses-compact.test.ts ✅ Passed 167ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 73ms
tests/responses-create-advanced.test.ts ✅ Passed 117ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.056s
tests/responses-create-errors.test.ts ✅ Passed 148ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 93ms
tests/responses-create-retries.test.ts ✅ Passed 166ms
tests/responses-create-stream-failures.test.ts ✅ Passed 163ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 2.132s
tests/responses-create-stream-wire.test.ts ✅ Passed 2.331s
tests/responses-create-stream.test.ts ✅ Passed 99ms
tests/responses-create-terminal-states.test.ts ✅ Passed 153ms
tests/responses-create-timeout.test.ts ✅ Passed 202ms
tests/responses-create.test.ts ✅ Passed 100ms
tests/responses-delete.test.ts ✅ Passed 126ms
tests/responses-input-items-errors.test.ts ✅ Passed 264ms
tests/responses-input-items-list.test.ts ✅ Passed 479ms
tests/responses-input-items-options.test.ts ✅ Passed 83ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 225ms
tests/responses-input-tokens-count.test.ts ✅ Passed 149ms
tests/responses-malformed-inputs.test.ts ✅ Passed 1.669s
tests/responses-not-found-errors.test.ts ✅ Passed 234ms
tests/responses-parse.test.ts ✅ Passed 172ms
tests/responses-retrieve-retries.test.ts ✅ Passed 212ms
tests/responses-retrieve.test.ts ✅ Passed 186ms
tests/responses-stored-method-errors.test.ts ✅ Passed 415ms
tests/retry-behavior.test.ts ✅ Passed 3.034s
tests/sdk-error-shape.test.ts ✅ Passed 294ms

View OkTest run #32321890430

SDK merge (f77d37a89625) · head (acab1ae910df) · base (a0d68cc53125) · OkTest (2b1bdfd25e98)

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

34 mixed files remain; 0 existing customizations changed.

Compared a0d68cc53125acab1ae910df. Generated baselines verified.

34 existing customizations unchanged
  • api.md
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py
  • src/client.ts
  • src/resources/audio/transcriptions.ts
  • src/resources/audio/translations.ts
  • src/resources/beta/assistants.ts
  • src/resources/beta/beta.ts
  • src/resources/beta/index.ts
  • src/resources/beta/responses/internal-base.ts
  • src/resources/beta/responses/responses.ts
  • src/resources/beta/threads/index.ts
  • src/resources/beta/threads/runs/index.ts
  • src/resources/beta/threads/runs/runs.ts
  • src/resources/beta/threads/threads.ts
  • src/resources/chat/completions/completions.ts
  • src/resources/chat/completions/index.ts
  • src/resources/conversations/index.ts
  • src/resources/embeddings.ts
  • src/resources/files.ts
  • src/resources/fine-tuning/checkpoints/permissions.ts
  • src/resources/images.ts
  • src/resources/responses/internal-base.ts
  • src/resources/responses/responses.ts
  • src/resources/skills/skills.ts
  • src/resources/skills/versions/versions.ts
  • src/resources/vector-stores/file-batches.ts
  • src/resources/vector-stores/files.ts
  • src/resources/webhooks/index.ts
  • src/resources/webhooks/webhooks.ts
  • tests/api-resources/embeddings.test.ts
  • tests/api-resources/responses/responses.test.ts
  • tests/lib/data-residency.test.ts

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 32321890281 --repo openai/openai-node \
  --name castiron-custom-code-32321890281-1 --dir /tmp/castiron-custom-code-32321890281-1
git apply --stat /tmp/castiron-custom-code-32321890281-1/custom-code.patch
cat /tmp/castiron-custom-code-32321890281-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin a0d68cc53125c2cb82eab31271b8984b8d65d4b2 acab1ae910dfd724a6f3471cbe7e2b500155ced0
python3 scripts/castiron/custom_code_report.py report \
  --base a0d68cc53125c2cb82eab31271b8984b8d65d4b2 \
  --head acab1ae910dfd724a6f3471cbe7e2b500155ced0 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-acab1ae910df
cat /tmp/castiron-custom-code-acab1ae910df/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b2ffa2c910

ℹ️ 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".

Comment thread src/internal/auth/x509-transport-capability.ts Outdated
Comment thread src/internal/auth/x509-transport-capability.ts Outdated
Comment thread package.json
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 20, 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
📝 Code Review 🔄 Running since 2026-08-20T01:25:49.103567Z 1db8103 New commits
🔒 Security Review 🔄 Running since 2026-08-20T01:25:49.282605Z 1db8103 New commits
ℹ️ 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.

@jbeckwith-oai
jbeckwith-oai force-pushed the codex/x509-transport-capability branch from 1db8103 to acab1ae Compare August 20, 2026 01:40
@jbeckwith-oai jbeckwith-oai changed the title Add explicit caller-attested X.509 transport capability feat(auth): add caller-attested X.509 transport capability Aug 20, 2026
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