Closed SteveL-MSFT closed 3 years ago
Issue-Label Bot is automatically applying the label question
to this issue, with a confidence of 0.82. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Thanks @SteveL-MSFT we aren't convinced that this is the right thing for SecretManagement however as a work around we could make our conversion patterns more available to the extension authors...will leave it open now for more discussion
Closing as resolved, but would be happy to re-open if there is more discussion on this issue.
While writing an extension for KeyChain, the bulk of my code is to handle the various supported types and convert them to a string so that I can store the in KeyChain using the
security
command line tool. I would think that many if not most extensions don't do anything special with the various types and just transform them to a string form to store.Perhaps a flag in the extension module manifest can declare that the extension only handles opaque strings and then
Set-Secret
andGet-Secret
within the extension only handles a string. SecretManagement itself can encode the string to know the original type and handle the conversion to and from without the extension knowing anything about that. The additional benefit is that if additional types are supported in the future, only SecretManagment needs to handle them and not the extension.Also, in this model, the extension would not implement
Get-SecretInfo
as the info (likeType
) is embedded within the string, so SecretManagement just needs a way to enumerate all secrets from the extension and handle creating the SecretInformation objects.