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:
Kubernetes Submit Queue
2017-08-03 16:43:34 -07:00
committed by GitHub
22 changed files with 460 additions and 210 deletions

View File

@@ -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,