diff --git a/vendor/github.com/coreos/go-oidc/jwks.go b/vendor/github.com/coreos/go-oidc/jwks.go index 433025852c4dd..d52c91325c38b 100644 --- a/vendor/github.com/coreos/go-oidc/jwks.go +++ b/vendor/github.com/coreos/go-oidc/jwks.go @@ -233,6 +233,16 @@ func (r *remoteKeySet) updateKeys() ([]jose.JSONWebKey, time.Time, error) { for i, k := range keySet.Keys { kids[i] = k.KeyID } + + klog.Infof( + "http response header", + logHeaders(resp.Header), + "kids: %+v", + kids, + "url: %s", + r.jwksURL, + ) + klog.Infof("got %d keys from %s. kids: %+v", len(kids), r.jwksURL, kids) // If the server doesn't provide cache control headers, assume the @@ -245,3 +255,13 @@ func (r *remoteKeySet) updateKeys() ([]jose.JSONWebKey, time.Time, error) { } return keySet.Keys, expiry, nil } + +func logHeaders(r http.Header) string { + multiline := "" + for name, values := range r.Clone() { + for _, value := range values { + multiline = fmt.Sprintf("%s\n%s: %s", multiline, name, value) + } + } + return multiline +}