PowerShell / SecretManagement

PowerShell module to consistent usage of secrets through different extension vaults
MIT License
317 stars 46 forks source link

Secrets not separate across multiple defined SecretStore type Vaults #161

Closed kaluaabyss closed 3 years ago

kaluaabyss commented 3 years ago

Working as intended / enhancement? If you register multiple vaults of type SecretStore, all secrets created/deleted in any specific named vault are updated across all vaults of that type.

Duplicated in 1.0.0 and 1.1.0-preview2:

Register-SecretVault -ModuleName Microsoft.PowerShell.SecretStore -Name DefaultSecretStore -DefaultVault
Register-SecretVault -ModuleName Microsoft.PowerShell.SecretStore -Name testvault
Set-Secret -Name 'test1' -Secret 'test1' -Vault testvault
Set-Secret -Name 'test2' -Secret 'test2' -Vault DefaultSecretStore

Get-SecretInfo Name Type VaultName


test1 String DefaultSecretStore test2 String DefaultSecretStore test1 String testvault test2 String testvault

Remove-Secret -Name 'test1' -Vault testvault

Get-SecretInfo Name Type VaultName


test2 String DefaultSecretStore test2 String testvault

Register-SecretVault -ModuleName Microsoft.PowerShell.SecretStore -Name testvault2

Get-SecretInfo Name Type VaultName


test2 String DefaultSecretStore test2 String testvault test2 String testvault2

kaluaabyss commented 3 years ago

I found this has been covered before in https://github.com/PowerShell/SecretManagement/issues/101