K8s: Set X-Remote-Extra-User-Instance-Role header for SignedInUser (#87958)

This commit is contained in:
Daniele Stefano Ferru 2024-05-16 11:57:49 +02:00 committed by GitHub
parent 5c27f223af
commit fbda55316d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,6 +38,9 @@ func signedInUserAuthenticator(req *http.Request) (*authenticator.Response, bool
if signedInUser.IDToken != "" {
userInfo.Extra["id-token"] = []string{signedInUser.IDToken}
}
if signedInUser.OrgRole.IsValid() {
userInfo.Extra["user-instance-role"] = []string{string(signedInUser.OrgRole)}
}
return &authenticator.Response{
User: userInfo,