-
Notifications
You must be signed in to change notification settings - Fork 52
Implement Microsoft.PowerShell.SecretManagement extension #1074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Implement Microsoft.PowerShell.SecretManagement extension #1074
Conversation
@SteveL-MSFT Testing out the changes, I encountered the fact that most secret vault require some pre-authentication. In this case, it spawns another process and mentions: 2025-08-22T07:28:15.409628Z TRACE dsc_lib::dscresources::command_resource: 935: PID 14876: Get-Secret: C:\source\DSCv3\bin\debug\microsoft.powershell.secret.ps1:22:15 Does it make sense to add an additional argument to be passed along as |
fe1951b
to
1d6d6ba
Compare
I'm not sure I can think of a clean way to do this from within the existing data model for a configuration document to avoid requiring the user to perform initialization steps and documenting those. Arguably, we could specify something like The following snippet is just an example, not fully thought out: $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
metadata:
Microsoft.DSC:
extensions: # map where keys must be the extension type
Microsoft.PowerShell/SecretManagement:
enabled: true # default, users can explicitly disable
version: 1.2 # optionally pin to specific version
# Other DSC-specific stuff goes at the top-level of the map,
# so we can do validation/interpretation.
#
# Everything under options comes from the extension, which
# probably has to publish them as a JSON Schema in the manifest.
options: # map of options to pass to the extension
unlockCredential: "[parameters('secretStoreCred')]" This would enable in-document control / options for extensions. If we require extensions to publish their options as a JSON Schema, we can also use this model for incorporating extension options into your DSC settings/policy. I think we probably need to resolve extension options sooner than later, but I wouldn't block this PR on it. Probably, the correct (current) model would be to document that this extension requires you to invoke DSC from a PowerShell session where you have already used the |
I filed #1080 for handling extension options separately from this PR. |
5f01d9b
to
85cbaf5
Compare
Thanks, Mikey, for always providing well-explained and possible solutions to tackle the issue. Let's keep it open for now and see what the others think about it :) |
PR Summary
This pull request adds the
Microsoft.PowerShell.SecretManagement
extension.PR Context