mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Merge pull request #49677 from dims/send-missing-uid-field-during-webhook-authorize
Automatic merge from submit-queue (batch tested with PRs 50103, 49677, 49449, 43586, 48969) Add missing UID in SubjectAccessReviewSpec **What this PR does / why we need it**: WebhookAuthorizer's Authorize should send *all* the information present in the user.Info data structure. We are not sending the UID currently. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note The SubjectAccessReview API in the authorization.k8s.io API group now allows providing the user uid. ```
This commit is contained in:
@@ -120,6 +120,7 @@ func (a *sarApprover) authorize(csr *capi.CertificateSigningRequest, rattrs auth
|
||||
sar := &authorization.SubjectAccessReview{
|
||||
Spec: authorization.SubjectAccessReviewSpec{
|
||||
User: csr.Spec.Username,
|
||||
UID: csr.Spec.UID,
|
||||
Groups: csr.Spec.Groups,
|
||||
Extra: extra,
|
||||
ResourceAttributes: &rattrs,
|
||||
|
||||
Reference in New Issue
Block a user