Skip to content

Commit 1053516

Browse files
nabokihmsenj
andcommitted
Apply suggestions from code review
Co-authored-by: Mo Khan <[email protected]> Signed-off-by: m.nabokikh <[email protected]>
1 parent cd3c24e commit 1053516

File tree

2 files changed

+11
-7
lines changed
  • keps

2 files changed

+11
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
kep-number: 3225
22
alpha:
3-
approver: "@enj"
3+
approver: "@deads2k"

keps/sig-auth/3325-self-subject-attributes-review-api/README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The motivation for this KEP is to reduce obscurity and help users with debugging
7373

7474
## Proposal
7575

76-
Add a new API endpoint to the `authentication` group - `SelfSubjectAttributesReview`.
76+
Add a new API endpoint to the `authentication.k8s.io` group - `SelfSubjectAttributesReview`.
7777
The user will hit the endpoint after authentication happens, so all attributes will be available to return.
7878

7979
## Design Details
@@ -92,7 +92,7 @@ type SelfSubjectAttributesReview struct {
9292
// +optional
9393
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
9494
// Status is filled in by the server with the user attributes.
95-
Status SelfSubjectAttributesReview `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`
95+
Status SelfSubjectAttributesReviewStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`
9696
}
9797
```
9898
```go
@@ -141,9 +141,9 @@ Response example:
141141

142142
User attributes are known at the moment of accessing the rest API endpoint and can be extracted from the request context.
143143

144-
NOTE: There are no audiences in requests and responses since the SelfSubjectAttributesReview API is implied to be simple.
145-
Unlike the TokenReview API works, kube-apiserver will not do additional internal requests.
146-
Instead, a user will see the exact result of the authentication, which will be extracted from the request context.
144+
NOTE: Unlike the TokenReview, there are no audiences in requests and responses since
145+
the SelfSubjectAttributesReview API can only be accessed using valid credentials against the API server,
146+
meaning that the audience must always be that of the API server. Thus learning this value is not practical.
147147

148148
### RBAC
149149

@@ -186,12 +186,16 @@ Unit tests covering:
186186
2. Request returns some user attributes
187187
3. Request with a status returns overridden fields
188188

189-
Integration test covering:
189+
Integration tests covering:
190190

191191
1. Successful authentication through a simple authenticator, e.g., token or certificate authenticator
192192
2. Successful authentication through a complicated authenticator, e.g., webhook or authentication proxy authenticator
193193
3. Failed authentication
194194

195+
Command line interface tests covering:
196+
1. How successful responses are rendered in the terminal with various output modes.
197+
2. How errors are rendered.
198+
195199
### Graduation Criteria
196200

197201
`authentication.k8s.io/v1alpha1` and `authentication.k8s.io/v1beta1` apis will be reintroduced to go through the graduation cycle.

0 commit comments

Comments
 (0)