Skip to content

Improve ACP auth and origin defaults - #9886

Merged
jh-block merged 1 commit into
mainfrom
acp-origin-auth-improvements
Jul 1, 2026
Merged

Improve ACP auth and origin defaults#9886
jh-block merged 1 commit into
mainfrom
acp-origin-auth-improvements

Conversation

@jh-block

@jh-block jh-block commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator
  • Reject goose serve startup with no secret key defined, unless --dangerously-unauthenticated is passed
  • Tighten default allowed CORS origins to localhost-only, with --allowed-origin to override
  • Check and enforce origin on WebSocket connections

This finding was discovered by Project Loupe.

@jh-block
jh-block requested a review from DOsinga June 19, 2026 13:41
@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview deployed: https://pr-9886.goose-pr-previews-poc.pages.dev

@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: ab4acb3ca0

ℹ️ 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 crates/goose/src/acp/transport/mod.rs Outdated

@DOsinga DOsinga left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving — nice security hardening, and the tests genuinely exercise the origin/CORS behaviour. Confirmed the stdio path (goose acp) is untouched and still needs no secret, which is correct; the secret enforcement only applies to the network-exposed goose serve.

One thing worth addressing before merge (codex's P2 is right here): in the goosed path (crates/goose-server/src/commands/agent.rs) the merged app is still wrapped in an outer CorsLayer::new().allow_origin(Any). Since tower-http answers OPTIONS preflight at that outer layer before routing, the tightened ACP CORS defaults are effectively bypassed for goosed — arbitrary origins still get permissive CORS there. Could you either tighten that outer layer too or add a note on why it's out of scope for this PR?

@jh-block
jh-block force-pushed the acp-origin-auth-improvements branch 2 times, most recently from 4530d7b to 546bd99 Compare July 1, 2026 19:39

@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: 546bd992ea

ℹ️ 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 crates/goose-server/src/commands/agent.rs
@jh-block
jh-block force-pushed the acp-origin-auth-improvements branch from 546bd99 to 4ae194f Compare July 1, 2026 20:12

@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: 4ae194fa9e

ℹ️ 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 crates/goose-server/src/commands/agent.rs
@jh-block
jh-block force-pushed the acp-origin-auth-improvements branch from 4ae194f to 49a6b25 Compare July 1, 2026 20:21

@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: 49a6b25dfa

ℹ️ 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 crates/goose/src/acp/transport/mod.rs Outdated
@jh-block
jh-block force-pushed the acp-origin-auth-improvements branch from 49a6b25 to dc37602 Compare July 1, 2026 20:34
@jh-block
jh-block added this pull request to the merge queue Jul 1, 2026
Merged via the queue into main with commit a162a7f Jul 1, 2026
26 checks passed
@jh-block
jh-block deleted the acp-origin-auth-improvements branch July 1, 2026 22:30
lifeizhou-ap added a commit that referenced this pull request Jul 2, 2026
* main:
  Revert "Bedrock model discovery and validation" (#10176)
  Improve ACP auth and origin defaults (#9886)
  Bedrock model discovery and validation (#9997)
  chore(deps): bump actions-rust-lang/setup-rust-toolchain from 1.16.1 to 1.17.0 (#10052)
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