Skip to content

fix: respect explicit WebSocket Authorization with workload identity - #1309

Merged
markstuart-oai merged 1 commit into
mainfrom
codex/websocket-explicit-auth
Oct 30, 2026
Merged

markstuart-oai merged 1 commit into
mainfrom
codex/websocket-explicit-auth

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

When a WebSocket connection supplies an explicit Authorization header, the Java
client still asks its configured workload identity provider for a token. An
otherwise unnecessary token exchange can then prevent the connection from
opening. A rejected connection can also invalidate a managed token even though
the caller supplied the rejected header.

Only obtain and invalidate a managed token when workload identity supplied that
connection's Authorization header. Keep the existing refresh behavior when the
client uses managed authentication. Tests cover caller headers across Responses,
Realtime and Live connections, plus both explicit-header and managed-token
handshake failures.

Validation: all 9 tests in WebSocketWorkloadIdentityTest pass on the public
base; :openai-java-core:lintKotlin and git diff --check pass.

@markstuart-oai
markstuart-oai marked this pull request as ready for review October 30, 2026 04:08
@markstuart-oai
markstuart-oai requested a review from a team as a code owner October 30, 2026 04:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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 ✅ Completed 2026-10-30T05:38:57.847840Z 1184e80 Manual request
🔒 Security Review ✅ Completed 2026-10-30T05:39:24.798035Z 1184e80 Manual request
ℹ️ 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.

@markstuart-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 1184e80c95

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 1184e80c95

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@markstuart-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 1184e80c95

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 1184e80c95

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed 1184e80 with coordinator and independent static passes.

Explicit WebSocket Authorization bypasses workload token exchange and managed-token invalidation. Managed credential acquisition and 401 invalidation retain their existing path.

Hosted CI: {'SUCCESS': 14}. No candidate code or tests were executed locally.

@markstuart-oai
markstuart-oai added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit c4ea628 Oct 30, 2026
14 checks passed
@openai-sdks openai-sdks Bot mentioned this pull request Oct 30, 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.

3 participants