Container Apps job: bubblewrap can no longer create an unprivileged user namespace

Lucequant 0 Reputation points
2026-11-20T16:18:31.7033333+00:00

Our Azure Container Apps job (Consumption workload profile, East US 2) runs a non-root process that starts shell commands inside bubblewrap (bwrap, Debian 13 package 0.12.0-1~deb13u1) with --unshare-all. Earlier executions of this job worked. Since around 20 November 2026 every execution fails with:

bwrap: No permissions to create a new namespace, likely because the kernel does not allow non-privileged user namespaces.

We reproduced it with two manual executions of the same job: one with our earlier container image (which worked before) and one with the current image. Both fail in exactly the same way, so the change seems to be on the platform side, not in our image.

Questions

  • Has the Container Apps (Consumption) host configuration changed so that unprivileged user namespaces are now disabled (for example user.max_user_namespaces=0, or an AppArmor or seccomp restriction)?
  • Is there a supported way to allow unprivileged user namespaces for a job, for example a dedicated workload profile, a setting, or a different environment type?
  • If not, what isolation option do you recommend for running untrusted shell commands inside a Container Apps job?

Thank you.

Azure Container Apps
Azure Container Apps

An Azure service that provides a general-purpose, serverless container platform.

0 comments No comments

1 answer

Sort by: Oldest
  1. AI answer

    2026-11-20T16:19:43.4933333+00:00

    There is no documented Container Apps job setting or workload-profile option that enables unprivileged user namespaces; move the untrusted command execution to Azure Container Apps Dynamic Sessions—preferably a custom container session pool when the existing image and dependencies must be retained.

    What can be concluded about the regression

    Your old and current images now failing identically is strong evidence against an image-specific regression, but it does not identify which host control changed. The same bwrap message can result from multiple Linux controls, including a user-namespace limit, seccomp blocking unshare, or another host policy. Upstream bubblewrap uses this generic error for namespace restrictions ^1^.

    No public Microsoft notice currently confirms that Container Apps Consumption hosts changed user.max_user_namespaces, AppArmor, or seccomp around November 20, 2026. The November Container Apps extension notes include job ownership hardening and other runtime changes, but do not list a user-namespace change ^2^.

    A recent MXC issue separately documents the same important behavior: software can detect bwrap as installed even though the hosting platform does not permit it to create namespaces ^3^. That supports treating successful binary detection as insufficient, but it does not establish the Container Apps host change.

    No supported namespace-enablement control

    Container Apps does not permit privileged containers with host-level access ^4^. The published Container Apps job schema exposes containers, init containers, volumes, and workload-profile selection, but not sysctls, seccomp profiles, AppArmor profiles, hostUsers, or privileged mode ^5^.

    Therefore:

    • There is no documented per-job switch to allow CLONE_NEWUSER or set user.max_user_namespaces.
    • Changing from Consumption to Dedicated is not a documented fix. Dedicated provides reserved compute resources; it does not document customer control over host namespace or security policies ^6^.
    • A different Container Apps environment type likewise does not expose these kernel controls.
    • Adding CAP_SYS_ADMIN or running as root would not be a supported workaround for the absence of privileged host access.

    AKS has explicit security-context and node-level configuration surfaces, but those AKS capabilities should not be inferred to exist in managed Container Apps. For example, AKS documentation explains that seccomp can block unshare and that user namespaces have specific node OS and Kubernetes prerequisites ^7^.

    For short-lived, untrusted shell commands:

    1. Create a Dynamic Sessions session pool in East US 2, which is listed as supported.
    2. Choose:
      • Code interpreter sessions when their built-in runtimes are sufficient.
      • Custom container sessions when you need your Debian image, shell tools, or other custom dependencies.
    3. Submit each untrusted execution under a separate session identifier.
    4. Apply network controls appropriate to the command.
    5. Allow the session to expire after its cooldown period, or stop it explicitly when execution finishes.

    Dynamic Sessions provide Hyper-V isolation, isolate sessions from one another and from the host, and automatically deprovision ephemeral environments ^8^. Custom container sessions run your supplied image in its own Hyper-V sandbox and are specifically documented for user-provided code, cloud shells, and hostile multitenant scenarios ^9^.

    This removes the need to construct another sandbox with bwrap inside an ordinary job container. Microsoft’s Container Apps architecture guidance also recommends Sandboxes for isolated environments with state or explicit lifecycle control, and Dynamic Sessions for managed ephemeral execution ^10^.

    Escalating the apparent platform regression

    Because the same immutable image previously succeeded and now fails, open an Azure support request for Container Apps → Jobs / Runtime, including:

    • Subscription, environment, job, region, and execution IDs.
    • UTC timestamps of the last known successful and first failed executions.
    • Image digest—not only its tag—for both tests.
    • The exact bwrap command and stderr.
    • Confirmation that both manual executions used the same job definition.
    • A request for the service team to check host rollout history and effective user-namespace/seccomp policy for those replicas.

    Only the Container Apps service team can confirm the effective host sysctl and security profile, because those host controls are not exposed through the job configuration surface.


    References

    1. bwrap: No permissions to creating new namespace · Issue #324 · containers/bubblewrap
    2. Azure Container Apps extension release notes
    3. [Bubblewrap] platform_support () reports bubblewrap available where bwrap cannot create namespaces, and run () returns bwrap's failure as the workload's exit code · Issue #1494 · microsoft/mxc
    4. Containers in Azure Container Apps
    5. Microsoft.App jobs 2026-07-01 (deployment-language-terraform)
    6. Workload profiles in Azure Container Apps
    7. Secure container access to resources for Azure Kubernetes Service (AKS) workloads using built-in Linux security features (apparmor)
    8. Dynamic sessions in Azure Container Apps
    9. Azure Container Apps custom container sessions
    10. Architecture best practices for Azure Container Apps
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.