Skip to content

SSO between Apps in Windows#312144

Merged
sandy081 merged 6 commits intomainfrom
sandy081/old-gazelle
Apr 23, 2026
Merged

SSO between Apps in Windows#312144
sandy081 merged 6 commits intomainfrom
sandy081/old-gazelle

Conversation

@sandy081
Copy link
Copy Markdown
Member

No description provided.

sandy081 and others added 6 commits April 23, 2026 07:15
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 23, 2026 14:59
@sandy081 sandy081 enabled auto-merge (squash) April 23, 2026 14:59
@sandy081 sandy081 self-assigned this Apr 23, 2026
@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@TylerLeonhardt

Matched files:

  • src/vs/platform/secrets/common/secrets.ts

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the secrets storage layer to enable cross-app shared secrets on Windows, allowing specific secrets to be stored in StorageScope.APPLICATION_SHARED so they can be used for SSO between VS Code and another app (e.g., Sessions/Agents).

Changes:

  • Route reads/writes of a small allowlist of secret keys to StorageScope.APPLICATION_SHARED on Windows.
  • Add helper methods to centralize storage get/store logic for shared vs non-shared secrets.
  • Listen for secret changes from both APPLICATION and APPLICATION_SHARED storage scopes.
Show a summary per file
File Description
src/vs/platform/secrets/common/secrets.ts Adds Windows-only cross-app shared secret routing via APPLICATION_SHARED and wires change events for both scopes.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/platform/secrets/common/secrets.ts:210

  • For keys written to StorageScope.APPLICATION_SHARED, delete() and keys() still operate only on StorageScope.APPLICATION, which will leave shared secrets undeleted/unlisted. On Windows this can prevent extensions (e.g. GitHub auth) from actually deleting the secret, and due to APPLICATION_SHARED fallback-to-APPLICATION behavior it may require removing from both scopes to guarantee the secret is gone.
	private setValueInStorage(key: string, fullKey: string, value: string, storageService: IStorageService): void {
		if (isWindows && CROSS_APP_SHARED_SECRET_KEYS.includes(key)) {
			this._logService.trace(`[SecretStorageService] Setting value for cross-app shared secret: ${fullKey}`);
			storageService.store(fullKey, value, StorageScope.APPLICATION_SHARED, StorageTarget.MACHINE);
			return;
		}
		storageService.store(fullKey, value, StorageScope.APPLICATION, StorageTarget.MACHINE);
  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment on lines +196 to +202
private getValueFromStorage(key: string, fullKey: string, storageService: IStorageService): string | undefined {
if (isWindows && CROSS_APP_SHARED_SECRET_KEYS.includes(key)) {
this._logService.trace(`[SecretStorageService] Fetching value for cross-app shared secret: ${fullKey}`);
return storageService.get(fullKey, StorageScope.APPLICATION_SHARED);
}
return storageService.get(fullKey, StorageScope.APPLICATION);
}
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

The new cross-app secret routing to StorageScope.APPLICATION_SHARED (plus change notifications wired up for that scope) isn’t covered by the existing BaseSecretStorageService unit tests. Consider adding tests that (on Windows, or conditionally when isWindows is true) verify: (1) shared keys are stored/read from APPLICATION_SHARED, (2) onDidChangeSecret fires for APPLICATION_SHARED changes, and (3) deleting a shared key removes it so subsequent reads return undefined (including when a fallback value exists in APPLICATION).

This issue also appears on line 204 of the same file.

Copilot uses AI. Check for mistakes.
@sandy081 sandy081 merged commit eab5ecc into main Apr 23, 2026
39 checks passed
@sandy081 sandy081 deleted the sandy081/old-gazelle branch April 23, 2026 15:45
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 23, 2026
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.

3 participants