mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-09-19 22:44:18 +00:00
Fix bug which prevented watches from working through impersonator
Also: - Changed base64 encoding of impersonator bearer tokens to use `base64.StdEncoding` to make it easier for users to manually create a token using the unix `base64` command - Test the headers which are and are not passed through to the Kube API by the impersonator more carefully in the unit tests - More WIP on concierge_impersonation_proxy_test.go Signed-off-by: Margo Crawford <margaretc@vmware.com>
This commit is contained in:
committed by
Margo Crawford
parent
b8592a361c
commit
80ff5c1f17
@@ -294,7 +294,7 @@ func execCredentialForImpersonationProxy(
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error creating TokenCredentialRequest for impersonation proxy: %w", err)
|
||||
}
|
||||
encodedToken := base64.RawURLEncoding.EncodeToString(reqJSON)
|
||||
encodedToken := base64.StdEncoding.EncodeToString(reqJSON)
|
||||
cred := &clientauthv1beta1.ExecCredential{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: "ExecCredential",
|
||||
|
||||
@@ -288,5 +288,5 @@ func impersonationProxyTestToken(token string) string {
|
||||
},
|
||||
},
|
||||
})
|
||||
return base64.RawURLEncoding.EncodeToString(reqJSON)
|
||||
return base64.StdEncoding.EncodeToString(reqJSON)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user