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
Copy file name to clipboardExpand all lines: articles/spring-apps/expose-apps-gateway-end-to-end-tls.md
+48-25Lines changed: 48 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,15 +48,15 @@ To configure Application Gateway in front of Azure Spring Apps, use the followin
48
48
Next, use the following commands to define variables for the resource group and virtual network you created as directed in [Deploy Azure Spring Apps in a virtual network](./how-to-deploy-in-azure-virtual-network.md). Customize the values based on your real environment. When you define `SPRING_APP_PRIVATE_FQDN`, remove `https://` from the URI.
@@ -107,8 +107,8 @@ Next, adapt the policy JSON as shown in the following example, indicating the `s
107
107
After you've finished updating the policy JSON (see [Update Certificate Policy](/rest/api/keyvault/certificates/update-certificate-policy/update-certificate-policy)), you can create a self-signed certificate in Key Vault by using the following commands:
@@ -123,20 +123,32 @@ az keyvault certificate create \
123
123
Traffic will enter the application deployed on Azure Spring Apps using the public domain name. To configure your application to listen to this host name and do so over HTTPS, use the following commands to add a custom domain to your app:
# get the object id for the Azure Spring Apps Domain-Management Service Principal:
136
-
ASADM_OID=$(az ad sp show --id 03b39d0f-4213-4864-a245-b1476ec03169 --query objectId --output tsv)
140
+
export ASADM_OID=$(az ad sp show \
141
+
--id 03b39d0f-4213-4864-a245-b1476ec03169 \
142
+
--query objectId \
143
+
--output tsv)
137
144
138
145
# allow this Service Principal to read and list certificates and secrets from Key Vault:
139
-
az keyvault set-policy -g $KV_RG -n $KV_NAME --object-id $ASADM_OID --certificate-permissions get list --secret-permissions get list
146
+
az keyvault set-policy \
147
+
--resource-group $KV_RG \
148
+
--name $KV_NAME \
149
+
--object-id $ASADM_OID \
150
+
--certificate-permissions get list \
151
+
--secret-permissions get list
140
152
141
153
# add custom domain name and configure TLS using the certificate:
142
154
az spring certificate add \
@@ -157,7 +169,7 @@ az spring app custom-domain bind \
157
169
The Azure Application Gateway to be created will join the same virtual network as--or peered virtual network to--the Azure Spring Apps service instance. First create a new subnet for the Application Gateway in the virtual network using `az network vnet subnet create`, and also create a Public IP address as the Frontend of the Application Gateway using `az network public-ip create`.
Application Gateway will need to be able to access Key Vault to read the certificate. To do so, it will use a User-assigned [Managed Identity](../active-directory/managed-identities-azure-resources/overview.md). Create the Managed Identity by using the following command:
APPGW_IDENTITY_OID=$(az ad sp show --id $APPGW_IDENTITY_CLIENTID --query objectId --output tsv)
200
+
export APPGW_IDENTITY_CLIENTID=$(az identity show \
201
+
--resource-group $RESOURCE_GROUP \
202
+
--name $APPGW_IDENTITY_NAME \
203
+
--query clientId \
204
+
--output tsv)
205
+
export APPGW_IDENTITY_OID=$(az ad sp show \
206
+
--id $APPGW_IDENTITY_CLIENTID \
207
+
--query objectId \
208
+
--output tsv)
190
209
```
191
210
192
211
## Set policy on Key Vault
@@ -207,9 +226,13 @@ az keyvault set-policy \
207
226
Create an application gateway using `az network application-gateway create` and specify your application's private fully qualified domain name (FQDN) as servers in the backend pool. Make sure to use the user-assigned Managed Identity and to point to the certificate in Key Vault using the certificate's Secret ID. Then update the HTTP setting using `az network application-gateway http-settings update` to use the public host name.
Copy file name to clipboardExpand all lines: articles/spring-apps/expose-apps-gateway-tls-termination.md
+31-20Lines changed: 31 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,15 +47,15 @@ To configure Application Gateway in front of Azure Spring Apps in a private VNET
47
47
Next, use the following commands to define variables for the resource group and virtual network you created as directed in [Deploy Azure Spring Apps in a virtual network](how-to-deploy-in-azure-virtual-network.md). Replace the *\<...>* placeholders with real values based on your actual environment. When you define `SPRING_APP_PRIVATE_FQDN`, remove `https://` from the URI.
@@ -72,10 +72,10 @@ az account set --subscription $SUBSCRIPTION
72
72
Traffic will enter the application deployed on Azure Spring Apps using the public domain name. To configure your application to listen to this host name over HTTP, use the following commands to add a custom domain to your app, replacing the *\<...>* placeholders with real values:
@@ -89,7 +89,7 @@ az spring app custom-domain bind \
89
89
The application gateway to be created will join the same virtual network as the Azure Spring Apps service instance. First, create a new subnet for the application gateway in the virtual network, then create a public IP address as the frontend of the application gateway, as shown in the following example.
Your application gateway will need to be able to access Key Vault to read the certificate. To do this, the application gateway will use a user-assigned managed identity. For more information, see [What are managed identities for Azure resources?](../active-directory/managed-identities-azure-resources/overview.md). Create the managed identity by using the following command, replacing the *\<...>* placeholder:
Then, use the following command to fetch the `objectId` for the managed identity. This value will be used later on to give rights to access the certificate in Key Vault.
APPGW_IDENTITY_OID=$(az ad sp show --id $APPGW_IDENTITY_CLIENTID --query objectId --output tsv)
120
+
export APPGW_IDENTITY_CLIENTID=$(az identity show \
121
+
--resource-group $RESOURCE_GROUP \
122
+
--name $APPGW_IDENTITY_NAME \
123
+
--query clientId \
124
+
--output tsv)
125
+
export APPGW_IDENTITY_OID=$(az ad sp show \
126
+
--id $APPGW_IDENTITY_CLIENTID \
127
+
--query objectId \
128
+
--output tsv)
122
129
```
123
130
124
131
### Set policy on Key Vault
@@ -141,9 +148,13 @@ az keyvault set-policy \
141
148
Create an application gateway using `az network application-gateway create` and specify your application's private fully qualified domain name (FQDN) as servers in the backend pool. Be sure to use the user-assigned managed identity and point to the certificate in Key Vault using the certificate's secret ID.
Copy file name to clipboardExpand all lines: articles/spring-apps/how-to-bind-mysql.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,11 +60,11 @@ Follow these steps to configure your Spring app to connect to an Azure Database
60
60
1. Then, use the following command to create a user-assigned managed identity for Azure Active Directory authentication. Be sure to replace the variables in the example with actual values. For more information, see [Set up Azure Active Directory authentication for Azure Database for MySQL - Flexible Server](../mysql/flexible-server/how-to-azure-ad.md).
1. Run the `az spring connection create` command, as shown in the following example. Be sure to replace the variables in the example with actual values.
0 commit comments