From 4d23dd3f0388e6998231bdfbf949aeea2aae5527 Mon Sep 17 00:00:00 2001 From: Daniel Jiang Date: Thu, 14 Jan 2021 17:17:04 +0800 Subject: [PATCH] Remove raw token from header in token review reuqest The server to handle token-review may have a limitation for the size of the header. When the token is huge the token review may fail. This commit remove the necessary header to harden the flow. Signed-off-by: Daniel Jiang --- src/pkg/authproxy/http.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pkg/authproxy/http.go b/src/pkg/authproxy/http.go index 8dce618b6..fc53bd5a0 100644 --- a/src/pkg/authproxy/http.go +++ b/src/pkg/authproxy/http.go @@ -26,7 +26,6 @@ func TokenReview(rawToken string, authProxyConfig *models.HTTPAuthProxy) (k8s_ap GroupVersion: &schema.GroupVersion{}, NegotiatedSerializer: serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}, }, - BearerToken: rawToken, TLSClientConfig: getTLSConfig(authProxyConfig), } authClient, err := rest.RESTClientFor(authClientCfg)