- 
                Notifications
    You must be signed in to change notification settings 
- Fork 83
api: expose container user/group ID to plugins. #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api: expose container user/group ID to plugins. #230
Conversation
Obtain the container's user, group and supplemental group IDs from OCI Spec.Process.User and expose it to plugins. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
| Thanks @klihub, this patch would be really helpful for our use case. In our setup, we inject a custom script through the NRI hook injector plugin to adjust volume mounts. The script’s logic depends on the pod’s user and group ( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely, I was not aware it was as simple as exposing the User from the spec.
This is very helpful to us going forward, thank you!
| 
 user placed into the container (oci) spec.. is carefully crafted :-) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
NIT wdyt about also adding umask, username?
is this the first "useful" linux vs windows fields area did we talk about that?
see examples here:  https://github.com/opencontainers/runtime-spec/blob/main/config.md#user
not saying I want LinuxUser vs WindowsUser.. just sayin it's worth a discussion.
| 
 @mikebrow Username I was looking at, but since it is Windows only and we don't really have any Windows support at the moment, it was left out. If we start adding Windows support at some point, we can/should add it then. Umask we can definitely add, now or later, if we find it useful for an external observer or just for the sake of completeness. 
 We have deliberately omitted anything windows-specific so far. | 
Expose container user, group and supplemental group info to NRI plugins.