Skip to content

Conversation

@gjsjohnmurray
Copy link
Contributor

This PR implements #196616 by adding SecretStorage.keys() behind a secretStorageKeys proposed API gate.

@gjsjohnmurray
Copy link
Contributor Author

/assign @TylerLeonhardt

gjsjohnmurray added a commit to gjsjohnmurray/vscode-extension-samples that referenced this pull request Jun 28, 2025
@gjsjohnmurray
Copy link
Contributor Author

https://github.com/gjsjohnmurray/vscode-extension-samples/tree/test-vscode-252804 provides a way of testing this by adding the following commands to authenticationprovider-sample:

  • AuthenticationProvider Sample: Add a Secret Keyed by Timestamp
  • AuthenticationProvider Sample: Show the Keys of Our Secrets
  • AuthenticationProvider Sample: Delete All Our Secrets

Run the first one or more times, then run the second to see the keys, then the third to delete them all.

@gjsjohnmurray
Copy link
Contributor Author

Any chance of getting this into this week's endgame?

@TylerLeonhardt
Copy link
Member

Im on vacation til the 17th so it won't make this endgame

get(key: string): Promise<string | undefined>;
set(key: string, value: string): Promise<void>;
delete(key: string): Promise<void>;
keys(): Promise<string[]>;
Copy link
Member

Choose a reason for hiding this comment

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

This has to be optional to start... because vscode.dev, github.dev, and maybe code serve-web & @vscode/test-web implement one of these providers and bring them in via:

readonly secretStorageProvider?: ISecretStorageProvider;

since they don't have an implementation today, we should assume that this keys is optional... and error accordingly.

Copy link
Member

Choose a reason for hiding this comment

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

I can probably easily implement this for vscode.dev... but github.dev I don't have control over... so no promises.

Copy link
Member

Choose a reason for hiding this comment

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

edit: we don't need to worry about serve-web because of:

? undefined /* with a remote without embedder-preferred storage, store on the remote */

Copy link
Member

Choose a reason for hiding this comment

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

edit: I don't think we need to worry about @vscode/test-web:
https://github.com/microsoft/vscode-test-web/blob/main/src/browser/main.ts#L266-L269

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have pushed an update. I hope I understood you correctly.

Copy link
Member

@TylerLeonhardt TylerLeonhardt Jul 17, 2025

Choose a reason for hiding this comment

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

I've made the change for vscode.dev so that should work (in insiders.vscode.dev)

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

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

I like it!

@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) July 16, 2025 16:02
@vs-code-engineering vs-code-engineering bot added this to the July 2025 milestone Jul 16, 2025
@TylerLeonhardt TylerLeonhardt merged commit 18cf806 into microsoft:main Jul 16, 2025
27 of 28 checks passed
@gjsjohnmurray gjsjohnmurray deleted the do-196616 branch July 16, 2025 16:56
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Aug 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants