Skip to content

Wire remote app-server auth through the client#14853

Merged
etraut-openai merged 7 commits intomainfrom
etraut/app-server-ws-security
Mar 26, 2026
Merged

Wire remote app-server auth through the client#14853
etraut-openai merged 7 commits intomainfrom
etraut/app-server-ws-security

Conversation

@etraut-openai
Copy link
Collaborator

@etraut-openai etraut-openai commented Mar 16, 2026

For app-server websocket auth, support the two server-side mechanisms from
PR #14847:

  • --ws-auth capability-token --ws-token-file /abs/path
  • --ws-auth signed-bearer-token --ws-shared-secret-file /abs/path
    with optional --ws-issuer, --ws-audience, and
    --ws-max-clock-skew-seconds

On the client side, add interactive remote support via:

  • --remote ws://host:port or --remote wss://host:port
  • --remote-auth-token-env <ENV_VAR>

Codex reads the bearer token from the named environment variable and sends it
as Authorization: Bearer <token> during the websocket handshake. Remote auth
tokens are only allowed for wss:// URLs or loopback ws:// URLs.

Testing:

  • tested both auth methods manually to confirm connection success and rejection for both auth types

@etraut-openai
Copy link
Collaborator Author

@codex review

@etraut-openai
Copy link
Collaborator Author

@codex security review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: 4db9879e8b

View security finding report

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

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: f79c5a45ab

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

@etraut-openai etraut-openai force-pushed the etraut/app-server-ws-security branch from f79c5a4 to 4c9f62b Compare March 17, 2026 20:48
@etraut-openai etraut-openai changed the title Secured ws transport for app server by adding token Wire remote app-server auth through the client Mar 17, 2026
@etraut-openai
Copy link
Collaborator Author

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Some(AppServerSubcommand::GenerateInternalJsonSchema(gen_cli)) => {
codex_app_server_protocol::generate_internal_json_schema(&gen_cli.out_dir)?;

P2 Badge Reject remote flags for internal schema generation

app-server generate-internal-json-schema skips reject_remote_mode_for_subcommand, so --remote-auth-token is accepted on a non-interactive command and silently ignored. The new CLI behavior/messages state remote flags are interactive-only, so this is inconsistent and can mislead users into thinking the token was validated/applied.

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

@etraut-openai
Copy link
Collaborator Author

@codex security review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: 48595f092d

View security finding report

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

@etraut-openai
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Chef's kiss.

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

@etraut-openai
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Keep them coming!

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

@etraut-openai etraut-openai force-pushed the etraut/app-server-ws-security branch from 4731f1b to dad654e Compare March 18, 2026 22:26
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: dad654e276

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

etraut-openai added a commit that referenced this pull request Mar 18, 2026
etraut-openai added a commit that referenced this pull request Mar 20, 2026
etraut-openai added a commit that referenced this pull request Mar 20, 2026
@etraut-openai etraut-openai force-pushed the etraut/app-server-ws-security branch from 01dc602 to a168af4 Compare March 20, 2026 16:56
etraut-openai added a commit that referenced this pull request Mar 25, 2026
etraut-openai added a commit that referenced this pull request Mar 25, 2026
@etraut-openai etraut-openai force-pushed the etraut/app-server-ws-security branch from 217461b to d149ba4 Compare March 25, 2026 19:48
Copy link
Contributor

@fcoury fcoury left a comment

Choose a reason for hiding this comment

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

Looks good aside from those minor potential issues.

@etraut-openai etraut-openai force-pushed the etraut/app-server-ws-security branch from 770008b to 47a89da Compare March 26, 2026 03:19
@etraut-openai etraut-openai requested a review from fcoury March 26, 2026 04:04
@etraut-openai etraut-openai merged commit 1ff39b6 into main Mar 26, 2026
60 of 62 checks passed
@etraut-openai etraut-openai deleted the etraut/app-server-ws-security branch March 26, 2026 04:17
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2026
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.

2 participants