我正在尝试将证书从一个密钥保管库复制到另一个密钥保管库而不将其保留在本地计算机上。我看起来像Azure KeyVault CLI只支持基于文件的证书导入,如下所示:
# download cert
az keyvault certificate download --file $certFileName --vault-name $sourceAkv -n $certName
# import cert
az keyvault certificate import --file $certFileName --vault-name $destAkv -n $certName
有没有办法传递对象或字符串?在Azure Powershell模块中,这是可能的:
Import-AzureKeyVaultCertificate -VaultName $DestinationVaultName -Name $CertificateName -CertificateString $secretText.SecretValueText
思考?
似乎没有办法像你说的那样只将证书上下文导入Azure Keyvault。它只有依赖于证书文件的参数。