Skip to content

fix: restrict ADK Web cross-origin defaults#1322

Open
lethanhsang188 wants to merge 1 commit into
google:mainfrom
lethanhsang188:fix-adk-web-origin-policy
Open

fix: restrict ADK Web cross-origin defaults#1322
lethanhsang188 wants to merge 1 commit into
google:mainfrom
lethanhsang188:fix-adk-web-origin-policy

Conversation

@lethanhsang188

@lethanhsang188 lethanhsang188 commented Jul 3, 2026

Copy link
Copy Markdown

Summary

  • Default ADK Web CORS origins to an empty list instead of allowing every origin.
  • Apply configured CORS origins to the /run_live WebSocket endpoint instead of hard-coding wildcard origins.
  • Add regression coverage for default-deny and explicit-origin behavior.

Tests

  • ./mvnw -pl dev -Dtest=AdkWebCorsConfigTest,WebSocketConfigTest test
  • ./mvnw -pl dev -Dtest=AdkWebServerTest,AdkWebCorsConfigTest,WebSocketConfigTest test
  • ./mvnw -pl dev clean test

@lethanhsang188 lethanhsang188 force-pushed the fix-adk-web-origin-policy branch from 214f794 to dcdd6fc Compare July 3, 2026 11:40
@hemasekhar-p

Copy link
Copy Markdown
Contributor

Hi @lethanhsang188, thank you for your contribution! We appreciate you taking the time to submit this pull request. As per contribution policy, please ensure your PR consists of a single commit. Could you please change your commits accordingly?

@hemasekhar-p hemasekhar-p self-assigned this Jul 10, 2026
@hemasekhar-p hemasekhar-p added the waiting on reporter Waiting for reaction by reporter. Failing that, maintainers will eventually closed it as stale. label Jul 10, 2026
@lethanhsang188 lethanhsang188 force-pushed the fix-adk-web-origin-policy branch from c2a52fd to d67bd77 Compare July 10, 2026 12:41
@lethanhsang188

lethanhsang188 commented Jul 10, 2026

Copy link
Copy Markdown
Author

Thanks for pointing this out. I rebased the branch onto the latest main and squashed the PR to a single commit (d67bd777).

Local verification:

  • ./mvnw -pl dev -Dtest=AdkWebCorsConfigTest,WebSocketConfigTest test
  • ./mvnw -pl dev -Dtest=AdkWebServerTest,AdkWebCorsConfigTest,WebSocketConfigTest test
  • ./mvnw -pl dev clean test

All passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting on reporter Waiting for reaction by reporter. Failing that, maintainers will eventually closed it as stale.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants