fix: NewRemoteKeySet is not using DefaultHTTPClient (#3197)

* fix: NewRemoteKeySet is not using DefaultHTTPClient

Signed-off-by: Jan Larwig <jan@larwig.com>

* doc: add changelog entry

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
Raúl Sampedro 2025-11-11 21:08:08 +01:00 committed by GitHub
parent e4becfdf1f
commit 7cf69b27fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,8 @@
## Changes since v7.13.0
- [#3197](https://github.com/oauth2-proxy/oauth2-proxy/pull/3197) fix: NewRemoteKeySet is not using DefaultHTTPClient (@rsrdesarrollo / @tuunit)
# V7.13.0
## Release Highlights

View File

@ -10,6 +10,7 @@ import (
"os"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/requests"
k8serrors "k8s.io/apimachinery/pkg/util/errors"
)
@ -127,6 +128,8 @@ func NewProviderVerifier(ctx context.Context, opts ProviderVerifierOptions) (Pro
type verifierBuilder func(*oidc.Config) *oidc.IDTokenVerifier
func getVerifierBuilder(ctx context.Context, opts ProviderVerifierOptions) (verifierBuilder, DiscoveryProvider, error) {
ctx = oidc.ClientContext(ctx, requests.DefaultHTTPClient)
if opts.SkipDiscovery {
var keySet oidc.KeySet
var err error