From 9d459a54d27557cfc23a0768b69522b0157b6840 Mon Sep 17 00:00:00 2001 From: Shingo Omura Date: Mon, 13 Feb 2023 10:57:40 +0900 Subject: [PATCH 1/3] remove unnecessary comments --- .../3619-supplemental-groups-policy/README.md | 216 ------------------ 1 file changed, 216 deletions(-) diff --git a/keps/sig-node/3619-supplemental-groups-policy/README.md b/keps/sig-node/3619-supplemental-groups-policy/README.md index 3c298ce6420..35aee0cc503 100644 --- a/keps/sig-node/3619-supplemental-groups-policy/README.md +++ b/keps/sig-node/3619-supplemental-groups-policy/README.md @@ -1,76 +1,6 @@ - # KEP-3619: Fine-grained SupplementalGroups control - - - The KEP seeks to provide a way to choose correct behavior with how Container Runtimes (Containerd and CRI-O) are applying `SupplementalGroups` to the first container processes. The KEP describes the work needed to be done in Kubernetes or connected projects to make sure customers have a clear migration path - including detection and safe upgrade - if any of their workflows took a dependency on this arguably erroneous behavior. ### The issue @@ -247,15 +158,6 @@ uid=1000(alice) gid=1000(alice) groups=1000(alice),50000(group-in-image),60000 ## Motivation - - As described above, how supplemental groups attached to the first container process is complicated and not OCI image spec compliant. Moreover, this causes security considerations as follows. When a cluster enforces some security policy for pods that protects the value of `RunAsGroup` and `SupplementalGroups`, the effect of its enforcement is limited, i.e., cluster users can easily bypass the policy enforcement just by using a custom image. If such a bypass happened, it would be unexpected behavior for most cluster administrators because the enforcement is almost useless. Moreover, the bypass will cause unexpected file access permission. In some use cases, the unexpected file access permission will be a security concern. For example, using `hostPath` volumes could be a severe problem because UID/GIDs matter in accessing files/directories in the volumes. @@ -266,36 +168,17 @@ Thus, this KEP proposes to offer a new API field named `SupplementalGroupsPolicy ### Goals - - - To Provide a new API field to control exactly which groups the container process belongs to - Ensure there are clear steps documented for end users to detect if their workload is affected - (Optional) provide helper APIs and/or tooling to simplify the detection ### Non-Goals - - - To provide a cluster-wide control method. - To change the default behavior (a potentially breaking change) ## Proposal - - This KEP proposes changes both on Kubernets API and CRI levels. ### Kubernetes API @@ -351,14 +234,6 @@ message ContainerUser { ### User Stories (Optional) - - - #### Story 1: Deploy a Security Policy to enforce `SupplementalGroupsPolicy` field Assume a multi-tenant kubernetes cluster with `hostPath` volumes below situations: @@ -394,42 +269,16 @@ Please note that a security policy without `supplementalGroupsPolicy` would lead ### Notes/Constraints/Caveats (Optional) - - The proposal affects to the CRI implementations (e.g., containerd, cri-o, gVisor, etc.) ### Risks and Mitigations - - - How to track the support status in CRI implementations of this proposal? - This feature is mainly implemented inside each CRI implementation. - How to feature-gate this feature in CRI implementations? ## Design Details - - ### Kubernetes API #### SupplementalGroupsPolicy in PodSecurityContext @@ -648,34 +497,6 @@ We expect no non-infra related flakes in the last month as a GA graduation crite ### Graduation Criteria - - Because this KEP's core implementation(i.e. `SupplementalGroupsPolicy` handling) lies inside of CRI implementations(e.g. containerd, cri-o), the graduation criteria contains the support statuses of the updated CRI by container runtimes. #### Alpha @@ -700,33 +521,8 @@ Because this KEP's core implementation(i.e. `SupplementalGroupsPolicy` handling) ### Upgrade / Downgrade Strategy - - ### Version Skew Strategy - - - CRI must support this feature, especially when using `SupplementalGroupsPolicy=Strict`. - kubelet must be at least the version of control-plane components. @@ -1117,12 +913,6 @@ N/A ## Alternatives - - ### Introducing `RutimeClass` As described in the [Motivation](#motivation) section, cluster administrators would need to deploy a custom low-level container runtime(e.g., [pfnet-research/strict-supplementalgroups-container-runtime](https://github.com/pfnet-research/strict-supplementalgroups-container-runtime)) that modifies OCI container runtime spec(`config.json`) produced by CRI implementations (e.g., containerd, cri-o). A custom `RuntimeClass` would be introduced for it. @@ -1137,10 +927,4 @@ We could just fix CRI implementations directly without introducing new APIs. Th ## Infrastructure Needed (Optional) - - N/A From ec9207d293fe04b7b48125df8c7b569eb7249b39 Mon Sep 17 00:00:00 2001 From: Shingo Omura Date: Mon, 13 Feb 2023 10:58:13 +0900 Subject: [PATCH 2/3] filled out "No" to "Can enabling / using this feature result in resource exhaustion of some node resources (PIDs, sockets, inodes, etc.)?" which missed to answer. --- keps/sig-node/3619-supplemental-groups-policy/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keps/sig-node/3619-supplemental-groups-policy/README.md b/keps/sig-node/3619-supplemental-groups-policy/README.md index 35aee0cc503..326ba9707ea 100644 --- a/keps/sig-node/3619-supplemental-groups-policy/README.md +++ b/keps/sig-node/3619-supplemental-groups-policy/README.md @@ -858,6 +858,8 @@ Are there any tests that were run/should be run to understand performance charac and validate the declared limits? --> +No. + ### Troubleshooting +- 2023-02-10: Initial KEP published. + ## Drawbacks