Skip to content

Commit a1c3dcd

Browse files
committed
KEP-4193: updates to reflect latest state of feature
1 parent ab65248 commit a1c3dcd

File tree

1 file changed

+15
-4
lines changed
  • keps/sig-auth/4193-bound-service-account-token-improvements

1 file changed

+15
-4
lines changed

keps/sig-auth/4193-bound-service-account-token-improvements/README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ When a TokenRequest is being issued/fulfilled, we will modify the issuing code t
148148
can be later used to trace the requests that a specific issued token has made to the apiserver via the audit log.
149149

150150
This will require changing the JWT issuing code to actually generate this UUID, as well as extending the code around the
151-
audit log to have it record this information into audit entries.
151+
audit log to have it record this information into audit entries when a token is issued (as `authentication.k8s.io/issued-credential-id`).
152+
153+
As this UUID will be embedded as part of a user's ExtraInfo, it'll automatically be persisted into audit events for all
154+
requests made using a token that embeds a credential identifier (as `authentication.k8s.io/credential-id`).
152155

153156
### User Stories (Optional)
154157

@@ -164,10 +167,10 @@ The node assertion can be checked to ensure the host identity matches the node a
164167
Bob is an administrator of a cluster and has noticed some strange request patterns from an unknown service account.
165168

166169
Bob would like to understand who initially issued/authorised this token to be issued. To do so, Bob looks up the JTI
167-
of the token making the suspicious requests by looking inside the audit log entries for these suspect requests.
170+
of the token making the suspicious requests by looking inside the audit log entries at user's ExtraInfo for these suspect requests.
168171

169172
This JTI is then used for a further audit log lookup - namely, looking for the TokenRequest `create` call which contains
170-
the audit annotation with key `authentication.kubernetes.io/token-identifier` and the value set to that of the suspect token.
173+
the audit annotation with key `authentication.kubernetes.io/issued-credential-id` and the value set to that of the suspect token.
171174

172175
This allows Bob to determine precisely who made the original request for this token, and (depending on the 'chain'
173176
above this token), allows Bob to recursively perform this lookup to find all involved parties that led to this token
@@ -304,7 +307,11 @@ https://storage.googleapis.com/k8s-triage/index.html
304307
#### Beta
305308

306309
- Decide what the default of the new flag should be
310+
- Decision: this flag was not added during alpha, and MAY be added post-beta, but will definitely default to **off**.
311+
- This does not need to block promotion of ServiceAccountTokenPodNodeInfo feature as a result.
307312
- Decide if using an audit annotation is the correct approach
313+
- Decision: audit annotation is the correct approach as this is only for `serviceaccounts/<name>/token` requests, not all
314+
- Renaming audit annotation to `authentication.kubernetes.io/issued-credential-id` to disambiguate from `authentication.kubernetes.io/credential-id` in user's ExtraInfo
308315
- Docs around the SA JWT schema (this does not exist today)
309316

310317
#### GA
@@ -360,9 +367,13 @@ you need any help or guidance.
360367

361368
* `ServiceAccountTokenJTI` feature flag will toggle including JTI information in tokens, as well as recording JTIs in the audit log / the SA user info.
362369
* `ServiceAccountTokenPodNodeInfo` feature flag will toggle including node info associated with pods in tokens.
370+
* `ServiceAccountTokenNodeBindingValidation` feature flag will toggle the apiserver validating Node claims in node bound service account tokens.
363371
* `ServiceAccountTokenNodeBinding` feature flag will toggle allowing service account tokens to be bound to Node objects.
364372

365-
Both of these feature flags can be disabled without any unexpected adverse affects or coordination required.
373+
The `ServiceAccountTokenNodeBindingValidation` feature will graduate to beta one release earlier than `ServiceAccountTokenNodeBinding`
374+
to ensure a safe rollback from version N+1 to N (more info below in rollback considerations section).
375+
376+
All other feature flags can be disabled without any unexpected adverse affects or coordination required.
366377

367378
###### How can this feature be enabled / disabled in a live cluster?
368379

0 commit comments

Comments
 (0)