Skip to content

Casing issue between Set-Secret and Get-SecretΒ #4

@joalcorn

Description

@joalcorn

The secret name used in Set-Secret and Get-Secret gets converted to lowercase prior to adding the secret to the keychain. Get-SecretInfo does not alter case when getting the secret, causing the secret to not be found.
This is not mentioned in the module documentation, nor is the user warned when using Set-Secret.

Because it Get-Secret from the Microsoft.PowerShell.SecretManagement module invokes the Get-SecretInfo extension cmdlet from this module when looking for the secret, this causes the desired secret not to be found.

While the workaround for this is simple enough, Get-SecretInfo should be corrected to also perform case conversion prior to getting the secret, and either the end user should be warned when setting a secret that the secret name is being converted to lowercase, or this should be mentioned in this projects documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions