mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Add missing UID in SubjectAccessReviewSpec
WebhookAuthorizer's Authorize should send *all* the information present in the user.Info data structure. We are not sending the UID currently.
This commit is contained in:
@@ -121,6 +121,8 @@ type SubjectAccessReviewSpec struct {
|
||||
// Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
|
||||
// it needs a reflection here.
|
||||
Extra map[string]ExtraValue
|
||||
// UID information about the requesting user.
|
||||
UID string
|
||||
}
|
||||
|
||||
// ExtraValue masks the value so protobuf can generate
|
||||
|
||||
@@ -233,6 +233,7 @@ func autoConvert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReview
|
||||
out.User = in.User
|
||||
out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
|
||||
out.Extra = *(*map[string]authorization.ExtraValue)(unsafe.Pointer(&in.Extra))
|
||||
out.UID = in.UID
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -247,6 +248,7 @@ func autoConvert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReview
|
||||
out.User = in.User
|
||||
out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
|
||||
out.Extra = *(*map[string]v1.ExtraValue)(unsafe.Pointer(&in.Extra))
|
||||
out.UID = in.UID
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -233,6 +233,7 @@ func autoConvert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessR
|
||||
out.User = in.User
|
||||
out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
|
||||
out.Extra = *(*map[string]authorization.ExtraValue)(unsafe.Pointer(&in.Extra))
|
||||
out.UID = in.UID
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -247,6 +248,7 @@ func autoConvert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessR
|
||||
out.User = in.User
|
||||
out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
|
||||
out.Extra = *(*map[string]v1beta1.ExtraValue)(unsafe.Pointer(&in.Extra))
|
||||
out.UID = in.UID
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user