Skip to content

Commit

Permalink
[TT-5777] Fix JWK fetch doesn't support proxy configuration from envi…
Browse files Browse the repository at this point in the history
…ronment (#4102)
  • Loading branch information
jonathanfoster committed Nov 8, 2024
1 parent 36afb48 commit 5249eb8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gateway/mw_jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func parseJWK(buf []byte) (*jose.JSONWebKeySet, error) {
func (k *JWTMiddleware) legacyGetSecretFromURL(url, kid, keyType string) (interface{}, error) {
var client http.Client
client.Transport = &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: &tls.Config{InsecureSkipVerify: k.Gw.GetConfig().JWTSSLInsecureSkipVerify},
}

Expand Down Expand Up @@ -883,6 +884,7 @@ func parseJWTKey(signingMethod string, secret interface{}) (interface{}, error)
func getJWK(url string, jwtSSLInsecureSkipVerify bool) (*jose.JSONWebKeySet, error) {
client := http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: &tls.Config{InsecureSkipVerify: jwtSSLInsecureSkipVerify},
},
}
Expand Down

0 comments on commit 5249eb8

Please sign in to comment.