You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This article shows you how to use public certificates in Azure Spring Apps for your application. Your app might act as a client and access an external service that requires certificate authentication, or it might need to perform cryptographic tasks.
20
+
This article shows you how to use public certificates in Azure Spring Apps for your application. Your app might act as a client and access an external service that requires certificate authentication, or it might need to perform cryptographic tasks.
21
21
22
22
When you let Azure Spring Apps manage your TLS/SSL certificates, you can maintain the certificates and your application code separately to safeguard your sensitive data. Your app code can access the public certificates you add to your Azure Spring Apps instance.
23
23
@@ -32,22 +32,45 @@ You can choose to import your certificate into your Azure Spring Apps instance f
32
32
33
33
### Import a certificate from Key Vault
34
34
35
-
You need to grant Azure Spring Apps access to your key vault before you import your certificate using these steps:
35
+
You need to grant Azure Spring Apps access to your key vault before you import your certificate.
36
+
37
+
Azure Key Vault offers two authorization systems: [Azure role-based access control](../../role-based-access-control/overview.md) (Azure RBAC), which operates on Azure's [control and data planes](../../azure-resource-manager/management/control-plane-and-data-plane.md), and the *access policy model*, which operates on the data plane alone.
38
+
39
+
Use the following steps to grant access:
40
+
41
+
#### [Access policies](#tab/accessPolicies)
36
42
37
43
1. Sign in to the [Azure portal](https://portal.azure.com).
38
-
1. Select **Key vaults**, then select the Key Vault you import your certificate from.
39
-
1. In the left navigation pane, select **Access policies**, then select **Create**.
44
+
1. Select **Key vaults**, then select the key vault you import your certificate from.
45
+
1. In the navigation pane, select **Access policies**, then select **Create**.
40
46
1. Select **Certificate permissions**, then select **Get** and **List**.
41
47
42
48
:::image type="content" source="media/how-to-use-tls-certificate/grant-key-vault-permission.png" alt-text="Screenshot of the Azure portal that shows the Create an access policy page with Permission pane showing and Get and List permissions highlighted." lightbox="media/how-to-use-tls-certificate/grant-key-vault-permission.png":::
43
49
44
-
1. Under **Principal**, select your **Azure Spring Cloud Resource Provider**.
50
+
1. Under **Principal**, select **Azure Spring Cloud Resource Provider**.
45
51
46
52
:::image type="content" source="media/how-to-use-tls-certificate/select-service-principal.png" alt-text="Screenshot of the Azure portal that shows the Create an access policy page Principal tab with Azure Spring Cloud Resource Provider highlighted." lightbox="media/how-to-use-tls-certificate/select-service-principal.png":::
47
53
48
54
1. Select **Review + Create**, then select **Create**.
49
55
50
-
After you grant access to your key vault, you can import your certificate using these steps:
56
+
#### [RBAC](#tab/RBAC)
57
+
58
+
1. Sign in to the [Azure portal](https://portal.azure.com).
59
+
1. Select **Key vaults**, then select the key vault you import your certificate from.
60
+
1. In the navigation pane, select **Access control (IAM)**, then select **Add role assignment**.
61
+
1. Search for *Certificate*, then select the role named **Key Vault Certificate User**.
62
+
63
+
:::image type="content" source="media/how-to-use-tls-certificate/grant-key-vault-permission-rbac.png" alt-text="Screenshot of the Azure portal that shows the Add role assignment page with Key Vault Certificate User highlighted." lightbox="media/how-to-use-tls-certificate/grant-key-vault-permission-rbac.png":::
64
+
65
+
1. Under **Members**, select **Select members**. Search for *Azure Spring Cloud Resource Provider*, select the provider, and then select **Select**.
66
+
67
+
:::image type="content" source="media/how-to-use-tls-certificate/select-service-principal-rbac.png" alt-text="Screenshot of the Azure portal that shows the Add role assignment page with the Select members pane showing." lightbox="media/how-to-use-tls-certificate/select-service-principal-rbac.png":::
68
+
69
+
1. Select **Review + assign**.
70
+
71
+
---
72
+
73
+
After you grant access to your key vault, you can import your certificate using the following steps:
51
74
52
75
1. Go to your service instance.
53
76
@@ -59,7 +82,7 @@ After you grant access to your key vault, you can import your certificate using
59
82
60
83
1. Provide a value for **Certificate name**, select **Enable auto sync** if needed, and then select **Apply**. For more information, see the [Auto sync certificate](./how-to-custom-domain.md#auto-sync-certificate) section of [Map an existing custom domain to Azure Spring Apps](./how-to-custom-domain.md).
61
84
62
-
After you've successfully imported your certificate, you see it in the list of Public Key Certificates.
85
+
After yousuccessfully import your certificate, you see it in the list of Public Key Certificates.
63
86
64
87
> [!NOTE]
65
88
> The Azure Key Vault and Azure Spring Apps instances should be in the same tenant.
@@ -72,7 +95,7 @@ You can import a certificate file stored locally using these steps:
72
95
1. From the left navigation pane of your instance, select **TLS/SSL settings**.
73
96
1. Select **Upload public certificate** in the **Public Key Certificates** section.
74
97
75
-
After you've successfully imported your certificate, you see it in the list of Public Key Certificates.
98
+
After you successfully import your certificate, you see it in the list of Public Key Certificates.
For a Java application, you can choose **Load into trust store** for the selected certificate. The certificate is automatically added to the Java default TrustStores to authenticate a server in SSL authentication.
124
+
For a Java application, you can choose **Load into trust store** for the selected certificate. The certificate is automatically added to the Java default TrustStores to authenticate a server in TLS/SSL authentication.
102
125
103
126
The following log from your app shows that the certificate is successfully loaded.
0 commit comments