Windows secret store - no secret #1510
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new DSC v3 PowerShell-script-based resource to manage the Microsoft.PowerShell.SecretStore vault configuration on Windows, with a bundled manifest and Pester coverage to exercise dsc config get/set/test scenarios.
Changes:
- Introduces
Microsoft.PowerShell/WindowsSecretStoreresource script implementing Get/Set/Test for SecretStore configuration. - Adds a v3 resource manifest defining execution and an embedded JSON schema for resource properties.
- Adds Windows-only Pester tests that apply and validate none-auth and password-auth configurations via
dsc config.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| resources/windows_secretstore/windows_secretstore.ps1 | Implements the resource logic (Get/Set/Test) and error/trace handling, including a Reset-SecretStore fallback path. |
| resources/windows_secretstore/windows_secretstore.dsc.resource.json | Registers the resource entrypoint and defines the embedded schema for supported properties/outputs. |
| resources/windows_secretstore/test/windows_secretstore.config.tests.ps1 | Adds end-to-end Pester tests using dsc config commands for none-auth and password-auth cases. |
| resources/windows_secretstore/.project.data.json | Adds build packaging metadata to copy the script and manifest for Windows builds. |
…PowerShell-DSC-3.0 into windows_secret_store
|
@SteveL-MSFT this is ready |
|
@mimachniak I think this would be better as a PR to https://github.com/PowerShell/secretstore since it requires SecretStore to work |
The same as for PSGetresources you mean ? |
|
In general, if the resource is for an open source project, my preference is that the resource is part of that project and not part of this repo since it requires that project to work anyways. |
Introduces windows_secretstore.ps1, a DSC v3 resource script that manages the configuration of the Microsoft.PowerShell.SecretStore vault using the standard Get/Set/Test pattern.
What's Changed
Get – Retrieves the current SecretStore configuration (authentication, passwordTimeout, interaction, scope) and optionally unlocks the store with a provided password.
Set – Applies the desired configuration via Set-SecretStoreConfiguration. Falls back to Reset-SecretStore when running in a non-interactive session or when transitioning from None to Password authentication mode.
Test – Compares the current configuration against the desired state and returns _inDesiredState in the output JSON.