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/how-to-configure-enterprise-spring-cloud-gateway.md
+19-18Lines changed: 19 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,8 +24,8 @@ A Spring Cloud Gateway instance routes traffic according to rules. Both *scale i
24
24
25
25
VMware Spring Cloud Gateway includes the following features:
26
26
27
-
- Dynamic routing configuration, that's independent of applications that can be applied and changed without recompiling.
28
-
- Commercial API route filters, for transporting authorized JSON Web Token (JWT) claims to application services.
27
+
- Dynamic routing configuration, independent of individual applications, that you can apply and change without recompiling.
28
+
- Commercial API route filters for transporting authorized JSON Web Token (JWT) claims to application services.
29
29
- Client certificate authorization.
30
30
- Rate-limiting approaches.
31
31
- Circuit breaker configuration.
@@ -38,7 +38,7 @@ To integrate with API portal for VMware Tanzu, VMware Spring Cloud Gateway autom
38
38
- An already provisioned Azure Spring Apps Enterprise tier service instance with VMware Spring Cloud Gateway enabled. For more information, see [Quickstart: Build and deploy apps to Azure Spring Apps using the Enterprise tier](quickstart-deploy-apps-enterprise.md).
39
39
40
40
> [!NOTE]
41
-
> You must enable VMware Spring Cloud Gateway when you provision your Azure Spring Apps service instance. You cannot enable VMware Spring Cloud Gateway after provisioning.
41
+
> You must enable VMware Spring Cloud Gateway when you provision your Azure Spring Apps service instance. You can't enable VMware Spring Cloud Gateway after provisioning.
42
42
43
43
- Azure CLI version 2.0.67 or later. For more information, see [How to install the Azure CLI](/cli/azure/install-azure-cli).
44
44
@@ -48,19 +48,19 @@ This section describes how to assign a public endpoint to Spring Cloud Gateway a
48
48
49
49
#### [Azure portal](#tab/Azure-portal)
50
50
51
-
To assign an endpoint in the Azure portal, do the following steps:
51
+
To assign an endpoint in the Azure portal, use the following steps:
52
52
53
53
1. Open your Azure Spring Apps instance.
54
54
1. Select **Spring Cloud Gateway** in the navigation pane, and then select **Overview**.
55
55
1. Set **Assign endpoint** to **Yes**.
56
56
57
-
After a few minutes, **URL**will show the configured endpoint URL. Save the URL to use later.
57
+
After a few minutes, **URL**shows the configured endpoint URL. Save the URL to use later.
58
58
59
59
:::image type="content" source="media/how-to-configure-enterprise-spring-cloud-gateway/gateway-overview.png" alt-text="Screenshot of Azure portal showing the Spring Cloud Gateway overview page for an Azure Spring Apps instance with the Assign endpoint buttons highlighted and the configured endpoint URL displayed." lightbox="media/how-to-configure-enterprise-spring-cloud-gateway/gateway-overview.png":::
60
60
61
61
#### [Azure CLI](#tab/Azure-CLI)
62
62
63
-
The following command assigns the endpoint.
63
+
Use the following command to assign the endpoint.
64
64
65
65
```azurecli
66
66
az spring gateway update --assign-endpoint
@@ -72,13 +72,13 @@ az spring gateway update --assign-endpoint
72
72
73
73
You can configure VMware Spring Cloud Gateway metadata, which automatically generates OpenAPI version 3 documentation, to display route groups in API portal for VMware Tanzu. For more information, see [Use API portal for VMware Tanzu](./how-to-use-enterprise-api-portal.md).
74
74
75
-
The available metadata options are described in the following table.
75
+
The following table describes the available metadata options:
| title | A title that describes the context of the APIs available on the Gateway instance. The default value is `Spring Cloud Gateway for K8S`. |
80
80
| description | A detailed description of the APIs available on the Gateway instance. The default value is `Generated OpenAPI 3 document that describes the API routes configured for '[Gateway instance name]' Spring Cloud Gateway instance deployed under '[namespace]' namespace.*.`|
81
-
| documentation | The location of API documentation that is available on the Gateway instance. |
81
+
| documentation | The location of API documentation that's available on the Gateway instance. |
82
82
| version | The version of APIs available on this Gateway instance. The default value is `unspecified`. |
83
83
| serverUrl | The base URL to access APIs on the Gateway instance. |
84
84
@@ -100,7 +100,7 @@ To edit metadata in the Azure portal, do these steps:
100
100
101
101
#### [Azure CLI](#tab/Azure-CLI)
102
102
103
-
Use the following command to configure VMware Spring Cloud Gateway metadata properties. You'll need the endpoint URL obtained from the [Configure Spring Cloud Gateway](#configure-spring-cloud-gateway) section.
103
+
Use the following command to configure VMware Spring Cloud Gateway metadata properties. You need the endpoint URL obtained from the [Configure Spring Cloud Gateway](#configure-spring-cloud-gateway) section.
104
104
105
105
```azurecli
106
106
az spring gateway update \
@@ -115,7 +115,7 @@ az spring gateway update \
115
115
116
116
## Configure single sign-on (SSO)
117
117
118
-
VMware Spring Cloud Gateway supports authentication and authorization using single sign-on (SSO), using an OpenID identity provider, which supports OpenID Connect Discovery protocol.
118
+
VMware Spring Cloud Gateway supports authentication and authorization using single sign-on (SSO) with an OpenID identity provider, which supports the OpenID Connect Discovery protocol.
@@ -130,7 +130,7 @@ You can use the Azure portal and the Azure CLI to edit SSO properties.
130
130
131
131
#### [Azure portal](#tab/Azure-portal)
132
132
133
-
To edit SSO properties in the Azure portal, do these steps:
133
+
To edit SSO properties in the Azure portal, use the following steps:
134
134
135
135
1. Open your Azure Spring Apps instance.
136
136
1. Select **Spring Cloud Gateway** in the navigation pane, and then select **Configuration**.
@@ -141,7 +141,7 @@ To edit SSO properties in the Azure portal, do these steps:
141
141
142
142
#### [Azure CLI](#tab/Azure-CLI)
143
143
144
-
The following command configures SSO properties for VMware Spring Cloud Gateway.
144
+
Use the following command to configure SSO properties for VMware Spring Cloud Gateway.
145
145
146
146
```azurecli
147
147
az spring gateway update \
@@ -162,7 +162,7 @@ az spring gateway update \
162
162
163
163
## Configure single sign-on (SSO) logout
164
164
165
-
VMware Spring Cloud Gateway service instances provide a default API endpoint to log out of the current SSO session. The path to this endpoint is `/scg-logout`. The logout results in two outcomes depending on how you call the logout endpoint:
165
+
VMware Spring Cloud Gateway service instances provide a default API endpoint to log out of the current SSO session. The path to this endpoint is `/scg-logout`. The logout results in one of the following outcomes, depending on how you call the logout endpoint:
166
166
167
167
- Logout of session and redirect to the identity provider (IdP) logout.
168
168
- Logout the service instance session.
@@ -173,9 +173,9 @@ If you send a `GET` request to the `/scg-logout` endpoint, then the endpoint sen
173
173
174
174
The following steps describe an example of how to implement the function in your microservices:
175
175
176
-
1. Get a route config to route the logout request to your application. For example, see the `Animal Rescue UI Pages` route config in [Azure samples](https://github.com/Azure-Samples/animal-rescue/blob/0e343a27f44cc4a4bfbf699280476b0517854d7b/frontend/azure/api-route-config.json#L32) on GitHub.
176
+
1. Get a route config to route the logout request to your application. For example, see the Animal Rescue UI pages route config in the [animal-rescue](https://github.com/Azure-Samples/animal-rescue/blob/0e343a27f44cc4a4bfbf699280476b0517854d7b/frontend/azure/api-route-config.json#L32) repository on GitHub.
177
177
178
-
1. Add whatever logout logic you need to the application. At the end, you need to a `GET` request to the gateway's `/scg-logout` endpoint as shown in the `return` value for the `getActionButton` method in [Azure samples](https://github.com/Azure-Samples/animal-rescue/blob/0e343a27f44cc4a4bfbf699280476b0517854d7b/frontend/src/App.js#L84) .
178
+
1. Add whatever logout logic you need to the application. At the end, you need to a `GET` request to the gateway's `/scg-logout` endpoint as shown in the `return` value for the `getActionButton` method in the [animal-rescue](https://github.com/Azure-Samples/animal-rescue/blob/0e343a27f44cc4a4bfbf699280476b0517854d7b/frontend/src/App.js#L84)repository.
179
179
180
180
> [!NOTE]
181
181
> The value of the redirect parameter must be a valid path on the gateway service instance. You can't redirect to an external URL.
@@ -262,7 +262,7 @@ Updating the configuration can take a few minutes. You should get a notification
262
262
263
263
#### [Azure CLI](#tab/Azure-CLI)
264
264
265
-
Use the following command to set up APM using Azure CLI.
265
+
Use the following command to set up APM using Azure CLI:
266
266
267
267
```azurecli
268
268
az spring gateway update \
@@ -271,20 +271,21 @@ az spring gateway update \
271
271
--secrets <key=value>
272
272
```
273
273
274
-
Allowed values for `--apm-types` are `ApplicationInsights`, `AppDynamics`, `Dynatrace`, `NewRelic`, and `ElasticAPM`. The following command shows the usage using Application Insights as an example.
274
+
The allowed values for `--apm-types` are `ApplicationInsights`, `AppDynamics`, `Dynatrace`, `NewRelic`, and `ElasticAPM`. The following command shows the usage using Application Insights as an example.
275
275
276
276
```azurecli
277
277
az spring gateway update \
278
278
--apm-types ApplicationInsights \
279
279
--properties APPLICATIONINSIGHTS_CONNECTION_STRING=<THE CONNECTION STRING OF YOUR APPINSIGHTS> APPLICATIONINSIGHTS_SAMPLE_RATE=10
280
280
```
281
281
282
-
You can also put environment variables in `--secrets` parameter instead of `--properties`, which makes environment variable more secure in network transmission and data storage in backend.
282
+
You can also put environment variables in the `--secrets` parameter instead of `--properties`, which makes the environment variable more secure in network transmission and data storage in the backend.
283
283
284
284
---
285
285
286
286
> [!NOTE]
287
287
> Azure Spring Apps upgrades the APM agent and deployed apps with the same cadence to keep compatibility of agents between Spring Cloud Gateway and Spring apps.
288
+
>
288
289
> By default, Azure Spring Apps prints the logs of the APM Java agent to `STDOUT`. These logs are included with the Spring Cloud Gateway logs. You can check the version of the APM agent used in the logs. You can query these logs in Log Analytics to troubleshoot.
289
290
> To make the APM agents work correctly, increase the CPU and memory of Spring Cloud Gateway.
Copy file name to clipboardExpand all lines: articles/spring-apps/quickstart-configure-single-sign-on-enterprise.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,20 +65,20 @@ Follow these steps to configure single sign-on using an existing Identity Provid
65
65
66
66
To register the application with Azure Active Directory, follow these steps. If you're using an existing provider's credentials, skip ahead to the following section, [Deploy the Identity Service application](#deploy-the-identity-service-application).
67
67
68
-
1. Use the following command to create an application registration with Azure Active Directory and save the output.
68
+
1. Use the following command to create an application registration with Azure Active Directory and save the output:
69
69
70
70
```azurecli
71
71
az ad app create --display-name <app-registration-name> > ad.json
72
72
```
73
73
74
-
1. Use the following command to retrieve the application ID and collect the client secret.
74
+
1. Use the following command to retrieve the application ID and collect the client secret:
75
75
76
76
```azurecli
77
77
APPLICATION_ID=$(cat ad.json | jq -r '.appId')
78
78
az ad app credential reset --id ${APPLICATION_ID} --append > sso.json
79
79
```
80
80
81
-
1. Use the following command to assign a Service Principal to the application registration.
81
+
1. Use the following command to assign a Service Principal to the application registration:
82
82
83
83
```azurecli
84
84
az ad sp create --id ${APPLICATION_ID}
@@ -134,7 +134,7 @@ To complete the single sign-on experience, use the following steps to deploy the
134
134
135
135
1. Navigate to the project folder.
136
136
137
-
1. Use the following command to create the `identity-service` application.
137
+
1. Use the following command to create the `identity-service` application:
138
138
139
139
```azurecli
140
140
az spring app create \
@@ -143,7 +143,7 @@ To complete the single sign-on experience, use the following steps to deploy the
1. Use the following command to deploy the identity service.
164
+
1. Use the following command to deploy the identity service:
165
165
166
166
```azurecli
167
167
az spring app deploy \
@@ -173,7 +173,7 @@ To complete the single sign-on experience, use the following steps to deploy the
173
173
--env "JWK_URI=<jwk-uri>"
174
174
```
175
175
176
-
1. Use the following command to route requests to the identity service.
176
+
1. Use the following command to route requests to the identity service:
177
177
178
178
```azurecli
179
179
az spring gateway route-config create \
@@ -188,7 +188,7 @@ To complete the single sign-on experience, use the following steps to deploy the
188
188
189
189
You can configure Spring Cloud Gateway to authenticate requests using single sign-on. To configure Spring Cloud Gateway to use single sign-on, follow these steps:
190
190
191
-
1. Use the following commands to configure Spring Cloud Gateway to use single sign-on.
191
+
1. Use the following commands to configure Spring Cloud Gateway to use single sign-on:
192
192
193
193
```azurecli
194
194
GATEWAY_URL=$(az spring gateway show \
@@ -209,7 +209,7 @@ You can configure Spring Cloud Gateway to authenticate requests using single sig
209
209
--issuer-uri <issuer-uri>
210
210
```
211
211
212
-
1. Instruct the cart service application to use Spring Cloud Gateway for authentication. Use the following command to provide the necessary environment variables.
212
+
1. Instruct the cart service application to use Spring Cloud Gateway for authentication. Use the following command to provide the necessary environment variables:
213
213
214
214
```azurecli
215
215
az spring app update \
@@ -219,7 +219,7 @@ You can configure Spring Cloud Gateway to authenticate requests using single sig
1. Instruct the order service application to use Spring Cloud Gateway for authentication. Use the following command to provide the necessary environment variables.
222
+
1. Instruct the order service application to use Spring Cloud Gateway for authentication. Use the following command to provide the necessary environment variables:
223
223
224
224
```azurecli
225
225
az spring app update \
@@ -229,17 +229,17 @@ You can configure Spring Cloud Gateway to authenticate requests using single sig
1. Use the following command to retrieve the URL for Spring Cloud Gateway.
232
+
1. Use the following command to retrieve the URL for Spring Cloud Gateway:
233
233
234
234
```bash
235
235
echo"https://${GATEWAY_URL}"
236
236
```
237
237
238
-
You can open the output URL in a browser to explore the updated application. The Log In function is now operational, allowing you to add items to the cart and place orders. After you sign in, the customer information button will display the signed-in username.
238
+
You can open the output URL in a browser to explore the updated application. The Log In function is now operational, allowing you to add items to the cart and place orders. After you sign in, the customer information button displays the signed-in username.
239
239
240
240
## Configure single sign-on for API portal
241
241
242
-
You can configure API portal for VMware Tanzu to use single sign-on to require authentication before exploring APIs. Use the following commands to configure single sign-on for API portal.
242
+
You can configure API portal for VMware Tanzu to use single sign-on to require authentication before exploring APIs. Use the following commands to configure single sign-on for API portal:
243
243
244
244
```azurecli
245
245
PORTAL_URL=$(az spring api-portal show \
@@ -255,7 +255,7 @@ az spring api-portal update \
255
255
--issuer-uri <issuer-uri>
256
256
```
257
257
258
-
Use the following commands to retrieve the URL for API portal.
258
+
Use the following commands to retrieve the URL for API portal:
259
259
260
260
```azurecli
261
261
PORTAL_URL=$(az spring api-portal show \
@@ -265,7 +265,7 @@ PORTAL_URL=$(az spring api-portal show \
265
265
echo "https://${PORTAL_URL}"
266
266
```
267
267
268
-
You can open the output URL in a browser to explore the application APIs. You are directed to sign on before exploring APIs.
268
+
You can open the output URL in a browser to explore the application APIs. You're directed to sign on before exploring APIs.
0 commit comments