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
@@ -174,6 +185,10 @@ This template creates a session pool with the following settings:
174
185
|`scaleConfiguration.readySessionInstances`|`5`| The target number of sessions that are ready in the session pool all the time. Increase this number if sessions are allocated faster than the pool is being replenished. |
175
186
|`dynamicPoolConfiguration.executionType`|`Timed`| The type of execution for the session pool. Must be `Timed` for custom container sessions. |
176
187
|`dynamicPoolConfiguration.cooldownPeriodInSeconds`|`600`| The number of seconds that a session can be idle before the session is terminated. The idle period is reset each time the session's API is called. Value must be between `300` and `3600`. |
188
+
|`secrets`|`[{ "name": "registrypassword", "value": "<REGISTRY_PASSWORD>" }]`| A list of secrets. |
189
+
|`customContainerTemplate.registryCredentials.server`|`myregistry.azurecr.io`| The container registry server hostname. |
190
+
|`customContainerTemplate.registryCredentials.username`|`myregistry`| The username to log in to the container registry. |
191
+
|`customContainerTemplate.registryCredentials.passwordSecretRef`|`registrypassword`| The name of the secret that contains the password to log in to the container registry. |
177
192
|`customContainerTemplate.containers[0].image`|`myregistry.azurecr.io/my-container-image:1.0`| The container image to use for the session pool. |
178
193
|`customContainerTemplate.containers[0].name`|`mycontainer`| The name of the container. |
179
194
|`customContainerTemplate.containers[0].resources.cpu`|`0.25`| The required CPU in cores. |
@@ -240,6 +255,114 @@ This request is forwarded to the custom container session with the identifier fo
240
255
241
256
In the example, the session's container receives the request at `http://0.0.0.0:<INGRESS_PORT>/<API_PATH_EXPOSED_BY_CONTAINER>`.
242
257
258
+
### Using managed identity
259
+
260
+
A managed identity from Microsoft Entra ID allows your custom container session pools and their sessions to access other Microsoft Entra protected resources. For more about managed identities in Microsoft Entra ID, see [Managed identities for Azure resources](../active-directory/managed-identities-azure-resources/overview.md).
261
+
262
+
You can enable managed identities for your custom container session pools. Both system-assigned and user-assigned managed identities are supported.
263
+
264
+
There are two ways to use managed identities with custom container session pools:
265
+
266
+
***Image pull authentication**: Use the managed identity to authenticate with the container registry to pull the container image.
267
+
268
+
***Resource access**: Use the session pool's managed identity in a session to access other Microsoft Entra protected resources. This is off by default.
269
+
270
+
> [!IMPORTANT]
271
+
> If you enable access to the managed identity in a session, any code or programs running in the session can access the pool's managed identity. Because sessions typically run untrusted code, it's recommended to use this feature with caution.
272
+
273
+
# [Azure CLI](#tab/azure-cli)
274
+
275
+
To enable managed identity for a custom container session pool, use Azure Resource Manager.
276
+
277
+
# [Azure Resource Manager](#tab/arm)
278
+
279
+
To enable managed identity for a custom container session pool, add an `identity` property to the session pool resource. The `identity` property must have a `type` property with the value `SystemAssigned` or `UserAssigned`. For details on how to configure this property, see [Configure managed identities](managed-identity.md?tabs=arm%2Cdotnet#configure-managed-identities).
280
+
281
+
The following example shows an ARM template snippet that enables a user-assigned identity for a custom container session pool and use it for image pull authentication. Before you send the request, replace the placeholders between the `<>` brackets with the appropriate values for your session pool and session identifier.
This template contains the following additional settings for managed identity:
357
+
358
+
| Parameter | Value | Description |
359
+
|---------|-------|-------------|
360
+
|`customContainerTemplate.registryCredentials.identity`|`<IDENTITY_RESOURCE_ID>`| The resource ID of the managed identity to use for image pull authentication. |
361
+
|`managedIdentitySettings.identity`|`<IDENTITY_RESOURCE_ID>`| The resource ID of the managed identity to use in the session. |
362
+
|`managedIdentitySettings.lifecycle`|`None`| The session lifecycle where the managed identity is available.<br><br>- `None` (default): The session can't access the identity. It's only used for image pull.<br><br>- `Main`: The main session can access the identity. It can also be used for image pull. **Use with caution.**|
363
+
364
+
---
365
+
243
366
## Billing
244
367
245
368
Custom container sessions are billed based on the resources consumed by the session pool. For more information, see [Azure Container Apps billing](billing.md#custom-container).
0 commit comments