From 343bd936c253443fc34880f8fc7c5644b07166ba Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Wed, 18 Oct 2023 14:50:24 -0500 Subject: [PATCH] Add note about case-sensitivity --- .../get-started/using-secretstore.md | 16 +++++++++++++++- .../Set-Secret.md | 14 +++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/reference/docs-conceptual/SecretManagement/get-started/using-secretstore.md b/reference/docs-conceptual/SecretManagement/get-started/using-secretstore.md index 4cf41cd..89a00f6 100644 --- a/reference/docs-conceptual/SecretManagement/get-started/using-secretstore.md +++ b/reference/docs-conceptual/SecretManagement/get-started/using-secretstore.md @@ -1,6 +1,6 @@ --- description: How to install and use the SecretManagement and SecretStore modules -ms.date: 06/28/2023 +ms.date: 10/18/2023 title: Get started with the SecretStore module --- # Get started with the SecretStore module @@ -76,6 +76,20 @@ Name Type VaultName TestSecret String SecretStore ``` +## Notes + +When you run `Set-Secret` with the **Name** parameter to specify the name of the secret, the cmdlet +calls `GetSecret()` that's implemented by the vault extension. `Set-Secret` passes through the name +as provided by the user. The vault extension looks up the secret by that name. If `GetGecret()` +returns a match, `Set-Secret` overwrites the secret unless you use the **NoClobber** parameter. The +vault extension always writes the secret information it receives. + +It's up to the vault extension implementation to decide whether or not to use a case-sensitive +comparison on the name. For example, secret names in the **Microsoft.PowerShell.SecretStore** +extension vault are case-insensitive. If the name you pass to `Set-Secret` differs only by case with +the name of an existing secret in a SecretStore vault, the name is overwritten with the new value +you provided. + ## Related links - [Register-SecretVault][02] diff --git a/reference/ps-modules/Microsoft.PowerShell.SecretManagement/Set-Secret.md b/reference/ps-modules/Microsoft.PowerShell.SecretManagement/Set-Secret.md index e5e14dc..132e664 100644 --- a/reference/ps-modules/Microsoft.PowerShell.SecretManagement/Set-Secret.md +++ b/reference/ps-modules/Microsoft.PowerShell.SecretManagement/Set-Secret.md @@ -1,7 +1,7 @@ --- external help file: Microsoft.PowerShell.SecretManagement.dll-Help.xml Module Name: Microsoft.PowerShell.SecretManagement -ms.date: 05/31/2022 +ms.date: 10/18/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.secretmanagement/set-secret?view=ps-modules&wt.mc_id=ps-gethelp schema: 2.0.0 --- @@ -290,4 +290,16 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES +When you run `Set-Secret` with the **Name** parameter to specify the name of the secret, the cmdlet +calls `GetSecret()` that's implemented by the vault extension. `Set-Secret` passes through the name +as provided by the user. The vault extension looks up the secret by that name. If `GetGecret()` +returns a match, `Set-Secret` overwrites the secret unless you use the **NoClobber** parameter. The +vault extension always writes the secret information it receives. + +It's up to the vault extension implementation to decide whether or not to use a case-sensitive +comparison on the name. For example, secret names in the **Microsoft.PowerShell.SecretStore** +extension vault are case-insensitive. If the name you pass to `Set-Secret` differs only by case with +the name of an existing secret in a SecretStore vault, the name is overwritten with the new value +you provided. + ## RELATED LINKS