Skip to content

Commit e599cf2

Browse files
authored
Merge pull request #282005 from guitarsheng/guitarsheng/keyvault-with-rbac-enable
add keyvault with rbac enable
2 parents 804215d + ecb79e3 commit e599cf2

File tree

5 files changed

+33
-10
lines changed

5 files changed

+33
-10
lines changed

articles/spring-apps/enterprise/how-to-use-tls-certificate.md

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: KarlErickson
66
ms.author: karler
77
ms.service: azure-spring-apps
88
ms.topic: how-to
9-
ms.date: 10/20/2023
9+
ms.date: 08/01/2024
1010
ms.custom: devx-track-java
1111
---
1212

@@ -17,7 +17,7 @@ ms.custom: devx-track-java
1717
1818
**This article applies to:** ✔️ Basic/Standard ✔️ Enterprise
1919

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.
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.
2121

2222
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.
2323

@@ -32,22 +32,45 @@ You can choose to import your certificate into your Azure Spring Apps instance f
3232

3333
### Import a certificate from Key Vault
3434

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)
3642

3743
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**.
4046
1. Select **Certificate permissions**, then select **Get** and **List**.
4147

4248
:::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":::
4349

44-
1. Under **Principal**, select your **Azure Spring Cloud Resource Provider**.
50+
1. Under **Principal**, select **Azure Spring Cloud Resource Provider**.
4551

4652
:::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":::
4753

4854
1. Select **Review + Create**, then select **Create**.
4955

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:
5174

5275
1. Go to your service instance.
5376

@@ -59,7 +82,7 @@ After you grant access to your key vault, you can import your certificate using
5982

6083
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).
6184

62-
After you've successfully imported your certificate, you see it in the list of Public Key Certificates.
85+
After you successfully import your certificate, you see it in the list of Public Key Certificates.
6386

6487
> [!NOTE]
6588
> 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:
7295
1. From the left navigation pane of your instance, select **TLS/SSL settings**.
7396
1. Select **Upload public certificate** in the **Public Key Certificates** section.
7497

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.
7699

77100
## Load a certificate
78101

@@ -98,7 +121,7 @@ X509Certificate cert = (X509Certificate) factory.generateCertificate(is);
98121

99122
### Load a certificate into the trust store
100123

101-
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.
102125

103126
The following log from your app shows that the certificate is successfully loaded.
104127

171 KB
Loading
34.5 KB
Loading
7.92 KB
Loading
118 KB
Loading

0 commit comments

Comments
 (0)