Skip to content

Commit 7ed4b2e

Browse files
updates
1 parent 14acd1c commit 7ed4b2e

File tree

4 files changed

+41
-18
lines changed

4 files changed

+41
-18
lines changed

articles/container-apps/TOC.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
href: jobs.md
6565
- name: Dynamic sessions
6666
items:
67-
- name: Sessions overview
67+
- name: Overview
6868
href: sessions.md
69-
- name: Sessions usage
69+
- name: Usage
7070
href: sessions-usage.md
7171
- name: Session pools
7272
href: session-pool.md

articles/container-apps/session-pool.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.author: cshoe
1111

1212
# Use session pools in Azure Container Apps
1313

14-
Azure Container Apps sessions are secure sandboxed environments ideal for running code or applications that require strong isolation from other workloads. Sessions are managed by a pool which provides immediate access to new sessions, and is responsible for handling the lifecycle of each session.
14+
Session pools provide subsecond session allocation times for new pools, and is responsible for the management and lifecycle of each session.
1515

1616
## Configuration
1717

articles/container-apps/sessions-usage.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.custom: references_regions, ignite-2024
1212

1313
# Use dynamic sessions in Azure Container Apps
1414

15-
Azure Container Apps dynamic [sessions](sessions.md) offer isolated, secure contexts when you need to run code or applications separately from other workloads. Sessions run inside a [session pool](session-pool.md) which provides immediate access to new and existing sessions.
15+
Azure Container Apps dynamic [sessions](sessions.md) offer isolated, secure contexts when you need to run code or applications separately from other workloads. Sessions run inside a [session pool](session-pool.md) which provides immediate access to new and existing sessions. These sessions are ideal for scenarios where user-generated input needs to be processed in a controlled manner or when integrating third-party services that require executing code in an isolated environment.
1616

1717
This article shows you how to manage and interact with dynamic sessions.
1818

