Make extensions.gallery.authProvider policy-controlled - #333837
Open
Michael Cummings (MSFT) (mcumming) wants to merge 2 commits into
Open
Make extensions.gallery.authProvider policy-controlled#333837Michael Cummings (MSFT) (mcumming) wants to merge 2 commits into
Michael Cummings (MSFT) (mcumming) wants to merge 2 commits into
Conversation
Adds an `ExtensionGalleryAuthProvider` policy to the `extensions.gallery.authProvider` setting so administrators can manage which authentication provider is used for the Extensions Marketplace, matching the neighbouring `extensions.gallery.serviceUrl` setting. Since the setting is a string enum, the policy declares one localized `enumDescriptions` entry per value, reusing the existing nls keys. Regenerated build/lib/policies/policyData.jsonc via `npm run export-policy-data`. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Michael Cummings (MSFT) (mcumming)
September 1, 2026 19:08
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: None
What changed in this PR
Adds enterprise policy control for the Private Marketplace authentication provider.
Changes:
- Registers
ExtensionGalleryAuthProvideras an Extensions policy. - Regenerates synchronized policy data with both provider options.
| File | Description |
|---|---|
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts |
Adds policy metadata and localized enum descriptions. |
build/lib/policies/policyData.jsonc |
Adds the generated policy catalog entry. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sandeep Somavarapu (sandy081)
approved these changes
Sep 1, 2026
Sandeep Somavarapu (sandy081)
self-requested a review
September 2, 2026 10:35
Sandeep Somavarapu (sandy081)
approved these changes
Sep 2, 2026
Ladislau Szomoru (lszomoru)
approved these changes
Sep 2, 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.
Follow-up to #325331 — makes the marketplace auth provider setting admin-manageable.
Why
#325331 added the
extensions.gallery.authProvidersetting (github|microsoft) to select how VS Code authenticates against a configured Private Marketplace. The setting shipped without a policy binding, so an administrator who managesextensions.gallery.serviceUrlby policy has no matching way to pin the auth provider — the two settings that together define marketplace access were only half manageable.This adds the missing policy so
ExtensionGalleryAuthProvidercan be set alongside the existingExtensionGalleryServiceUrlpolicy.What changes
extensions.contribution.ts— adds apolicyblock to theextensions.gallery.authProviderregistration, mirroring theextensions.gallery.serviceUrlpolicy directly above it. NameExtensionGalleryAuthProvider,PolicyCategory.Extensions,minimumVersion: '1.137'. It reuses the setting's existinglocalizekeys for the description and both enum descriptions, so no new strings are introduced.build/lib/policies/policyData.jsonc— regenerated. This file is not hand-edited; it was produced bynpm run export-policy-dataper.github/skills/policy-and-managed-settings/.StringEnumPolicy.from()requireslocalization.enumDescriptionsto be present and exactly as long asenum, which is why both enum descriptions are declared explicitly.renderJsonValue()/renderProfileValue()useenum[0]as the ADMX/profile default —githubis first, matching the setting's owndefault: 'github'.minimumVersionis1.137from the rootpackage.json(1.137.0), consistent with the other in-flight policies already at1.137.Testing
npm run typecheck-client— cleannode --test build/lib/test/policyConversion.test.ts— 10/10, including "should successfully parse the checked-in policyData.jsonc"node build/lib/policies/exportPolicyData.ts --check— "Policy data is synchronized", the same path the blockingpolicyExport.integrationTest.tsuses. Re-running the export was idempotent (no unrelated churn).The setting keeps
included: false, so this is inert for anyone not configuring a Private Marketplace.Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com