Revert serviceUrl allowlist (ADO 5310460)#453
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Reverts the previously introduced serviceUrl allowlist/validator feature prior to public release, removing the related public API/config surface while keeping other security hardening work (per the PR description) separate.
Changes:
- Removes
ServiceUrlValidatorand its unit tests. - Removes
AdditionalAllowedDomainsfromAppOptionsandTeamsSettings, and deletes the inboundServiceUrlallowlist enforcement inApp.Process. - Removes
CloudEnvironment.AllowedServiceUrlsand the related constructor/WithOverridesplumbing.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/Microsoft.Teams.Apps.Tests/ServiceUrlValidatorTests.cs | Deletes unit tests for the reverted validator feature. |
| Libraries/Microsoft.Teams.Extensions/Microsoft.Teams.Extensions.Configuration/Microsoft.Teams.Apps.Extensions/TeamsSettings.cs | Removes config binding/apply support for AdditionalAllowedDomains. |
| Libraries/Microsoft.Teams.Apps/ServiceUrlValidator.cs | Deletes the validator implementation. |
| Libraries/Microsoft.Teams.Apps/AppOptions.cs | Removes the public AdditionalAllowedDomains option from the app options surface. |
| Libraries/Microsoft.Teams.Apps/App.cs | Removes allowlist storage/warn log and the IsAllowed enforcement in request processing. |
| Libraries/Microsoft.Teams.Api/Auth/CloudEnvironment.cs | Removes AllowedServiceUrls and associated constructor/override parameters. |
💡 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
ServiceUrlValidatorclass andServiceUrlValidatorTestsAppOptions.AdditionalAllowedDomains,App._additionalAllowedDomainsfield, related warn log, and theIsAllowedcheck inApp.ProcessTeamsSettings.AdditionalAllowedDomainsand itsApply()assignmentCloudEnvironment.AllowedServiceUrlsproperty, per-cloud entries (Public/USGov/USGovDoD/China), constructor parameter, andWithOverridesparameterPreserved (other security work bundled into PR #418)
DevToolsPlugin,TeamsValidationSettings)Preserved (sovereign cloud, separate work)
CloudEnvironmentpresets,WithOverrides,FromName,AppOptions.Cloud, and the per-cloudBots.Token.ActiveBotScope/ActiveGraphScope/TokenServiceUrlwiring inAppare unchanged.Note on related open PRs
PR #450 (
Tighten AdditionalAllowedDomains API contract) and PR #413 (sovereign cloud next/core, which carries this plumbing) are intentionally left open for separate decisions.Test plan
dotnet buildclean (0 errors, 5 unrelated pre-existing warnings)dotnet testnet10.0 passes (net8.0 testhost aborted on local machine due to missing SDK, environmental, not code)Samples/Samples.Echostarts and binds to port