Skip to content

Commit 6c55ab2

Browse files
committed
Move to sig-auth, add PRR, and address comments
Signed-off-by: Rita Zhang <[email protected]>
1 parent 000e6ff commit 6c55ab2

File tree

3 files changed

+27
-17
lines changed

3 files changed

+27
-17
lines changed

keps/prod-readiness/sig-auth/5018.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# "prod-readiness-approvers" group
33
# of http://git.k8s.io/enhancements/OWNERS_ALIASES
44
kep-number: 5018
5-
disabled:
6-
approver:
5+
alpha:
6+
approver: ""

keps/sig-node/5018-dra-adminaccess/README.md keps/sig-auth/5018-dra-adminaccess/README.md

+21-13
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,19 @@ objects as privileged. This feature includes:
179179
kubernetes.io/dra-admin-access: "true"
180180
```
181181
182+
Assumptions:
183+
184+
- It is not important to subdivide admin access to different types of
185+
devices.
186+
- Ability to label (or relabel) namespaces is not granted to low-privileged
187+
namespace-constrained users (this is the same assumption that
188+
PodSecurityAdmission makes).
189+
182190
1. Authorization Check:
183191
184-
In the REST storage layer, validate requests to create `ResourceClaim` or
185-
`ResourceClaimTemplate` objects with `adminAccess: true`. Only authorize if
186-
namespace has the `kubernetes.io/dra-admin-access` label.
192+
In the REST storage layer, validate requests to create and update
193+
`ResourceClaim` or `ResourceClaimTemplate` objects with `adminAccess: true`.
194+
Only authorize if namespace has the `kubernetes.io/dra-admin-access` label.
187195

188196
1. Grants privileged access to the requested device:
189197

@@ -203,8 +211,9 @@ objects as privileged. This feature includes:
203211
1. A cluster administrator labels an admin namespace with
204212
`kubernetes.io/dra-admin-access`.
205213

206-
1. Only authorized users can create `ResourceClaim` or `ResourceClaimTemplate`
207-
objects with `adminAccess: true` in this admin namespace.
214+
1. Users who are authorized to create `ResourceClaim` or `ResourceClaimTemplate`
215+
objects in this admin namespace can set `adminAccess: true` field if they
216+
want to.
208217

209218
1. Only users with access to the admin namespace can reference these
210219
`ResourceClaims` or `ResourceClaimTemplates` in their pod or deployment
@@ -263,8 +272,7 @@ Starting in Kubernetes 1.33 (when this KEP was introduced), a validation has
263272
been added to the REST storage layer to only authorize `ResourceClaim` or
264273
`ResourceClaimTemplate` with `adminAccess: true` requests if their namespace has
265274
the `kubernetes.io/dra-admin-access` label to only allow it for users with
266-
additional privileges. More time is needed to figure out how that should work,
267-
therefore the field is placed behind the `DRAAdminAccess` feature gate.
275+
additional privileges.
268276

269277
The `DRAAdminAccess` feature gate controls whether users can set the
270278
`adminAccess` field to true when requesting devices. That is checked in the
@@ -283,10 +291,6 @@ admin namespace label.
283291

284292
### Kube-controller-manager Changes
285293

286-
// TODO: what part of claim.Status.Allocation should be updated? e.g.
287-
AdminAccess is part of `DeviceRequestAllocationResult` but need to set it for
288-
each device?
289-
290294
In pkg/controller/resourceclaim/controller.go, process requests in `handleClaim`
291295
function to prevent creation of `ResourceClaim` when the `ResourceClaimTemplate`
292296
has the `adminAccess` field while the feature gate is turned off.
@@ -387,6 +391,7 @@ ResourceClaimTemplate and ResourceClaim for admin access
387391

388392
- Gather feedback
389393
- Additional tests are in Testgrid and linked in KEP
394+
- Implementations in the kubernetes-sigs/dra-example-driver
390395

391396
#### GA
392397

@@ -682,6 +687,9 @@ The following options were also considered:
682687
approach cannot be used to control access for an in-tree type because
683688
Kubernetes has no mechanism to apply a system VAP to all new clusters
684689
automatically and therefore it is not sufficient for conformance.
685-
- Builtin admission controller: This is doable, but more work than the approach
686-
described in this KEP.
690+
- Builtin admission controller: This approach allows removal of a check, which
691+
is not what we want. The REST storage approach leaves the control in the hands
692+
of the cluster admin via permissions and allows the cluster admin to delegate
693+
the control so that anyone can apply labels to namespaces, but they can't
694+
prevent the check from running.
687695
- RBAC++: This is not available yet, especially for the DRA timeframe.

keps/sig-node/5018-dra-adminaccess/kep.yaml keps/sig-auth/5018-dra-adminaccess/kep.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ title: DRA Admin Access
22
kep-number: 5018
33
authors:
44
- "@ritazh"
5-
owning-sig: sig-node
5+
owning-sig: sig-auth
66
status: provisional
77
creation-date: 2025-01-02
88
reviewers:
99
- "@pohly"
10+
- "@liggitt"
11+
- "@enj"
1012
approvers:
11-
- # SIG-Node
1213
- # SIG-Auth
14+
- # SIG-Node
1315

1416
see-also:
1517
- "/keps/sig-node/4381-dra-structured-parameters"

0 commit comments

Comments
 (0)