@@ -30,13 +30,11 @@ For more information managing session pools, see [session pools management endpo
3030

3131
## Forwarding requests to a session's container
3232

33-
To send a request into a session's container, you use the management endpoint as the root for your request.
34-
35-
Anything in the path following the base pool management endpoint is forwarded to the session's container.
33+
To send a request into a session's container, you use the management endpoint as the root for your request. Anything in the path following the base pool management endpoint is forwarded to the session's container.
3634

3735
For example, if you make a call to: `<POOL_MANAGEMENT_ENDPOINT>/api/uploadfile`, the request is routed to the session's container at `0.0.0.0:<TARGET_PORT>/api/uploadfile`.
3836

39-
## Continuous session interaction
37+
## Continuous interaction
4038

4139
As you continue to make calls to the same session, the session remains [allocated](sessions.md#session-lifecycle) in the pool. Once there are no requests to the session after the cooldown period has elapsed, the session is automatically destroyed.
4240

@@ -80,7 +78,7 @@ The identifier must be a string that is 4 to 128 characters long and can contain
8078

8179
## Work with files
8280

83-
You can upload and download files and list all files to a session.
81+
You can upload and download files, and list all the files in a session.
8482

8583
### Upload a file
8684

@@ -169,6 +167,20 @@ Only configure or upload sensitive data to a session if you trust the users of t
169167

170168
By default, sessions are prevented from making outbound network requests. You can control network access by configuring network status settings on the session pool.
171169

170+
- **Use strong, unique session identifiers**: Always generate session identifiers that are long and complex to prevent brute-force attacks. Use cryptographic algorithms to create identifiers that are hard to guess.
171+
172+
- **Limit session visibility**: Set strict access controls to ensure that session identifiers are only visible to the session pool. Avoid exposing session IDs in URLs or logs.
173+
174+
- **Implement short expiration times**: Configure session identifiers to expire after a short period of inactivity. This approach minimizes the risk of sessions being hijacked after a user has finished interacting with your application.
175+
176+
- **Regularly rotate session credentials**: Periodically review and update the credentials associated with your sessions. Rotation decreases the risk of unauthorized access.
177+
178+
- **Utilize secure transmission protocols**: Always use HTTPS to encrypt data in transit, including session identifiers. This approach protects against man-in-the-middle attacks.
179+
180+
- **Monitor session activity**: Implement logging and monitoring to track session activities. Use these logs to identify unusual patterns or potential security breaches.
181+
182+
- **Validate user input**: Treat all user input as dangerous. Use input validation and sanitation techniques to protect against injection attacks and ensure that only trusted data is processed.
183+
172184
To fully secure your sessions, you can:
173185

174186
- [Use Microsoft Entra ID authentication and authorization](#authentication)

articles/container-apps/sessions.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,27 @@ With sessions, you get:
2828

2929
* **Scalable**: Sessions can run at a high scale. You can run hundreds or thousands of sessions concurrently.
3030

31+
* **API access**: Sessions are exposed to your application via a single HTTP endpoint.
32+
3133
## Session
3234

3335
A session is a sandboxed environment that runs untrusted code or your application.
3436

35-
Each session is isolated from all other sessions and from the host environment with a [Hyper-V](/windows-server/virtualization/hyper-v/hyper-v-technology-overview) sandbox. Hyper-V technology is at the foundation for session isolation, ensuring that different sessions operate independently with the necessary security boundaries in place.
36-
37-
For enhanced network security, you can enable session network isolation on your session.
37+
Each session is isolated from all other sessions and from the host environment with a [Hyper-V](/windows-server/virtualization/hyper-v/hyper-v-technology-overview) sandbox. Hyper-V technology is at the foundation for session isolation, ensuring that different sessions operate independently with the necessary security boundaries in place. For enhanced network security, you can enable session network isolation on your session.
3838

39-
Each session executes in the context of a session pool.
39+
There are two different types of sessions.
4040

4141
## Session types
4242

43-
Sessions are exposed to your application via a single HTTP endpoint.
44-
4543
Azure Container Apps supports two types of sessions:
4644

4745
| Type | Description | Billing model |
4846
|------|-------------|---------------|
4947
| [Code interpreter sessions](./sessions-code-interpreter.md) | Fully managed code interpreter which allows you to run code in a sandbox preinstalled with popular libraries.<br><br>Ideal for running untrusted code, such as code provided by users of your application or code generated by a large language model (LLM).<br><br>You can use the session out-of-the-box or with a [language model framework](./sessions-code-interpreter.md#llm-framework-integrations). | Per session (consumption) |
5048
| [Custom container sessions](./sessions-custom-container.md) | Bring-your-own-container option where you run your own container images in secure, isolated sandboxes.<br><br>This approach is a good option if you want to run a custom code interpreter for a language that isn't supported out of the box, or workloads that require strong isolation. | Container Apps Dedicated Plan |
5149

50+
Each session, regardless of type, runs in the context of a session pool.
51+
5252
## Session pools
5353

5454
To provide subsecond session allocation times, Azure Container Apps maintains a pool of ready but unallocated sessions. When your application makes a request for a session that hasn't been used before, the pool automatically assigns a new session for you. As sessions are allocated, the pool is automatically replenished to maintain a constant number of ready sessions.
@@ -94,7 +94,18 @@ Dynamic sessions are available in the following regions:
9494

9595
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).
9696

97-
## Next steps
97+
## Security
98+
99+
Use the following methods to help harden the security of your dynamic sessions.
100+
101+
* **Secure identifiers**: Use secure [session identifiers](sessions-usage.md#identifiers) at all times. Generate session identifiers using cryptographic methods to ensure unique and unpredictable values. Avoid using sequential IDs that could be guessed by an attacker.
102+
103+
* **Use HTTPS**: Always use HTTPS to encrypt data in transit. This protects session identifiers and any sensitive data exchanged between the client and server from being intercepted.
104+
105+
* **Limit session lifetime**: Implement timeouts for sessions. For instance, allow a maximum of 15 minutes of inactivity before the session is automatically terminated. This helps mitigate risks due to a lost or unattended device.
106+
107+
* **Regular audits and monitoring**: Periodically review session management practices and logs. Implement monitoring tools to alert suspicious activities, such as repeated failed login attempts or abnormal session lengths.
108+
109+
## Related content
98110

99-
> [!div class="nextstepaction"]
100-
> [Use serverless containers](start-serverless-containers.md)
111+
* [Session pools](./session-pool.md)

0 commit comments

Comments
 (0)