Exporting an ACME certificate from Windows to Azure Key Vault
This guide assumes you're already familiar with and using simple-acme. In this guide we will explain the steps taken to issue a certificate directly to your Azure Key Vault, using an Azure service principal and simple-acme.
1
**Prerequisites:** - If you're new to simple-acme, see this guide: [link](https://trustzone.com/knowledge-base/acme-pro-with-iis-and-pre-validation/) - TZ-preconfigured ACME Pro client (Guide:[Link](https://trustzone.com/knowledge-base/accessing-the-tz-pre-configured-acme-pro-client/)) - You can also leverage this app registration for Azure DNS validation: [Link](https://trustzone.com/knowledge-base/dns-validation-with-azure-dns/)
Setting up App Registration
Simple -acme (or any other ACME client) will need credentials in Azure to access the key vault. For this purpose the guide will utilize an Azure app registration to provide these credentials in a secure manner.
2
To create the app registration log into the Azure Portal and select "**Microsoft Entra ID**"
3
In the menu on the left hand side, expand the "**Manage**" tab and click on “**App registrations**”
4
Then click on "**New registration**"
5
Register a new application with a **name** that identifies the credential. In this case the credentials is used for our simple-acme client. \ **Tip:** Redirect URI does **not** need to be filled.
6
Then hit "**Register**" in the bottom left corner.
7
Save the “**Application (client) ID**” and "**Directory (tenant) ID**". These values will be needed when setting up the ACME client.
8
We also need a secret.\ To do this, click on "**Certificates & secrets**"
9
Click "**New client secret**"
10
Then give the secret a **description**, and a suiting **expiration date** in the pane on the right hand side.\ Click "Add" in the bottom of the screen.
11
Copy and save the "**Value**" to a secure location. **Tip:** You will not be able to retrieve this value when you leave the site, meaning that you will have to create a new one.
12
The app registration should now be complete and you should have the following values saved in a **secure** location: - Application (client) ID - Directory (tenant) ID - Client Secret value
Setting permissions on the key vault
Now that we've created an app, we need to give it permissions to access the key vault.
13
Start by clicking "**Key Vaults**"
14
Select the vault you need to access.
15
Select "**Access control (IAM)**"
16
Click "**Add**"
17
Search for "**Key Vault**"\ Select "**Key Vault Certificates Officer**"\ Click "**Next**"
18
Click "**Select members**"
19
**Search** for your app, and then **select it**.\ Click "**Select**" in the bottom of the screen.
20
Click "**Review + assign**" twice.
21
Now, your Azure Service Principal is setup and ready for use with simple-acme.
Ordering the certificate
22
Next, please start simple-acme and start ordering with **full options**\ \ To keep this guide somewhat "short", we will be skipping a lot of the baseline steps in simple-acme. If you need help with simple-acme, please refer to the "**Prerequisites**" section of this guide.
23
In this guide we are using pre-validation, however, you can leverage the same Azure Service Principal to use both Azure DNS validation, as well as Azure Key Vault for storing.
24
Here we select option: "**Store in Azure Key Vault**"
25
Next, select your Azure environment. In most cases, this will be "**AzureCloud**"
26
Press "**n**", to select no.
27
Then it's time to input your Azure credentials.
28
Then input the **name** of your Azure Vault.
29
Then input the desired name for the cert.
30
If you need to store the certificate in another place, choose the corresponding option. For the purpose of this guide, we do not take any other storing steps, nor do we take any other installation steps.
31
If everything has been set up correctly, you should now be able to see the certificate in your Azure Key Vault.
Exporting an ACME certificate from Windows to Azure Key Vault
This guide assumes you're already familiar with and using simple-acme. In this guide we will explain the steps taken to issue a certificate directly to your Azure Key Vault, using an Azure service principal and simple-acme.
1
**Prerequisites:** - If you're new to simple-acme, see this guide: [link](https://trustzone.com/knowledge-base/acme-pro-with-iis-and-pre-validation/) - TZ-preconfigured ACME Pro client (Guide:[Link](https://trustzone.com/knowledge-base/accessing-the-tz-pre-configured-acme-pro-client/)) - You can also leverage this app registration for Azure DNS validation: [Link](https://trustzone.com/knowledge-base/dns-validation-with-azure-dns/)
Setting up App Registration
Simple -acme (or any other ACME client) will need credentials in Azure to access the key vault. For this purpose the guide will utilize an Azure app registration to provide these credentials in a secure manner.
2
To create the app registration log into the Azure Portal and select "**Microsoft Entra ID**"
3
In the menu on the left hand side, expand the "**Manage**" tab and click on “**App registrations**”
4
Then click on "**New registration**"
5
Register a new application with a **name** that identifies the credential. In this case the credentials is used for our simple-acme client. \ **Tip:** Redirect URI does **not** need to be filled.
6
Then hit "**Register**" in the bottom left corner.
7
Save the “**Application (client) ID**” and "**Directory (tenant) ID**". These values will be needed when setting up the ACME client.
8
We also need a secret.\ To do this, click on "**Certificates & secrets**"
9
Click "**New client secret**"
10
Then give the secret a **description**, and a suiting **expiration date** in the pane on the right hand side.\ Click "Add" in the bottom of the screen.
11
Copy and save the "**Value**" to a secure location. **Tip:** You will not be able to retrieve this value when you leave the site, meaning that you will have to create a new one.
12
The app registration should now be complete and you should have the following values saved in a **secure** location: - Application (client) ID - Directory (tenant) ID - Client Secret value
Setting permissions on the key vault
Now that we've created an app, we need to give it permissions to access the key vault.
13
Start by clicking "**Key Vaults**"
14
Select the vault you need to access.
15
Select "**Access control (IAM)**"
16
Click "**Add**"
17
Search for "**Key Vault**"\ Select "**Key Vault Certificates Officer**"\ Click "**Next**"
18
Click "**Select members**"
19
**Search** for your app, and then **select it**.\ Click "**Select**" in the bottom of the screen.
20
Click "**Review + assign**" twice.
21
Now, your Azure Service Principal is setup and ready for use with simple-acme.
Ordering the certificate
22
Next, please start simple-acme and start ordering with **full options**\ \ To keep this guide somewhat "short", we will be skipping a lot of the baseline steps in simple-acme. If you need help with simple-acme, please refer to the "**Prerequisites**" section of this guide.
23
In this guide we are using pre-validation, however, you can leverage the same Azure Service Principal to use both Azure DNS validation, as well as Azure Key Vault for storing.
24
Here we select option: "**Store in Azure Key Vault**"
25
Next, select your Azure environment. In most cases, this will be "**AzureCloud**"
26
Press "**n**", to select no.
27
Then it's time to input your Azure credentials.
28
Then input the **name** of your Azure Vault.
29
Then input the desired name for the cert.
30
If you need to store the certificate in another place, choose the corresponding option. For the purpose of this guide, we do not take any other storing steps, nor do we take any other installation steps.
31
If everything has been set up correctly, you should now be able to see the certificate in your Azure Key Vault.