繁体   English   中英

Azure - Key Vault 中的应用服务证书为空白 - 无法使用 powershell / az cli 下载 pfx

[英]Azure - App Service Certificate in Key Vault is blank - Unable to download the pfx using powershell / az cli

我创建了一个 Azure 应用服务证书 - 通配符,并将其链接到 Azure 密钥库,也通过域验证完成。 现在我想将此证书导出为 PFX 并在其他组件中使用。

但是,如果我 go 到 Key Vault 机密,它将显示为空白。 这是空白的秘密

我尝试运行 powershell 脚本来导出/下载证书,但不起作用。

The powershell script to export the cert from Key Vault is taken from https://azure.github.io/AppService/2017/02/24/Creating-a-local-PFX-copy-of-App-Service-Certificate.html As this used the retired AzureRM module, I found a more up to date code which uses Azure Powershell scripts @ https://raw.githubusercontent.com/Anitalex/poshscripts/a7e6c8153ab9f9979792eb8c07497cd42e39778d/azure/ExportWebAppCertificate.ps1 But similar set of steps..

我已尝试在应用服务证书中重新键入证书,但问题仍然存在?

啊...这是似乎没有在任何地方记录的解决方案..

我不知道这是否是唯一的方法,但看起来是这样 - 我们必须

  1. 创建 Azure WebApp(或 AppService)
  2. 开启 TLS/SSL
  3. 设置身份 - 系统分配/用户分配
  4. 向 KeyVault 授予此身份所需的权限 [不适用于 Azure 基于角色的访问控制(预览版)]
  5. Go 到“私钥证书 (.pfx)”选项卡
  6. 使用“导入应用服务证书” - 您需要从下拉列表中输入 select 您的证书。
  7. 成功导入证书后,pfx 将填充到 Key Vault 证书中,现在您可以下载了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM