Sponsored Content
Skip to content

runAsGroup vs supplementalGroups #1180

Open

Description

@vbatts

There is a thread going on in k8s KEP regarding subtle and inconsistent behaviors between runAsGroup and supplementalGroups.

@thockin summarizes here: kubernetes/enhancements#3620 (comment)

It sounds like runtime-spec and runc may currently be inconsistent/broken, but to "fix" it would be potentially a breaking change.

cc @opencontainers/runtime-spec-maintainers

Activity

  1. changed the title [-]runAsGroup vs supplementalGroups[/-] [+]`runAsGroup` vs `supplementalGroups`[/+] on Feb 6, 2023
  2. vbatts commented on Feb 6, 2023

    @vbatts
    MemberAuthor

    cc @opencontainers/runc-maintainers too

  3. thockin commented on Feb 6, 2023

    @thockin
  4. mrunalp commented on Feb 6, 2023

    @mrunalp
    Contributor

    Image spec covers how to convert values over from config.User to runtime config.json.
    https://github.com/opencontainers/imagespec/blob/main/conversion.md#configuser

    Runtime spec only specifies the processing of final values for uid/gid/groups as set in the config.json.
    https://github.com/opencontainers/runtime-spec/blob/main/config.md#posix-platform-user
    and has a note:

    Note: symbolic name for uid and gid, such as uname and gname respectively, are left to upper levels to derive (i.e. /etc/passwd parsing, NSS, etc)
    

    What we have missing is the runtime override behavior that @thockin comments here cover:
    kubernetes/enhancements#3620 (comment)
    kubernetes/enhancements#3620 (comment)

    There isn't a clear place for it in OCI as we don't define an API/CLI for higher level runtimes in the runtime spec.

    Possible choices:

    1. Expand the image spec conversion with runtime overrides.
    2. Add a new section to runtime spec that covers how overrides are dealt with loose enough language so higher level CLI/API flags are covered.
    3. Not have an opinion and let K8s/CRI define it.
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