Is it possible to refer to a certificate in Azure Key Vault via a file name?

拥有回忆 提交于 2019-12-10 14:13:42

问题


In the scenario for this question I am using a library that takes a certificate path as a parameter.

Does that mean that it is not possible for me to store my certificate in Key Vault?


回答1:


Does that mean that it is not possible for me to store my certificate in Key Vault?

It is possible, but you have to give it a Name (key) to access it.

When you add/import x.509 certificates to Azure Key Vault Certificates, you give it a name (which acts as a unique key for that certificate), and you access that certificate by that name.

More info here: https://blogs.technet.microsoft.com/kv/2016/09/26/get-started-with-azure-key-vault-certificates/

Now, with regards to your other question, I am assuming you are wondering how to access a certificate from an Azure function. In your other question, you have this:

ApiSettings["SigningCertPath"]

And you indicated, you are using a (3rd party) library which picks the signing certificate path, and presumably loads that certificate. I do not know how your (3rd party) library works, or if it even works with Azure Key Vault. But it appears your library is loading the cert from a file. You did not mention if you still would like to do it that way.

But as alternative, you can load/import your certificate into your Function App (Platform features > SSL). Besides taht, you also need to add this entry to the Application Settings (on Azure portal): key WEBSITE_LOAD_CERTIFICATES and the value of *. This loads all certificates in your SSL bindings and into your Function App's certificate store. Then your function can read/get the certificate as you would get it from a local certificate store.

You can do the above instead of storing your certs in Key Vault. But you can also have all your other certs in Key Vault and only store the client certificate you need to access Key Vault from within your function.



来源:https://stackoverflow.com/questions/52397660/is-it-possible-to-refer-to-a-certificate-in-azure-key-vault-via-a-file-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!