繁体   English   中英

有没有办法将证书从 azure 密钥库导入 azure web 应用程序中的 Z303CB0EF5825EDB9082DAZ61?

[英]Is there a way to import certificate from azure keyvault to azure web app in .NET?

在 azure cli 中,我们有此命令可从 keyvault.az 将证书导入/绑定到 azure 应用程序

webapp config ssl bind --certificate-thumbprint {certificate-thumbprint} --name MyWebapp --resource-group MyResourceGroup --ssl-type SNI

我在 .NET 中找不到等效的库来做同样的事情(我使用的是 C#)。 有人可以帮忙吗?

微软有一个流畅的 API 可以访问所有 Azure 服务。

通过访问应用服务 API ,您应该能够为其分配现有证书

谢谢@john,你的提示对我来说已经足够了。 您指出的方法有助于 ssl 与现有证书绑定。 但我需要在我的 azure web 应用程序中导入证书在此处输入图像描述 . 有任何 API 吗?

var webApp1 = azure.WebApps
                .GetById(<your resouce Id as a string>)
                .Update()
                .DefineSslBinding()
                .ForHostname(<host name as a string>)
                .WithPfxCertificateToUpload(<certificate as a string>,
                    <password as a string>)
                .WithSniBasedSsl()
                .Attach()
                .Apply();

暂无
暂无

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

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