Skip to content

feat(driver-podman): add user namespace (userns) support for sandbox containers #2554

Closed

Description

@giuseppe

Problem Statement

Running Podman sandbox containers with user namespace isolation (--userns=auto) improves security by mapping container UIDs to unprivileged host UID ranges. The Podman driver currently has no way to configure the user namespace mode, and the supervisor binary injection via image volumes is incompatible with user namespaces because the kernel does not support idmapped mounts on overlay filesystems (and supporting it in Podman is not trivial as we need to apply the idmap to the lower layers).

Proposed Design

Add a userns string field to PodmanComputeConfig. When set to "auto", the driver sets idmappings.AutoUserNs = true alongside userns.nsmode, and falls back to extracting the supervisor binary from the image to a host-side cache and bind-mounting it, because Podman image volumes use overlay mounts and overlay does not support idmapped mounts.
▎

Alternatives Considered

Support idmap for image mounts in Podman, but this is not trivial, and will need a new Podman release.

Agent Investigation

Verified on kernel 7.2.0-rc2 that mount_setattr on overlay merge dirs returns EINVAL. Confirmed idmap works on regular bind mounts. Modeled extraction flow after the Docker driver's extract_supervisor_bin_from_image().

Checklist

  • I've reviewed existing issues and the architecture docs
  • This is a design proposal, not a "please build this" request

Activity

  1. giuseppe commented on Jul 30, 2026

    @giuseppe
    ContributorAuthor
  2. mrunalp commented on Jul 30, 2026

    @mrunalp
    Collaborator

    @giuseppe You can open a PR and we can review there. Thanks!

  3. giuseppe commented on Jul 30, 2026

    @giuseppe
    ContributorAuthor

    Thanks. Opened here: #2562

  4. krishicks commented on Aug 14, 2026

    @krishicks
    Collaborator

    📋 triage-agent

    Removing state:triage-needed as workflow cleanup. Agent review of the issue's current state found substantive maintainer discussion, indicating that it is no longer awaiting initial triage. This label removal does not imply roadmap acceptance or implementation priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions