Skip to content

Revert serviceUrl allowlist (ADO 5310460)#545

Merged
corinagum merged 1 commit into
mainfrom
cg/revert-serviceurl-allowlist
Apr 28, 2026
Merged

Revert serviceUrl allowlist (ADO 5310460)#545
corinagum merged 1 commit into
mainfrom
cg/revert-serviceurl-allowlist

Conversation

@corinagum

Copy link
Copy Markdown
Collaborator

Summary

Reverting the serviceUrl allowlist defense-in-depth feature before public release. Open design questions on the work item (default sovereign cloud domains, narrowing of *.botframework.com, applying to proactive ConversationReferences, consultation with APX) should be resolved before this becomes part of the public API surface.

This feature has not shipped in any release. Removing the public additionalAllowedDomains option is a breaking change for anyone building from main, which is not ideal but acceptable since no release has been cut. Reverting now buys time to discuss without breaking customers later.

Removed

  • isAllowedServiceUrl helper
  • additionalAllowedDomains option on AppOptions and HttpServerOptions, plus plumbing through App -> HttpServer -> ServiceTokenValidator
  • CloudEnvironment.allowedServiceUrls field, per-cloud entries (Public/USGov/USGovDoD/China), and withOverrides parameter
  • Service URL hostname check in the skip-auth path of HttpServer.authorize
  • All allowlist tests (additionalAllowedDomains plumbing, cloud preset acceptance/rejection, wildcard, defensive copy, etc.)

Preserved (other security work bundled into PR #515)

  • Scope validation (exact set membership)
  • isCallToolResult fix in external/mcp

Preserved (sovereign cloud, separate work)

CloudEnvironment presets, withOverrides, cloudFromName, cloud option on App, and the cloud parameter on ServiceTokenValidator are unchanged.

Test plan

  • npm run build clean (full workspace)
  • npm run lint clean
  • npx jest in packages/apps: 19 suites, 245 tests pass
  • tsc --noEmit clean for packages/apps and packages/api
  • Smoke test: examples/echo starts and binds to port

Copilot AI review requested due to automatic review settings April 28, 2026 19:31

Copilot AI 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.

Pull request overview

Reverts the (unreleased) serviceUrl allowlist defense-in-depth feature, removing the associated public configuration surface and internal validation/plumbing to keep the API stable while design questions are resolved.

Changes:

  • Removes isAllowedServiceUrl and all serviceUrl hostname allowlist enforcement in ServiceTokenValidator and the HttpServer skip-auth path.
  • Removes the additionalAllowedDomains option from AppOptions/HttpServerOptions and related wiring.
  • Removes allowedServiceUrls from CloudEnvironment presets and deletes the corresponding unit tests.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/apps/src/middleware/jwt-validation-middleware.ts Updates ServiceTokenValidator construction to match the reverted constructor signature.
packages/apps/src/middleware/auth/service-token-validator.ts Removes allowlist helper, constructor parameter, stored state, and runtime enforcement.
packages/apps/src/middleware/auth/service-token-validator.spec.ts Deletes allowlist-focused tests; updates sovereign cloud constructor calls.
packages/apps/src/http/http-server.ts Removes additionalAllowedDomains option/plumbing and skip-auth serviceUrl hostname validation.
packages/apps/src/http/http-server.spec.ts Simplifies module mocking and removes allowlist plumbing tests.
packages/apps/src/app.ts Removes additionalAllowedDomains from AppOptions and stops passing it to HttpServer.
packages/api/src/auth/cloud-environment.ts Removes allowedServiceUrls from CloudEnvironment type/presets and from withOverrides merging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@corinagum
corinagum merged commit 01ab1c9 into main Apr 28, 2026
11 checks passed
@corinagum
corinagum deleted the cg/revert-serviceurl-allowlist branch April 28, 2026 20:13
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.

4 participants