Skip to content

API Review: Origin Configuration API#5511

Open
chetanpandey1266 wants to merge 17 commits intomainfrom
user/chetanpandey/TrustedOriginNewApproach
Open

API Review: Origin Configuration API#5511
chetanpandey1266 wants to merge 17 commits intomainfrom
user/chetanpandey/TrustedOriginNewApproach

Conversation

@chetanpandey1266
Copy link
Contributor

This pull request introduces a new specification for origin configuration support in WebView2, enabling applications to apply different security and feature policies based on the trust level of content origins. The changes provide APIs for designating origin configurations and configuring feature access and security settings per origin, addressing previous limitations around uniform policy enforcement.

Origin Configuration API and Feature Management:

  • Added APIs to CoreWebView2Profile for creating, setting, and retrieving feature settings for origin configurations, allowing fine-grained control over security and feature policies.
  • Defined new interfaces and enums (ICoreWebView2StagingProfile3, ICoreWebView2StagingOriginConfigurationFeatureSetting, and COREWEBVIEW2_ORIGIN_CONFIGURATION_FEATURE) to represent origin-specific feature configurations, including AccentColor and EnhancedSecurityMode.

Usage Examples and API Details:

  • Provided C++ and .NET/WinRT code samples demonstrating how to set and get origin configuration feature settings, including support for wildcard origin patterns.
  • Documented API details for both C++ and .NET/WinRT, specifying method signatures and usage for managing origin configuration features.

@chetanpandey1266 chetanpandey1266 added the API Proposal Review WebView2 API Proposal for review. label Feb 5, 2026
/// is particularly useful for protecting against zero-day exploits and reducing attack
/// surface. When enabled for an origin, that origin will have Enhanced Security Mode
/// applied; when disabled, normal security mode is used.
/// Enhanced security mode can be configured globally via EnhancedSecurityModeLevel API on profile.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For configuring Enhanced Security Mode globally, the API is in discussion and might change. Will update this document based on that

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

Labels

API Proposal Review WebView2 API Proposal for review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant