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
@@ -42,6 +42,65 @@ To integrate with API portal for VMware Tanzu, VMware Spring Cloud Gateway autom
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
45
+
## Enable/disable Spring Cloud Gateway after service creation
46
+
47
+
You can enable and disable Spring Cloud Gateway after service creation using the Azure portal or Azure CLI. Before disabling Spring Cloud Gateway, you're required to unassign its endpoint and remove all route configs.
48
+
49
+
### [Azure portal](#tab/Azure-portal)
50
+
51
+
Use the following steps to enable or disable Spring Cloud Gateway using the Azure portal:
52
+
53
+
1. Navigate to your service resource, and then select **Spring Cloud Gateway**.
54
+
1. Select **Manage**.
55
+
1. Select or unselect the **Enable Spring Cloud Gateway**, and then select **Save**.
56
+
1. You can now view the state of Spring Cloud Gateway on the **Spring Cloud Gateway** page.
57
+
58
+
:::image type="content" source="media/how-to-configure-enterprise-spring-cloud-gateway/gateway-manage-restart.png" alt-text="Screenshot of the Azure portal showing the Spring Cloud Gateway page." lightbox="media/how-to-configure-enterprise-spring-cloud-gateway/gateway-manage-restart.png":::
59
+
60
+
### [Azure CLI](#tab/Azure-CLI)
61
+
62
+
Use the following Azure CLI commands to enable or disable Spring Cloud Gateway:
After the restart action, gateway instances are rolling restarted.
81
+
82
+
### [Azure portal](#tab/Azure-portal)
83
+
84
+
Use the following steps to restart Spring Cloud Gateway using the Azure portal:
85
+
86
+
1. Navigate to your service resource, and then select **Spring Cloud Gateway**.
87
+
1. Select **Restart**.
88
+
1. Select **OK** to confirm the restart.
89
+
90
+
:::image type="content" source="media/how-to-configure-enterprise-spring-cloud-gateway/gateway-restart.png" alt-text="Screenshot of the Azure portal showing the Spring Cloud Gateway page with the Restart gateway dialog box." lightbox="media/how-to-configure-enterprise-spring-cloud-gateway/gateway-restart.png":::
91
+
92
+
### [Azure CLI](#tab/Azure-CLI)
93
+
94
+
Use the following Azure CLI command to restart the gateway:
This section describes how to assign a public endpoint to Spring Cloud Gateway and configure its properties.
@@ -203,14 +262,15 @@ req.send();
203
262
204
263
Cross-origin resource sharing (CORS) allows restricted resources on a web page to be requested from another domain outside the domain from which the first resource was served. The available CORS configuration options are described in the following table.
| `allowedOrigins` | Allowed origins to make cross-site requests. |
268
+
| `allowedOriginPatterns` | Allowed origin patterns to make cross-site requests. |
269
+
| `allowedMethods` | Allowed HTTP methods on cross-site requests. |
270
+
| `allowedHeaders` | Allowed headers in cross-site request. |
271
+
| `maxAge` | How long, in seconds, the response from a preflight request is cached by clients. |
272
+
| `allowCredentials` | Whether user credentials are supported on cross-site requests. |
273
+
| `exposedHeaders` | HTTP response headers to expose for cross-site requests. |
214
274
215
275
> [!NOTE]
216
276
> Be sure you have the correct CORS configuration if you want to integrate with API portal. For more information, see the [Configure Spring Cloud Gateway](#configure-spring-cloud-gateway) section.
@@ -313,22 +373,20 @@ The gateway restarts accordingly to ensure that the gateway uses the new certifi
313
373
Use the following steps to synchronize certificates.
314
374
315
375
1.In your AzureSpringApps instance, select **SpringCloudGateway** in the navigation pane.
316
-
1.On the **SpringCloudGateway** page, select **Certificate management**.
317
-
1.Select the certificate you imported in **Certificates**.
318
-
1.Select**sync certificate**, and confirm the operation.
319
-
320
-
:::image type="content" source="media/how-to-configure-enterprise-spring-cloud-gateway/gateway-sync-certificate.png" alt-text="Screenshot of the Azure portal showing the Spring Cloud Gateway page for Certificate Management with the sync certificate prompt highlighted." lightbox="media/how-to-configure-enterprise-spring-cloud-gateway/gateway-sync-certificate.png":::
376
+
1.On the **SpringCloudGateway** page, select **Restart**, and then confirm the operation.
321
377
322
378
#### [AzureCLI](#tab/Azure-CLI)
323
379
324
-
Use the following command to synchronize a certificate forSpringCloudGateway.
380
+
Use the following restart command to synchronize a certificate forSpringCloudGateway.
325
381
326
382
```azurecli
327
-
az spring gateway sync-cert \
383
+
az spring gateway restart \
328
384
--resource-group <resource-group-name> \
329
385
--service <Azure-Spring-Apps-instance-name>
330
386
```
331
387
388
+
---
389
+
332
390
### Set up Autoscale settings forVMwareSpringCloudGateway in AzureCLI
333
391
334
392
You can set Autoscale modes using the AzureCLI. The following commands create an Autoscale setting and an Autoscale rule.
@@ -513,6 +571,92 @@ If the log level is sensitive information in your case, you can include it by us
513
571
514
572
---
515
573
574
+
## Configure addon configuration
575
+
576
+
The addon configuration feature enables you to customize certain properties of Spring Cloud Gateway using a JSON format string. The feature is useful when you need to configure properties that aren't exposed through the RESTAPI.
577
+
578
+
The addon configuration is a JSON object with key-value paris representing the desired configuration. The following example shows the structure of the JSON format:
579
+
580
+
```json
581
+
{
582
+
"<addon-key-name>": {
583
+
"<addon-key-name>":"<addon-value>"
584
+
...
585
+
},
586
+
"<addon-key-name>":"<addon-value>",
587
+
...
588
+
}
589
+
```
590
+
591
+
The following list shows the supported addon configurations for the addon key names and value types. This list is subject to change as we upgrade the SpringCloudGateway version.
592
+
593
+
-Single sign-on (SSO) configuration
594
+
-Key name: `sso`
595
+
-Value type:Object
596
+
-Properties:
597
+
- `RolesAttributeName` (String):Specifies the name of the attribute that contains the roles associated with the single sign-on session.
598
+
- `InactiveSessionExpirationInMinutes` (Integer):Specifies the expiration time in minutes for inactive single sign-on sessions. A value of *0* means never expire.
599
+
-Example:
600
+
601
+
```json
602
+
{
603
+
"sso": {
604
+
"rolesAttributeName":"roles",
605
+
"inactiveSessionExpirationInMinutes":1
606
+
}
607
+
}
608
+
```
609
+
610
+
-Metadata configuration
611
+
-Key name: `api`
612
+
-Value type:Object
613
+
-Properties
614
+
- `groupId` (String):A unique identifier for the group of APIs available on the Gateway instance. The value can only contain lowercase letters and numbers.
615
+
-Example:
616
+
617
+
```json
618
+
{
619
+
"api": {
620
+
"groupId":"id1"
621
+
}
622
+
}
623
+
```
624
+
625
+
Use the following steps to update the addon configuration.
626
+
627
+
### [Azure portal](#tab/Azure-portal)
628
+
629
+
1.In your AzureSpringApps instance, select **SpringCloudGateway** in the navigation pane, and then select **Configuration**.
630
+
1.Specify the JSON value for**AddonConfigs**.
631
+
1.Select**Save**.
632
+
633
+
### [AzureCLI](#tab/Azure-CLI)
634
+
635
+
1.Prepare the addon configs JSON file *\<file-name-of-addon-configs-json\>.json* with the following content:
636
+
637
+
```json
638
+
{
639
+
"sso": {
640
+
"rolesAttributeName":"roles",
641
+
"inactiveSessionExpirationInMinutes":1
642
+
},
643
+
"api": {
644
+
"groupId":"id1"
645
+
}
646
+
}
647
+
```
648
+
649
+
1.Use the following command to update the addon configs forSpringCloudGateway:
Copy file name to clipboardExpand all lines: articles/spring-apps/how-to-use-enterprise-spring-cloud-gateway.md
-31Lines changed: 0 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,37 +264,6 @@ az spring gateway route-config create \
264
264
--routes-file <json-file-with-routes>
265
265
```
266
266
267
-
## Enable/disable Spring Cloud Gateway after service creation
268
-
269
-
You can enable and disable Spring Cloud Gateway after service creation using the Azure portal or Azure CLI. Before disabling Spring Cloud Gateway, you're required to unassign its endpoint and remove all route configs.
270
-
271
-
### [Azure portal](#tab/Portal)
272
-
273
-
Use the following steps to enable or disable Spring Cloud Gateway using the Azure portal:
274
-
275
-
1. Navigate to your service resource, and then select **Spring Cloud Gateway**.
276
-
1. Select **Manage**.
277
-
1. Select or unselect the **Enable Spring Cloud Gateway**, and then select **Save**.
278
-
1. You can now view the state of Spring Cloud Gateway on the **Spring Cloud Gateway** page.
279
-
280
-
### [Azure CLI](#tab/Azure-CLI)
281
-
282
-
Use the following Azure CLI commands to enable or disable Spring Cloud Gateway:
0 commit comments