Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

runAsGroup vs supplementalGroups #1180

Open
vbatts opened this issue Feb 6, 2023 · 3 comments
Open

runAsGroup vs supplementalGroups #1180

vbatts opened this issue Feb 6, 2023 · 3 comments

Comments

@vbatts
Copy link
Member

vbatts commented Feb 6, 2023

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

@vbatts vbatts changed the title runAsGroup vs supplementalGroups runAsGroup vs supplementalGroups Feb 6, 2023
@vbatts
Copy link
Member Author

vbatts commented Feb 6, 2023

cc @opencontainers/runc-maintainers too

@thockin
Copy link

thockin commented Feb 6, 2023

Also kubernetes/enhancements#3620

@mrunalp
Copy link
Contributor

mrunalp commented Feb 6, 2023

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants