Skip to content

Commit 922b5f6

Browse files
committed
Updated kep template with the latest and fix typos
1 parent c80f656 commit 922b5f6

File tree

1 file changed

+126
-9
lines changed
  • keps/sig-node/3619-supplemental-groups-policy

1 file changed

+126
-9
lines changed

keps/sig-node/3619-supplemental-groups-policy/README.md

Lines changed: 126 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
1-
# KEP-3619: Fine-grained SupplementalGroups control
2-
31
<!--
2+
**Note:** When your KEP is complete, all of these comment blocks should be removed.
3+
4+
To get started with this template:
5+
6+
- [ ] **Pick a hosting SIG.**
7+
Make sure that the problem space is something the SIG is interested in taking
8+
up. KEPs should not be checked in without a sponsoring SIG.
9+
- [ ] **Create an issue in kubernetes/enhancements**
10+
When filing an enhancement tracking issue, please make sure to complete all
11+
fields in that template. One of the fields asks for a link to the KEP. You
12+
can leave that blank until this KEP is filed, and then go back to the
13+
enhancement and add the link.
14+
- [ ] **Make a copy of this template directory.**
15+
Copy this template into the owning SIG's directory and name it
16+
`NNNN-short-descriptive-title`, where `NNNN` is the issue number (with no
17+
leading-zero padding) assigned to your enhancement above.
18+
- [ ] **Fill out as much of the kep.yaml file as you can.**
19+
At minimum, you should fill in the "Title", "Authors", "Owning-sig",
20+
"Status", and date-related fields.
21+
- [ ] **Fill out this file as best you can.**
22+
At minimum, you should fill in the "Summary" and "Motivation" sections.
23+
These should be easy if you've preflighted the idea of the KEP with the
24+
appropriate SIG(s).
25+
- [ ] **Create a PR for this KEP.**
26+
Assign it to people in the SIG who are sponsoring this process.
27+
- [ ] **Merge early and iterate.**
28+
Avoid getting hung up on specific details and instead aim to get the goals of
29+
the KEP clarified and merged quickly. The best way to do this is to just
30+
start with the high-level sections and fill out details incrementally in
31+
subsequent PRs.
32+
433
Just because a KEP is merged does not mean it is complete or approved. Any KEP
534
marked as `provisional` is a working document and subject to change. You can
635
denote sections that are under active debate as follows:
@@ -10,6 +39,41 @@ denote sections that are under active debate as follows:
1039
Stuff that is being argued.
1140
<<[/UNRESOLVED]>>
1241
```
42+
43+
When editing KEPS, aim for tightly-scoped, single-topic PRs to keep discussions
44+
focused. If you disagree with what is already in a document, open a new PR
45+
with suggested changes.
46+
47+
One KEP corresponds to one "feature" or "enhancement" for its whole lifecycle.
48+
You do not need a new KEP to move from beta to GA, for example. If
49+
new details emerge that belong in the KEP, edit the KEP. Once a feature has become
50+
"implemented", major changes should get new KEPs.
51+
52+
The canonical place for the latest set of instructions (and the likely source
53+
of this file) is [here](/keps/NNNN-kep-template/README.md).
54+
55+
**Note:** Any PRs to move a KEP to `implementable`, or significant changes once
56+
it is marked `implementable`, must be approved by each of the KEP approvers.
57+
If none of those approvers are still appropriate, then changes to that list
58+
should be approved by the remaining approvers and/or the owning SIG (or
59+
SIG Architecture for cross-cutting KEPs).
60+
-->
61+
# KEP-3619: Fine-grained SupplementalGroups control
62+
63+
<!--
64+
This is the title of your KEP. Keep it short, simple, and descriptive. A good
65+
title can help communicate what the KEP is and should be considered as part of
66+
any review.
67+
-->
68+
69+
<!--
70+
A table of contents is helpful for quickly jumping to sections of a KEP and for
71+
highlighting any additional information provided beyond the standard KEP
72+
template.
73+
74+
Ensure the TOC is wrapped with
75+
<code>&lt;!-- toc --&rt;&lt;!-- /toc --&rt;</code>
76+
tags, and then generate with `hack/update-toc.sh`.
1377
-->
1478

1579
<!-- toc -->
@@ -27,7 +91,7 @@ Stuff that is being argued.
2791
- [CRI](#cri)
2892
- [SupplementalGroupsPolicy in SecurityContext](#supplementalgroupspolicy-in-securitycontext)
2993
- [user in ContainerStatus](#user-in-containerstatus-1)
30-
- [User Stories](#user-stories)
94+
- [User Stories (Optional)](#user-stories-optional)
3195
- [Story 1: Deploy a Security Policy to enforce <code>SupplementalGroupsPolicy</code> field](#story-1-deploy-a-security-policy-to-enforce--field)
3296
- [Notes/Constraints/Caveats (Optional)](#notesconstraintscaveats-optional)
3397
- [Risks and Mitigations](#risks-and-mitigations)
@@ -106,6 +170,25 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
106170

107171
## Summary
108172

173+
<!--
174+
This section is incredibly important for producing high-quality, user-focused
175+
documentation such as release notes or a development roadmap. It should be
176+
possible to collect this information before implementation begins, in order to
177+
avoid requiring implementors to split their attention between writing release
178+
notes and implementing the feature itself. KEP editors and SIG Docs
179+
should help to ensure that the tone and content of the `Summary` section is
180+
useful for a wide audience.
181+
182+
A good summary is probably at least a paragraph in length.
183+
184+
Both in this section and below, follow the guidelines of the [documentation
185+
style guide]. In particular, wrap lines to a reasonable length, to make it
186+
easier for reviewers to cite specific portions, and to minimize diff churn on
187+
updates.
188+
189+
[documentation style guide]: https://github.com/kubernetes/community/blob/master/contributors/guide/style-guide.md
190+
-->
191+
109192
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.
110193

111194
### The issue
@@ -161,6 +244,15 @@ uid=1000(alice) gid=1000(alice) groups=1000(alice),50000(group-in-image),60000
161244

162245
## Motivation
163246

247+
<!--
248+
This section is for explicitly listing the motivation, goals, and non-goals of
249+
this KEP. Describe why the change is important and the benefits to users. The
250+
motivation section can optionally provide links to [experience reports] to
251+
demonstrate the interest in a KEP within the wider Kubernetes community.
252+
253+
[experience reports]: https://github.com/golang/go/wiki/ExperienceReports
254+
-->
255+
164256
As described above, how supplemental groups attached to the first container process is complicated and not OCI image spec compliant.
165257

166258
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.
@@ -254,7 +346,7 @@ message ContainerUser {
254346
}
255347
```
256348

257-
### User Stories
349+
### User Stories (Optional)
258350

259351
<!--
260352
Detail the things that people will be able to do if this KEP is implemented.
@@ -263,6 +355,7 @@ the system. The goal here is to make this feel real for users without getting
263355
bogged down.
264356
-->
265357

358+
266359
#### Story 1: Deploy a Security Policy to enforce `SupplementalGroupsPolicy` field
267360

268361
Assume a multi-tenant kubernetes cluster with `hostPath` volumes below situations:
@@ -294,6 +387,8 @@ As described in [Summary](#summary) section, `alice` can bypass the restriction
294387

295388
Please note that a security policy without `supplementalGroupsPolicy` would lead to unexpected groups for the first process in the containers.
296389

390+
<!-- #### Story 2 -->
391+
297392
### Notes/Constraints/Caveats (Optional)
298393

299394
<!--
@@ -325,6 +420,13 @@ Consider including folks who also work outside the SIG or subproject.
325420

326421
## Design Details
327422

423+
<!--
424+
This section should contain enough information that the specifics of your
425+
change are understandable. This may include API specs (though not always
426+
required) or even code snippets. If there's any ambiguity about HOW your
427+
proposal will be implemented, this is the place to discuss them.
428+
-->
429+
328430
### Kubernetes API
329431

330432
#### SupplementalGroupsPolicy in PodSecurityContext
@@ -626,7 +728,7 @@ enhancement:
626728
CRI or CNI may require updating that component before the kubelet.
627729
-->
628730

629-
- CRI must support this feature, especially when using `SupplementalGroupsPolicy=IgnoreGroupsInImage`.
731+
- CRI must support this feature, especially when using `SupplementalGroupsPolicy=Strict`.
630732
- kubelet must be at least the version of control-plane components.
631733

632734
## Production Readiness Review Questionnaire
@@ -687,6 +789,7 @@ well as the [existing list] of feature gates.
687789
Any change of default behavior may be surprising to users or break existing
688790
automations, so be extremely careful here.
689791
-->
792+
690793
No. Just introducing new API fields in Pod spec and CRI which does NOT change the default behavior.
691794

692795
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
@@ -702,11 +805,11 @@ feature.
702805
NOTE: Also set `disable-supported` to `true` or `false` in `kep.yaml`.
703806
-->
704807

705-
Yes. It can be disabled after enabled. However, users should pay attention that gids of container processes in pods with `IgnoreGroupsInImage` policy would change. It means the action might break the application in permission. We plan to provide a way for users to detect which pods are affected.
808+
Yes. It can be disabled after enabled. However, users should pay attention that gids of container processes in pods with `Strict` policy would change. It means the action might break the application in permission. We plan to provide a way for users to detect which pods are affected.
706809

707810
###### What happens if we reenable the feature if it was previously rolled back?
708811

709-
Just the policy `IgnoreGroupsInImage` is reenabled. Users should pay attention that gids of containers in pods with `IgnoreGroupsInImage` policy would change. It means that the action might break the application in permission. We plan to provide a way for users to detect which pods are affected.
812+
Just the policy `Stcict` is reenabled. Users should pay attention that gids of containers in pods with `Stcict` policy would change. It means that the action might break the application in permission. We plan to provide a way for users to detect which pods are affected.
710813

711814
###### Are there any tests for feature enablement/disablement?
712815

@@ -919,7 +1022,7 @@ Describe them, providing:
9191022
- Estimated amount of new objects: (e.g., new Object X for every existing Pod)
9201023
-->
9211024

922-
No.
1025+
Precisely, yes because the kep introduces new API fields in Pods. But the increasing size can be negligible.
9231026

9241027
###### Will enabling / using this feature result in increasing time taken by any operations covered by existing SLIs/SLOs?
9251028

@@ -948,6 +1051,18 @@ This through this both in small and large cases, again with respect to the
9481051

9491052
No.
9501053

1054+
###### Can enabling / using this feature result in resource exhaustion of some node resources (PIDs, sockets, inodes, etc.)?
1055+
1056+
<!--
1057+
Focus not just on happy cases, but primarily on more pathological cases
1058+
(e.g. probes taking a minute instead of milliseconds, failed pods consuming resources, etc.).
1059+
If any of the resources can be exhausted, how this is mitigated with the existing limits
1060+
(e.g. pods per node) or new limits added by this KEP?
1061+
1062+
Are there any tests that were run/should be run to understand performance characteristics better
1063+
and validate the declared limits?
1064+
-->
1065+
9511066
### Troubleshooting
9521067

9531068
<!--
@@ -999,6 +1114,8 @@ Major milestones might include:
9991114
Why should this KEP _not_ be implemented?
10001115
-->
10011116

1117+
N/A
1118+
10021119
## Alternatives
10031120

10041121
<!--
@@ -1027,4 +1144,4 @@ new subproject, repos requested, or GitHub details. Listing these here allows a
10271144
SIG to get the process for these resources started right away.
10281145
-->
10291146

1030-
N/A
1147+
N/A

0 commit comments

Comments
 (0)