Azure / Azure/azure-powershell

Add-AzureKeyVaultKey, support encrypted .pem file format and .pfx with only a private key

Open
#7,120 8 comments 0 reactions 1 assignee Assigned to @BethanyZhou View on GitHub
act-identity-squad Azure PS Team customer-reported feature-request KeyVault Tracking
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.