Add a cmdlet to get expected registration setting for a certain provider.
Currently, when you register an external vault, you have to use the -VaultParameters settings, which is great because it is flexible. For that same reason, it make it impossible to know what parameter to pass without referring to some documentation.
It would be nice to be able to get a vault parameter hashtable of all the available settings that can be passed down. Something like
# Return a hashtable of the expected VaultParameters
$Settings = Get-SecretVaultRegistrationSettings -Module 'Az.Keyvault'
could return for instance the parameters expected for a new vault registration for that provider.
For an az keyvault, you would get the following hashtables stored in the $settings variable
That way, you wouldn't have to necessarily check the documentation for each providers (provided you are familiar with the parameter name) to register a new vault.
As this module gain interest and the number of secret providers grow, it might be a useful addition.
edit:
Just an additional thought.
Maybe the object retunned could be a class so parameter types could be enforced The class could be implemented with an interface to force a [Hashtable]Settings property, that the provider would use to convert the class property values to the proper hashtable format accepted by Register-SecretVault
Add a cmdlet to get expected registration setting for a certain provider.
Currently, when you register an external vault, you have to use the
-VaultParameters
settings, which is great because it is flexible. For that same reason, it make it impossible to know what parameter to pass without referring to some documentation.Proposed technical implementation details (optional)
It would be nice to be able to get a vault parameter hashtable of all the available settings that can be passed down. Something like
could return for instance the parameters expected for a new vault registration for that provider. For an az keyvault, you would get the following hashtables stored in the
$settings
variableThen, all you would do is :
That way, you wouldn't have to necessarily check the documentation for each providers (provided you are familiar with the parameter name) to register a new vault.
As this module gain interest and the number of secret providers grow, it might be a useful addition.
edit: Just an additional thought. Maybe the object retunned could be a class so parameter types could be enforced The class could be implemented with an interface to force a [Hashtable]Settings property, that the provider would use to convert the class property values to the proper hashtable format accepted by
Register-SecretVault