Azure / Azure/azure-powershell
Add-AzureKeyVaultKey, support encrypted .pem file format and .pfx with only a private key
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
Only pfx and byok file formats are supported in AzureRM version 6.8.1.
The Azure Portal supports importing keys from encrypted .pem files. It would be great if this powershell commandlet would get feature parity with the portal.
If I create a pfx file with only the private key and no certificates, then that pfx can be used through the Azure Portal to import my private key. Yet, using that same .pfx without certificates through the Add-AzureKeyVaultKey CmdLet yields an exception (because the x509certificate2 class is used to parse the pfx file, which expects a certificate in the pfx file).
So, to use this commandlet I need to generate a selfsigned certificate and package that with my private key in a pfx.
Instead it would be easier if the commandlet accepts an encrypted private key in a .pem file and/or a pfx file with only a private key and no certificates.
Contributor guide
Assessment
This issue has not been assessed yet.