PowerShell / SecretManagement

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

Set/Add/New secret should be separate cmdlets #218

Open dbramblett opened 4 months ago

dbramblett commented 4 months ago

Summary of the new feature / enhancement

The use of 'Set' instead of 'New' for the verb to create a secret doesn't seem intuitive to me, at least in the context of the descriptions provided by Get-Verb.

'New' creates a resource, 'Add' Adds a resource to a container or attaches an item to another item. 'Set' replaces data or creates a resource.

It seems to me that 'Set-Secret' here is combining all three verbs under the aegis of one verb.

If it were me, I'd look for the following. 'New-Secret' to create the secret, 'Add-Secret' to add it to the store. 'Set-Secret' to alter an existing secret.

These would make more sense to me than having a single cmdlet to do all three. 'Add-Secret' also auto-implies a 'Remove-Secret' and vice versa.

Proposed technical implementation details (optional)

No response

OtterKring commented 2 months ago

I would like to add to this asking for Set-Secret to NOT remove the metadata of an existing secret. It should really only set a new secret value.