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/container-apps/client-certificate-authorization.md
+3-10Lines changed: 3 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,28 +5,22 @@ services: container-apps
5
5
author: craigshoemaker
6
6
ms.service: container-apps
7
7
ms.topic: how-to
8
-
ms.date: 03/20/2023
8
+
ms.date: 03/29/2023
9
9
ms.author: cshoe
10
10
---
11
11
12
12
# Configure client certificate authentication in Azure Container Apps
13
13
14
14
Azure Container Apps supports client certificate authentication (also known as mutual TLS or mTLS) that allows access to your container app through two-way authentication. This article shows you how to configure client certificate authorization in Azure Container Apps.
15
15
16
-
When client certificate are used, the TLS certificates are exchanged between the client and your container app to authenticate identity and encrypt traffic. Client certificates are often used in "zero trust" security models to authorize client access within an organization.
16
+
When client certificates are used, the TLS certificates are exchanged between the client and your container app to authenticate identity and encrypt traffic. Client certificates are often used in "zero trust" security models to authorize client access within an organization.
17
17
18
18
For example, you may want to require a client certificate for a container app that manages sensitive data.
19
19
20
20
Container Apps accepts client certificates in the PKCS12 format are that issued by a trusted certificate authority (CA), or are self-signed.
21
21
22
-
<!--
23
-
Anthony mentioned that the customer will be able to obtain a client certificate through Azure. So this will need to be added to the doc.
24
-
-->
25
-
26
22
>[!NOTE]
27
23
> Client certificate authorization is only supported in Container Apps environments that use a [custom VNET](vnet-custom.md).
28
-
> Question: Are certificates available in the consumption tier? Any other limitations?
29
-
> Should we include more use cases?
30
24
31
25
## Configure client certificate authorization
32
26
@@ -36,8 +30,7 @@ The client certificate mode property available as you enable [ingress](./ingress
36
30
-`accept`: The client certificate is optional. If the client certificate isn't provided, the request is still accepted.
37
31
-`ignore`: The client certificate is ignored.
38
32
39
-
When `require` or `accept` are set, ingress passes the client certificate to the container app.
40
-
33
+
Ingress passes the client certificate to the container app if `require` or `accept` are set.
41
34
42
35
The following ARM template example configures ingress to require a client certificate for all requests to the container app.
# Configure Ingress for your app in Azure Container Apps
@@ -16,127 +17,28 @@ This article shows you how to enable [ingress](ingress-overview.md) features for
16
17
17
18
## Ingress settings
18
19
19
-
You can set the following ingress properties:
20
+
You can set the following ingress template properties:
20
21
21
22
| Property | Description | Values | Required |
22
23
|---|---|---|---|
23
-
|`allowInsecure`| Allows insecure traffic to your container app. |`false` (default), `true`<br><br>If set to `true`, HTTP requests to port 80 aren't automatically redirected to port 443 using HTTPS, allowing insecure connections.| No |
24
+
|`allowInsecure`| Allows insecure traffic to your container app. When set to `true` HTTP requests to port 80 aren't automatically redirected to port 443 using HTTPS, allowing insecure connections.|`false` (default), `true` enables insecure connections| No |
24
25
|`clientCertificateMode`| Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but doesn't require a client certificate. Require indicates server requires a client certificate. |`Required`, `Accept`, `Ignore` (default) | No |
25
-
|`customDomains`| Custom domain bindings for Container Apps' hostnames. See [Custom domains and certificates](custom-domains-certificates.md)|Array of bindings | No |
26
-
|`exposedPort`| (TCP ingress only) An port for TCP ingress. If `external` is `true`, the value must be unique in the Container Apps environment if ingress is external. | A port number from `1` to `65535`. (can't be `80` or `443`) | No |
26
+
|`customDomains`| Custom domain bindings for Container Apps' hostnames. See [Custom domains and certificates](custom-domains-certificates.md)|An array of bindings | No |
27
+
|`exposedPort`| (TCP ingress only) The port TCP listens on. If `external` is `true`, the value must be unique in the Container Apps environment. | A port number from `1` to `65535`. (can't be `80` or `443`) | No |
27
28
|`external`| Allow ingress to your app from outside its Container Apps environment. |`true` or `false`(default) | Yes |
28
-
|`ipSecurityRestrictions`| IP ingress restrictions. See [Set up IP ingress restrictions](ip-restrictions.md)| array of rules | No |
29
+
|`ipSecurityRestrictions`| IP ingress restrictions. See [Set up IP ingress restrictions](ip-restrictions.md)|An array of rules | No |
29
30
|`stickySessions.affinity`| Enables [session affinity](sticky-sessions.md). |`none` (default), `sticky`| No |
30
31
|`targetPort`| The port your container listens to for incoming requests. | Set this value to the port number that your container uses. For HTTP ingress, your application ingress endpoint is always exposed on port `443`. | Yes |
31
-
|`traffic`| Traffic weights based on revision name or labels. See [Traffic splitting](traffic-splitting.md)| array of rules | No |
32
-
|`transport`| The transport protocol type. | auto (default) detects HTTP/1 or HTTP/2, `http` for HTTP/1, `http2` for HTTP/2, `tcp` for TCP. | No |
33
-
34
-
<!--
35
-
36
-
This is supposed to be the schema for ingress. We haven't changed to this yet, but it's what we're planning on.
"description": "Bool indicating if app exposes an external http endpoint",
51
-
"default": false,
52
-
"type": "boolean"
53
-
},
54
-
"targetPort": {
55
-
"format": "int32",
56
-
"description": "Target Port in containers for traffic from ingress",
57
-
"type": "integer"
58
-
},
59
-
"exposedPort": {
60
-
"format": "int32",
61
-
"description": "Exposed Port in containers for TCP traffic from ingress",
62
-
"type": "integer"
63
-
},
64
-
"transport": {
65
-
"description": "Ingress transport protocol",
66
-
"enum": [
67
-
"auto",
68
-
"http",
69
-
"http2",
70
-
"tcp"
71
-
],
72
-
"type": "string",
73
-
"x-ms-enum": {
74
-
"name": "IngressTransportMethod",
75
-
"modelAsString": true
76
-
},
77
-
"default": "auto"
78
-
},
79
-
"traffic": {
80
-
"description": "Traffic weights for app's revisions",
81
-
"type": "array",
82
-
"items": {
83
-
"$ref": "#/definitions/TrafficWeight"
84
-
},
85
-
"x-ms-identifiers": [
86
-
"revisionName"
87
-
]
88
-
},
89
-
"customDomains": {
90
-
"description": "custom domain bindings for Container Apps' hostnames.",
91
-
"type": "array",
92
-
"items": {
93
-
"$ref": "#/definitions/CustomDomain"
94
-
},
95
-
"x-ms-identifiers": [
96
-
"name"
97
-
]
98
-
},
99
-
"allowInsecure": {
100
-
"description": "Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections",
101
-
"type": "boolean",
102
-
"default": false
103
-
},
104
-
"ipSecurityRestrictions": {
105
-
"description": "Rules to restrict incoming IP address.",
106
-
"type": "array",
107
-
"items": {
108
-
"$ref": "#/definitions/IpSecurityRestrictionRule"
109
-
},
110
-
"x-ms-identifiers": [
111
-
"name"
112
-
]
113
-
},
114
-
"clientCertificateMode": {
115
-
"description": "Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.",
116
-
"enum": [
117
-
"ignore",
118
-
"accept",
119
-
"require"
120
-
],
121
-
"type": "string",
122
-
"x-ms-enum": {
123
-
"name": "IngressClientCertificateMode",
124
-
"modelAsString": true
125
-
}
126
-
},
127
-
}
128
-
},
129
-
-->
32
+
|`traffic`|[Traffic splitting](traffic-splitting.md) weights split between revisions. | An array of rules | No |
33
+
|`transport`| The transport protocol type. | auto (default) detects HTTP/1 or HTTP/2, `http` for HTTP/1, `http2` for HTTP/2, `tcp` for TCP. | No |
130
34
131
-
## Enable ingress
132
35
133
-
<!-- >[!NOTE]
134
-
> Need to think about how to present the different options for enabling ingress. Do we break the setting down to separate sections?
135
-
[Anthony] I think the descriptions in the above table should suffice for now.
136
-
-->
36
+
## Enable ingress
137
37
138
38
You can configure ingress for your container app using the Azure CLI, an ARM template, or the Azure portal.
139
39
40
+
::: zone pivot="azure-cli"
41
+
140
42
# [Azure CLI](#tab/azure-cli)
141
43
142
44
This `az containerapp ingress enable` command enables ingress for your container app. You must specify the target port, and you can optionally set the exposed port if your transport type is `tcp`.
@@ -146,7 +48,7 @@ az containerapp ingress enable \
146
48
--name <app-name> \
147
49
--resource-group <resource-group> \
148
50
--target-port <target-port> \
149
-
--exposed-port tcp-exposed-port> \
51
+
--exposed-port <tcp-exposed-port> \
150
52
--transport <transport> \
151
53
--type <external>
152
54
--allow-insecure
@@ -156,12 +58,17 @@ az containerapp ingress enable \
|`--type`| external | Allow ingress to your app from outside its Container Apps environment. |`external` or `internal`| Yes |
61
+
| `--type` | external | Allow ingress to your app from anywhere, or limit ingress to its internal
62
+
Container Apps environment. | `external` or `internal` | Yes |
160
63
|`--allow-insecure`| allowInsecure | Allow HTTP connections to your app. || No |
161
64
|`--target-port`| targetPort | The port your container listens to for incoming requests. | Set this value to the port number that your container uses. Your application ingress endpoint is always exposed on port `443`. | Yes |
162
65
|`--exposed-port`| exposedPort | (TCP ingress only) An port for TCP ingress. If `external` is `true`, the value must be unique in the Container Apps environment if ingress is external. | A port number from `1` to `65535`. (can't be `80` or `443`) | No |
163
66
|`--transport`| transport | The transport protocol type. | auto (default) detects HTTP/1 or HTTP/2, `http` for HTTP/1, `http2` for HTTP/2, `tcp` for TCP. | No |
164
67
68
+
::: zone-end
69
+
70
+
::: zone pivot="azure-portal"
71
+
165
72
# [Portal](#tab/portal)
166
73
167
74
Enable ingress for your container app by using the portal.
@@ -186,6 +93,9 @@ You can configure ingress when you create your container app by using the Azure
186
93
187
94
The **Ingress** settings page for your container app also allows you to configure **IP Restrictions**. For information to configure IP restriction, see [IP Restrictions](ip-restrictions.md).
188
95
96
+
::: zone-end
97
+
98
+
::: zone pivot="azure-resource-manager"
189
99
190
100
# [ARM template](#tab/arm-template)
191
101
@@ -211,6 +121,10 @@ Enable ingress for your container app by using the `ingress` configuration prope
211
121
212
122
---
213
123
124
+
::: zone-end
125
+
126
+
::: zone pivot="azure-cli"
127
+
214
128
## Disable ingress
215
129
216
130
# [Azure CLI](#tab/azure-cli)
@@ -223,17 +137,30 @@ az containerapp ingress disable \
223
137
--resource-group <resource-group> \
224
138
```
225
139
140
+
::: zone-end
141
+
142
+
::: zone pivot="azure-portal"
143
+
226
144
# [Portal](#tab/portal)
227
145
228
-
Disable ingress for your container app by using the portal.
146
+
You can disable ingress for your container app using the portal.
147
+
148
+
1. Select **Ingress** from the **Settings** menu of the container app page.
149
+
1. Deselect the **Ingress****Enabled** setting.
150
+
1. Select **Save**.
151
+
152
+
:::image type="content" source="media/ingress/screenshot-disable-ingress.png" alt-text="Sceenshot of disabling container app ingress.":::
153
+
154
+
::: zone-end
155
+
156
+
::: zone pivot="azure-resource-manager"
229
157
230
158
# [ARM template](#tab/arm-template)
231
159
232
-
Disable ingress for your container app by omitting the `ingress` configuration property entirely.
160
+
Disable ingress for your container app by omitting the `ingress` configuration property from `properties.configuration`entirely.
Copy file name to clipboardExpand all lines: articles/container-apps/ingress-overview.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ services: container-apps
5
5
author: craigshoemaker
6
6
ms.service: container-apps
7
7
ms.topic: conceptual
8
-
ms.date: 03/28/2023
8
+
ms.date: 03/29/2023
9
9
ms.author: cshoe
10
10
---
11
11
@@ -23,9 +23,10 @@ Ingress supports:
23
23
-[Traffic splitting between revisions](#traffic-splitting)
24
24
-[Session affinity](#session-affinity)
25
25
26
+
<!--
26
27
> [!NOTE]
27
28
> Add diagram here, Talked with Anthony about this. He thought that we should consult Ahmed. I think that we should have a diagram that shows the ingress options and how they work together.
28
-
29
+
-->
29
30
For configuration details, see [Configure ingress](ingress-how-to.md).
30
31
31
32
## External and internal ingress
@@ -80,15 +81,13 @@ With TCP ingress enabled, your container app:
80
81
81
82
You can access your app in the following ways:
82
83
83
-
- The default fully qualified domain name (FQDN). Each app in a Container Apps environment is automatically assigned an FQDN based on the environment's DNS suffix. To customize an environment's DNS suffix, see [Custom environment DNS Suffix](environment-custom-dns-suffix.md).
84
+
- The default fully qualified domain name (FQDN): Each app in a Container Apps environment is automatically assigned an FQDN based on the environment's DNS suffix. To customize an environment's DNS suffix, see [Custom environment DNS Suffix](environment-custom-dns-suffix.md).
84
85
- A custom domain name: You can configure a custom DNS domain for your Container Apps environment. For more information, see [Custom domain names and certificates](./custom-domains-certificates.md).
85
86
- The app name: You can use the app name for communication between apps in the same environment.
86
87
87
88
## IP restrictions
88
89
89
-
Container Apps supports IP restrictions for ingress. You can create rules to either configure IP addresses that are allowed or denied access to your container app.
90
-
91
-
For more information, see [Configure IP restrictions](ip-restrictions.md).
90
+
Container Apps supports IP restrictions for ingress. You can create rules to either configure IP addresses that are allowed or denied access to your container app. For more information, see [Configure IP restrictions](ip-restrictions.md).
92
91
93
92
## Authentication
94
93
@@ -103,7 +102,7 @@ Containers Apps allows you to split incoming traffic between active revisions.
103
102
104
103
## Session affinity
105
104
106
-
Session affinity, also known as sticky sessions, is a feature that allows you to route all HTTP requests from a client to the same replica. This feature is useful for stateful applications that require a consistent connection to the same replica. For more information, see [Session affinity](sticky-sessions.md).
105
+
Session affinity, also known as sticky sessions, is a feature that allows you to route all HTTP requests from a client to the same container app replica. This feature is useful for stateful applications that require a consistent connection to the same replica. For more information, see [Session affinity](sticky-sessions.md).
Azure Container Apps allows you to limit inbound traffic to your container app by configuring IP ingress restrictions via ingress configuration.
16
16
17
-
There are two types restrictions:
17
+
There are two types of restrictions:
18
18
19
19
**Allow*: Allow inbound traffic only from address ranges you specify in allow rules.
20
20
**Deny*: Deny all inbound traffic only from address ranges you specify in deny rules.
@@ -46,9 +46,11 @@ You can manage IP access restrictions rules through the Azure portal or Azure CL
46
46
1. Go to your container app in the Azure portal.
47
47
1. Select **Ingress** from the left side menu.
48
48
1. Select the **IP Security Restrictions Mode** toggle to enable IP restrictions. You can choose to allow or deny traffic from the specified IP address ranges.
49
-
1. Select **Add* to create the rule.
49
+
1. Select **Add** to create the rule.
50
+
50
51
:::image type="content" source="media/ingress/screenshot-ingress-page-ip-restrictions.png" alt-text="Screenshot of IP restriction settings on container app Ingress page.":::
51
-
1. Enter information in the following fields:
52
+
53
+
1. Enter values in the following fields:
52
54
53
55
| Field | Description |
54
56
|-------|-------------|
@@ -58,7 +60,7 @@ You can manage IP access restrictions rules through the Azure portal or Azure CL
58
60
59
61
1. Select **Add**.
60
62
1. Repeat steps 4-6 to add more rules.
61
-
1. When you have finished adding rules, select **Save** to save the rules.
63
+
1. When you have finished adding rules, select **Save**.
62
64
:::image type="content" source="media/ingress/screenshot-save-ip-restriction.png" alt-text="Screenshot to save IP restrictions on container app Ingress page.":::
63
65
64
66
### Update a rule
@@ -185,4 +187,4 @@ az containerapp ingress access-restriction list
Copy file name to clipboardExpand all lines: articles/container-apps/sticky-sessions.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,15 +51,15 @@ Session affinity is configured by setting the `affinity` property in the `ingres
51
51
52
52
You can enable session affinity when you create your container app via the Azure portal. To enable session affinity:
53
53
54
-
1.Go to the **App settings** tab.
54
+
1.On the **Create Container App** page, select the **App settings** tab.
55
55
1. In the **Application ingress settings** section, select **Enabled** for the **Session affinity** setting.
56
56
57
57
58
58
:::image type="content" source="media/ingress/screenshot-session-affinity.png" alt-text="Screenshot of the session affinity setting in Create Container App page.":::
59
59
60
60
You can also enable or disable session affinity after your container app is created. To enable session affinity:
61
61
62
-
1. Go your app in the portal.
62
+
1. Go to your app in the portal.
63
63
1. Select **Ingress**.
64
64
1. You can enable or disable **Session affinity** by selecting or deselecting **Enabled**.
0 commit comments