Revert serviceUrl allowlist (ADO 5310460)#545
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
isAllowedServiceUrland all serviceUrl hostname allowlist enforcement inServiceTokenValidatorand theHttpServerskip-auth path. - Removes the
additionalAllowedDomainsoption fromAppOptions/HttpServerOptionsand related wiring. - Removes
allowedServiceUrlsfromCloudEnvironmentpresets 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.
heyitsaamir
approved these changes
Apr 28, 2026
singhk97
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 proactiveConversationReferences, 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
additionalAllowedDomainsoption is a breaking change for anyone building frommain, which is not ideal but acceptable since no release has been cut. Reverting now buys time to discuss without breaking customers later.Removed
isAllowedServiceUrlhelperadditionalAllowedDomainsoption onAppOptionsandHttpServerOptions, plus plumbing throughApp->HttpServer->ServiceTokenValidatorCloudEnvironment.allowedServiceUrlsfield, per-cloud entries (Public/USGov/USGovDoD/China), andwithOverridesparameterHttpServer.authorizeadditionalAllowedDomains plumbing, cloud preset acceptance/rejection, wildcard, defensive copy, etc.)Preserved (other security work bundled into PR #515)
isCallToolResultfix inexternal/mcpPreserved (sovereign cloud, separate work)
CloudEnvironmentpresets,withOverrides,cloudFromName,cloudoption onApp, and thecloudparameter onServiceTokenValidatorare unchanged.Test plan
npm run buildclean (full workspace)npm run lintcleannpx jestinpackages/apps: 19 suites, 245 tests passtsc --noEmitclean forpackages/appsandpackages/apiexamples/echostarts and binds to port