Simplify certificate management of on-prem IIS server with Azure Arc & Azure Key Vault VM extension
One common question which I’ve come across is certificate management for web servers. Usually when servers are hosted on Azure there are ways like storing certificates and secrets in Azure Key vault is a viable solution. I’ve come across customers who’re running servers in hybrid and few servers would still remain on-premises because of dependencies. For these web servers managing certificates is a costly affair. Common practice which I’ve seen is admin sharing the certificate with application team on some file share. This has few disadvantages.
- Storing the certificate in file share or on email.
- Based on the number of application team a lot of team gets access to certificates.
- Manually applying updated certificates once the expiry is near also finding which all servers this certificate is being used is a pain if you’ve a big environment with lots of web service.
One better way to handle this scenario is to Store certificate in Azure Key vault centrally and Arc Enable the web server. One last step which will do the magic is Azure Key vault VM Extension. Which can be enabled on Arc Server as extension.
This setup provides the advantages below.
- All the certificates are stored centrally in Azure Key Vault which is protected.
- No application team has got manual access to certificates, on-prem server will pull the certificate based on the managed identity assigned via Azure Arc.
- Once the cert expiry is near Admin/app team need to just goto Azure Key Vault and update the certificate with the latest version. Azure Key vault VM Extension will pull the latest certificate and apply the same to the website.
For auto renewal of certificate, we’ll need to enable IIS Rebind.
This is how Arc VM Extension looks like when it’s enabled.
Assigning permission to Arc server to fetch the certificate from keyvault.
You can use access policy on Keyvault as well, it’s supported.
Versions of the certificate/new certificate can be uploaded from key vault certificate blade and looks like below.
If you’re renewing certificates and wanted to see if certificates are getting pulled down properly or not you can check error logs located here.
C:\ProgramData\Guestconfig\extension_logs\Microsoft.Azure.Keyvault.keyvaultforwindows
If you’re running Azure VM similar thing can be achieved :
https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/key-vault-windows
Cert Rebind in IIS:
https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-85/certificate-rebind-in-iis85
Published on:
Learn moreRelated posts
Confluent Cloud Releases Managed V2 Kafka Connector for Azure Cosmos DB
This article was co-authored by Sudhindra Sheshadrivasan, Staff Product Manager at Confluent. We’re excited to announce the General Availabili...
Now in Public Preview: Azure Functions Trigger for Azure Cosmos DB for MongoDB vCore
The Azure Cosmos DB trigger for Azure Functions is now in public preview—available for C# Azure Functions using Azure Cosmos DB for MongoDB vC...
Now Available: Migrate from RU to vCore for Azure Cosmos DB for MongoDB via Azure Portal
We are thrilled to introduce a cost-effective, simple, and efficient solution for migrating from RU-based Azure Cosmos DB for MongoDB to vCore...
Generally Available: Seamless Migration from Serverless to Provisioned Throughput in Azure Cosmos DB
We are excited to announce the general availability (GA) of a highly requested capability in Azure Cosmos DB: the ability to migrate from serv...
Public Preview: Shape and Control Workloads with Throughput Buckets in Azure Cosmos DB
Imagine your application is processing customer checkouts in real-time, while a background process synchronizes data for reporting. Suddenly, ...
Microsoft Entra ID integration with Azure Cosmos DB for MongoDB (vCore)
Security is no longer a nice-to-have—it’s a foundational requirement for any cloud-native architecture. As organizations adopt managed databas...
How to use the Azure AI Foundry connector in Power Apps
Yesterday I looked at how to use the Azure AI Foundry connector in Power Automate today I'm doing the same within Power Apps, creating a Q...
DiskANN and Filtered Vector Search are Now Generally Available in Azure Cosmos DB for MongoDB (vCore)
We’re excited to announce general availability of DiskANN and Filtered Vector Search on Azure Cosmos DB for MongoDB (vCore), starting with M30...
Now in Preview: Azure Cosmos DB Fleets
We’re excited to announce the preview of Azure Cosmos DB fleets. Azure Cosmos DB fleets address common challenges that developers face when bu...