PowerShell / SecretManagement

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

[Feature Request] Support String[] and hashtable as Metadata name-value pair "value" types #111

Closed JustinGrote closed 3 years ago

JustinGrote commented 3 years ago

It is very common to have an array of strings as a metadata type such as individual tags, and a hashtable/dictionary of string values such as name-value pair tags.

The hashtable can have the values cast to [string] to avoid object issues, and nested hashtables would not be supported

While both of these can be implemented with string (delimited values for string[] and json for hashtable), they represent a burden to the user to have to do their own data transformation after-the-fact.

SydneyhSmith commented 3 years ago

Thanks @JustinGrote we do not restrict types for metadata so you could include support for String[] on a individual vault implementation or you can use PowerShell serialization toString as a workaround

JustinGrote commented 3 years ago

@SydneyhSmith Looking at the code it looks like you are correct, let me go back to my implementation and see if it was something on my side.

JustinGrote commented 3 years ago

Further testing and I can't reproduce the issue it seems, I've tried string arrays, pscredential objects, etc. and they all seem to come out fine. Must have been me, apologies!