Skip to content

Commit 5758cb3

Browse files
authored
Merge pull request #286155 from Netyyyy/myao/add-auth-client
add description for client-auth
2 parents e1a6a2f + 16f1f4c commit 5758cb3

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

articles/spring-apps/enterprise/how-to-configure-ingress.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ This article shows you how to set and update an application's ingress settings i
1717

1818
The Azure Spring Apps service uses an underlying ingress controller to handle application traffic management. The following ingress settings are supported for customization.
1919

20-
| Name | Ingress setting | Default value | Valid range | Description |
21-
|----------------------|------------------------|---------------|-------------------|--------------------------------------------------------------------------|
22-
| `ingress-read-timeout` | `proxy-read-timeout` | 300 | \[1,1800\] | The timeout in seconds for reading a response from a proxied server. |
23-
| `ingress-send-timeout` | `proxy-send-timeout` | 60 | \[1,1800\] | The timeout in seconds for transmitting a request to the proxied server. |
24-
| `session-affinity` | `affinity` | None | Session, None | The type of the affinity that will make the request come to the same pod replica that was responding to the previous request. Set `session-affinity` to Cookie to enable session affinity. In the portal only, you must choose the enable session affinity box. |
25-
| `session-max-age` | `session-cookie-max-age` | 0 | \[0, 604800\] | The time in seconds until the cookie expires, corresponding to the `Max-Age` cookie directive. If you set `session-max-age` to 0, the expiration period is equal to the browser session period. |
26-
| `backend-protocol` | `backend-protocol` | Default | Default, GRPC | Sets the backend protocol to indicate how NGINX should communicate with the backend service. Default means HTTP/HTTPS/WebSocket. The `backend-protocol` setting only applies to client-to-app traffic. For app-to-app traffic within the same service instance, choose any protocol for app-to-app traffic without modifying the `backend-protocol` setting. The protocol doesn't restrict your choice of protocol for app-to-app traffic within the same service instance. |
20+
| Name | Ingress setting | Default value | Valid range | Description |
21+
|------------------------|--------------------------|---------------|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
22+
| `ingress-read-timeout` | `proxy-read-timeout` | 300 | \[1,1800\] | The timeout in seconds for reading a response from a proxied server. |
23+
| `ingress-send-timeout` | `proxy-send-timeout` | 60 | \[1,1800\] | The timeout in seconds for transmitting a request to the proxied server. |
24+
| `session-affinity` | `affinity` | None | `Session`, `None` | The type of the affinity that makes the request come to the same pod replica that was responding to the previous request. Set `session-affinity` to Cookie to enable session affinity. In the portal only, you must choose the enable session affinity box. |
25+
| `session-max-age` | `session-cookie-max-age` | 0 | \[0, 604800\] | The time in seconds until the cookie expires, corresponding to the `Max-Age` cookie directive. If you set `session-max-age` to 0, the expiration period is equal to the browser session period. |
26+
| `backend-protocol` | `backend-protocol` | Default | Default, `GRPC` | Sets the backend protocol to indicate how NGINX should communicate with the backend service. Default means HTTP/HTTPS/WebSocket. The `backend-protocol` setting only applies to client-to-app traffic. For app-to-app traffic within the same service instance, choose any protocol for app-to-app traffic without modifying the `backend-protocol` setting. The protocol doesn't restrict your choice of protocol for app-to-app traffic within the same service instance. |
27+
| `client-auth` | `client-auth` | 0 selected | - | Select the certificates with the public key you uploaded in the TLS/SSL settings. Ingress concatenates these certificates into one and then uses it for client authentication. |
2728

2829
## Prerequisites
2930

@@ -44,21 +45,26 @@ Use the following Azure CLI command to set the ingress configuration when you cr
4445
az spring app create \
4546
--resource-group <resource-group-name> \
4647
--service <service-name> \
47-
--name <service-name> \
48+
--name <app-name> \
4849
--ingress-read-timeout 300 \
4950
--ingress-send-timeout 60 \
5051
--session-affinity Cookie \
5152
--session-max-age 1800 \
5253
--backend-protocol Default \
54+
--client-auth-certs <cert-id>
5355
```
5456

57+
> [!NOTE]
58+
> The `cert-id` value is in the format `/subscriptions/<your-sub-id>/resourceGroups/<resource-group-name>/providers/Microsoft.AppPlatform/Spring/<service-name>/certificates/<cert-name>`. To get the `cert-id` value, use the following command: `az spring certificate show --service <service-instance-name> --resource-group <resource-group-name> --name <certificate-name> --query id`
59+
5560
This command creates an app with the following settings:
5661

5762
- Ingress read timeout: 300 seconds
5863
- Ingress send timeout: 60 seconds
5964
- Session affinity: Cookie
6065
- Session cookie max age: 1800 seconds
6166
- Backend protocol: Default
67+
- Client Auth: cert-name
6268

6369
## Update the ingress settings for an existing app
6470

@@ -81,12 +87,13 @@ Use the following command to update the ingress settings for an existing app.
8187
az spring app update \
8288
--resource-group <resource-group-name> \
8389
--service <service-name> \
84-
--name <service-name> \
90+
--name <app-name> \
8591
--ingress-read-timeout 600 \
8692
--ingress-send-timeout 600 \
8793
--session-affinity None \
8894
--session-max-age 0 \
8995
--backend-protocol GRPC \
96+
--client-auth-certs ''
9097
```
9198

9299
This command updates the app with the following settings:
@@ -96,6 +103,7 @@ This command updates the app with the following settings:
96103
- Session affinity: None
97104
- Session cookie max age: 0
98105
- Backend protocol: GRPC
106+
- Client Auth: 0 selected
99107

100108
---
101109

@@ -107,13 +115,13 @@ This command updates the app with the following settings:
107115

108116
- How do you enable WebSocket?
109117

110-
WebSocket is enabled by default if you set the backend protocol to *Default*. The WebSocket connection limit is 20000. When you reach that limit, the connection will fail.
118+
WebSocket is enabled by default if you set the backend protocol to *Default*. The WebSocket connection limit is 20000. When you reach that limit, the connection fails.
111119

112120
You can also use RSocket based on WebSocket.
113121

114122
- What is the difference between ingress config and ingress settings?
115123

116-
Ingress config can still be used in the Azure CLI and SDK, and that setting will apply to all apps within the service instance. Once an app has been configured by ingress settings, the Ingress config won't affect it. We don't recommend that new scripts use ingress config since we plan to stop supporting it in the future.
124+
Ingress config can still be used in the Azure CLI and SDK, and that setting applies to all apps within the service instance. After ingress settings configure an app, the Ingress config can't affect it. We don't recommend that new scripts use ingress config since we plan to stop supporting it in the future.
117125

118126
- When ingress settings are used together with App Gateway/APIM, what happens when you set the timeout in both Azure Spring Apps ingress and the App Gateway/APIM?
119127

-80.4 KB
Loading

0 commit comments

Comments
 (0)