{"id":18286,"date":"2020-03-19T10:44:01","date_gmt":"2020-03-19T18:44:01","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/powershell\/?p=18286"},"modified":"2020-03-23T10:24:01","modified_gmt":"2020-03-23T18:24:01","slug":"secret-management-preview-2-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/secret-management-preview-2-release\/","title":{"rendered":"Secret Management Preview 2 Release"},"content":{"rendered":"<p>Note this blog post is the third in a series on the releases of this module:<\/p>\n<ul>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/powershell\/secrets-management-development-release\/\">Secrets Management Development Release<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/powershell\/secrets-management-module-vault-extensions\/\">Secrets Management Module Vault Extensions<\/a><\/li>\n<\/ul>\n<p class=\"rich-diff-level-zero\"><span style=\"font-size: 12pt;\">We are excited to release a second preview of the Secret Management Module. Thanks to the tremendous feedback we received from the first preview release of this module, you will notice a number of breaking changes to the module. This release is still a preview release meaning that it is not feature complete, future releases will face breaking changes, and we are still iterating based on your feedback. It is important to also note that this version of the module is still Windows only as we are currently implementing Linux support which we hope to make available in the next preview release (and MacOS support after). Please note that because of the breaking changes this release requires a complete replacement of the Secret Management module and any extension modules. Additionally, any existing built in local vault secret can no longer be retrieved and must be re-saved.<\/span><\/p>\n<h2 class=\"rich-diff-level-zero\">How to Install Secret Management Preview 2<\/h2>\n<p class=\"rich-diff-level-zero\">If you did not install our first preview release, open any PowerShell console and run:<\/p>\n<p class=\"rich-diff-level-zero\"><code class=\"rich-diff-level-one\">Install-Module Microsoft.PowerShell.SecretManagement -AllowPrerelease<\/code><\/p>\n<p class=\"rich-diff-level-zero\">If you installed our first preview release you will want to first remove any secrets from the\u00a0<code class=\"rich-diff-level-one\">LocalDefaultVault<\/code>. Based on feedback we changed the naming convention for secrets stored in CredMan, therefore previous secrets stored in the local vault will no longer be visible after the new version of the module is installed. (Although the user can still view\/remove the old secrets via CredMan UI.) Next you will want to run\u00a0<code class=\"rich-diff-level-one\">Uninstall-Module Microsoft.PowerShell.SecretsManagement<\/code>, this extra step is a result of the change we made to the name of the module. Finally you can run the above command\u00a0<code class=\"rich-diff-level-one\">Install-Module Microsoft.PowerShell.SecretManagement -AllowPrerelease<\/code>\u00a0to install the latest preview release of the module.<\/p>\n<h2 class=\"rich-diff-level-zero\">Changes in Secret Management Preview 2<\/h2>\n<h3 class=\"rich-diff-level-zero\">New Module Name<\/h3>\n<p class=\"rich-diff-level-zero\">We have removed the plurality in the module name to <code class=\"rich-diff-level-one\">Mirosoft.PowerShell.SecretManagement<\/code>\u00a0in order to be consistent with the cmdlet name and to align with PowerShell naming conventions.<\/p>\n<h3 class=\"rich-diff-level-zero\">New Cmdlet Names<\/h3>\n<p class=\"rich-diff-level-zero\">In addition to renaming the module, we have also removed plurality in the cmdlets. The available cmdlets in the module are now:<\/p>\n<pre class=\"lang:ps decode:true \"># Registering extension vaults \r\nRegister-SecretVault\r\nGet-SecretVault\r\nUnregister-SecretVault \r\nTest-SecretVault # new cmdlet in this release \r\n\r\n# Accessing secrets \r\nSet-Secret # this cmdlet replaces Add-Secret \r\nGet-Secret \r\nGet-SecretInfo \r\nRemove-Secret<\/pre>\n<p>&nbsp;<\/p>\n<p class=\"rich-diff-level-zero\">You will notice we renamed the\u00a0<code class=\"rich-diff-level-one\">Add-Secret<\/code>\u00a0cmdlet to be\u00a0<code class=\"rich-diff-level-one\">Set-Secret<\/code>. This change was based on user feedback that this name better conveyed the intention of the cmldet.<\/p>\n<p class=\"rich-diff-level-zero\">You will also notice that we have added a\u00a0<code class=\"rich-diff-level-one\">Test-Vault<\/code>\u00a0cmdlet, this change allows vault extension owners to check that the vault is properly configured at registration time.<\/p>\n<h3 class=\"rich-diff-level-zero\">Other Changes<\/h3>\n<ul class=\"added rich-diff-level-zero\">\n<li class=\"rich-diff-level-one\">Set-Secret now has a default parameter set that takes SecureString secret input type. This way Set-Secret will always prompt safely for a SecureString. String secret types can still be passed via parameter or pipeline, but default will be SecureString.<\/li>\n<li>\n<pre class=\"lang:ps decode:true \">PS&gt; Set-Secret -Name MyStringToken\r\ncmdlet Set-Secret at command pipeline position 1 Supply values for the following parameters:\r\n SecureStringSecret: ********** \r\n\r\n# Set string secret directly \r\nSet-Secret -Name MyStringToken -Secret $token \r\nSet-Secret -Name MyStringToken -Secret 'MyToken' \r\n# Set string secret via pipeline \r\n$token | Set-Secret -Name MyStringToken -NoClobber<\/pre>\n<p>&nbsp;<\/li>\n<li class=\"rich-diff-level-one\">Added\u00a0<code>SecretInformation<\/code>\u00a0class used to return information from Get-SecretInfo in a uniform way.<\/li>\n<li class=\"rich-diff-level-one\">Changed CredMan naming prefix to\u00a0<code>ps:SecretName<\/code>.<\/li>\n<li class=\"rich-diff-level-one\">Added\u00a0<code>vaultName<\/code>\u00a0to all vault extension functions.<\/li>\n<li class=\"rich-diff-level-one\">Fixed\u00a0<code>additionalParameters<\/code>\u00a0parameter in SecretManagementExtension abstract classes.<\/li>\n<li class=\"rich-diff-level-one\">Fixed return byte[] bug in example test script extension.<\/li>\n<\/ul>\n<p class=\"rich-diff-level-zero\">In coordination with these changes we have also updated our tests and example scripts.<\/p>\n<h2 class=\"rich-diff-level-zero\">Next Steps<\/h2>\n<p class=\"rich-diff-level-zero\">As we move towards a GA release later this year, we are using a\u00a0<a class=\"rich-diff-level-one\" href=\"https:\/\/github.com\/PowerShell\/Modules\/milestone\/2\">GitHub Milestone<\/a>\u00a0to track issues we plan to fix. The two major work items that we are currently working toward are:<\/p>\n<ul class=\"added rich-diff-level-zero\">\n<li class=\"rich-diff-level-one\">Linux Support (via keyring)<\/li>\n<li class=\"rich-diff-level-one\">MacOS Support (via keychain)<\/li>\n<\/ul>\n<h2 class=\"rich-diff-level-zero\">Support and Feedback<\/h2>\n<p class=\"rich-diff-level-zero\">For support on the module, feedback, or reporting a bug, please open an issue in the PowerShell\/modules repo with \u201c(Secrets Management)\u201d specified in the issue title.<\/p>\n<p class=\"rich-diff-level-zero\">Sydney Smith, PowerShell Team<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note this blog post is the third in a series on the releases of this module: Secrets Management Development Release Secrets Management Module Vault Extensions We are excited to release a second preview of the Secret Management Module. Thanks to the tremendous feedback we received from the first preview release of this module, you will [&hellip;]<\/p>\n","protected":false},"author":2299,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-18286","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>Note this blog post is the third in a series on the releases of this module: Secrets Management Development Release Secrets Management Module Vault Extensions We are excited to release a second preview of the Secret Management Module. Thanks to the tremendous feedback we received from the first preview release of this module, you will [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/18286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/2299"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=18286"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/18286\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=18286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=18286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=18286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}