From 04c4cd95344019a19b28f3e0220dfc88a596cd11 Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Wed, 20 Jan 2021 11:54:44 -0600 Subject: [PATCH] Upgrade to github.com/coreos/go-oidc v3.0.0. See https://github.com/coreos/go-oidc/releases/tag/v3.0.0 for release notes. Signed-off-by: Matt Moyer --- cmd/pinniped/cmd/kubeconfig.go | 2 +- cmd/pinniped/cmd/login_oidc.go | 2 +- go.mod | 2 +- go.sum | 6 ++++-- .../supervisorconfig/upstreamwatcher/upstreamwatcher.go | 2 +- internal/mocks/mockkeyset/generate.go | 2 +- internal/oidc/auth/auth_handler.go | 2 +- internal/oidc/callback/callback_handler.go | 2 +- internal/oidc/oidc.go | 2 +- internal/oidc/oidctestutil/oidc.go | 2 +- internal/oidc/token_exchange.go | 2 +- internal/upstreamoidc/upstreamoidc.go | 2 +- internal/upstreamoidc/upstreamoidc_test.go | 2 +- pkg/oidcclient/login.go | 2 +- pkg/oidcclient/login_test.go | 2 +- pkg/oidcclient/nonce/nonce.go | 2 +- pkg/oidcclient/nonce/nonce_test.go | 2 +- test/integration/e2e_test.go | 2 +- test/integration/supervisor_login_test.go | 2 +- 19 files changed, 22 insertions(+), 20 deletions(-) diff --git a/cmd/pinniped/cmd/kubeconfig.go b/cmd/pinniped/cmd/kubeconfig.go index 5bf0b342..2ccd7eb0 100644 --- a/cmd/pinniped/cmd/kubeconfig.go +++ b/cmd/pinniped/cmd/kubeconfig.go @@ -15,7 +15,7 @@ import ( "strings" "time" - "github.com/coreos/go-oidc" + "github.com/coreos/go-oidc/v3/oidc" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clientauthenticationv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" diff --git a/cmd/pinniped/cmd/login_oidc.go b/cmd/pinniped/cmd/login_oidc.go index 7802eeea..7b5f53f3 100644 --- a/cmd/pinniped/cmd/login_oidc.go +++ b/cmd/pinniped/cmd/login_oidc.go @@ -16,7 +16,7 @@ import ( "path/filepath" "time" - "github.com/coreos/go-oidc" + "github.com/coreos/go-oidc/v3/oidc" "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clientauthv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" diff --git a/go.mod b/go.mod index 4a7ff3ca..26c0c1f4 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( cloud.google.com/go v0.60.0 // indirect github.com/MakeNowJust/heredoc/v2 v2.0.1 - github.com/coreos/go-oidc v2.2.1+incompatible + github.com/coreos/go-oidc/v3 v3.0.0 github.com/davecgh/go-spew v1.1.1 github.com/go-logr/logr v0.3.0 github.com/go-logr/stdr v0.2.0 diff --git a/go.sum b/go.sum index 9b72d991..703f59de 100644 --- a/go.sum +++ b/go.sum @@ -129,9 +129,10 @@ github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkE github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= -github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-oidc/v3 v3.0.0 h1:/mAA0XMgYJw2Uqm7WKGCsKnjitE/+A0FFbOmiRJm7LQ= +github.com/coreos/go-oidc/v3 v3.0.0/go.mod h1:rEJ/idjfUyfkBit1eI1fvyr+64/g9dcKpAm8MJMesvo= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -1196,6 +1197,7 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200505041828-1ed23360d12c/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= diff --git a/internal/controller/supervisorconfig/upstreamwatcher/upstreamwatcher.go b/internal/controller/supervisorconfig/upstreamwatcher/upstreamwatcher.go index b6b55328..095133e1 100644 --- a/internal/controller/supervisorconfig/upstreamwatcher/upstreamwatcher.go +++ b/internal/controller/supervisorconfig/upstreamwatcher/upstreamwatcher.go @@ -15,7 +15,7 @@ import ( "sort" "time" - "github.com/coreos/go-oidc" + "github.com/coreos/go-oidc/v3/oidc" "github.com/go-logr/logr" "golang.org/x/oauth2" corev1 "k8s.io/api/core/v1" diff --git a/internal/mocks/mockkeyset/generate.go b/internal/mocks/mockkeyset/generate.go index a04777fc..6a120bc5 100644 --- a/internal/mocks/mockkeyset/generate.go +++ b/internal/mocks/mockkeyset/generate.go @@ -3,4 +3,4 @@ package mockkeyset -//go:generate go run -v github.com/golang/mock/mockgen -destination=mockkeyset.go -package=mockkeyset -copyright_file=../../../hack/header.txt github.com/coreos/go-oidc KeySet +//go:generate go run -v github.com/golang/mock/mockgen -destination=mockkeyset.go -package=mockkeyset -copyright_file=../../../hack/header.txt github.com/coreos/go-oidc/v3/oidc KeySet diff --git a/internal/oidc/auth/auth_handler.go b/internal/oidc/auth/auth_handler.go index f417f0c1..e5d359a8 100644 --- a/internal/oidc/auth/auth_handler.go +++ b/internal/oidc/auth/auth_handler.go @@ -9,7 +9,7 @@ import ( "net/http" "time" - coreosoidc "github.com/coreos/go-oidc" + coreosoidc "github.com/coreos/go-oidc/v3/oidc" "github.com/ory/fosite" "github.com/ory/fosite/handler/openid" "github.com/ory/fosite/token/jwt" diff --git a/internal/oidc/callback/callback_handler.go b/internal/oidc/callback/callback_handler.go index 6a6e6431..11cde441 100644 --- a/internal/oidc/callback/callback_handler.go +++ b/internal/oidc/callback/callback_handler.go @@ -11,7 +11,7 @@ import ( "net/url" "time" - coreosoidc "github.com/coreos/go-oidc" + coreosoidc "github.com/coreos/go-oidc/v3/oidc" "github.com/ory/fosite" "github.com/ory/fosite/handler/openid" "github.com/ory/fosite/token/jwt" diff --git a/internal/oidc/oidc.go b/internal/oidc/oidc.go index e8824f0b..da511515 100644 --- a/internal/oidc/oidc.go +++ b/internal/oidc/oidc.go @@ -7,7 +7,7 @@ package oidc import ( "time" - coreosoidc "github.com/coreos/go-oidc" + coreosoidc "github.com/coreos/go-oidc/v3/oidc" "github.com/ory/fosite" "github.com/ory/fosite/compose" diff --git a/internal/oidc/oidctestutil/oidc.go b/internal/oidc/oidctestutil/oidc.go index 09af7236..07a1c890 100644 --- a/internal/oidc/oidctestutil/oidc.go +++ b/internal/oidc/oidctestutil/oidc.go @@ -11,7 +11,7 @@ import ( "net/url" "testing" - coreosoidc "github.com/coreos/go-oidc" + coreosoidc "github.com/coreos/go-oidc/v3/oidc" "github.com/stretchr/testify/require" "golang.org/x/oauth2" "gopkg.in/square/go-jose.v2" diff --git a/internal/oidc/token_exchange.go b/internal/oidc/token_exchange.go index 8783084f..eed531f1 100644 --- a/internal/oidc/token_exchange.go +++ b/internal/oidc/token_exchange.go @@ -7,7 +7,7 @@ import ( "context" "net/url" - "github.com/coreos/go-oidc" + "github.com/coreos/go-oidc/v3/oidc" "github.com/ory/fosite" "github.com/ory/fosite/compose" "github.com/ory/fosite/handler/oauth2" diff --git a/internal/upstreamoidc/upstreamoidc.go b/internal/upstreamoidc/upstreamoidc.go index 43eccb15..1c0aa006 100644 --- a/internal/upstreamoidc/upstreamoidc.go +++ b/internal/upstreamoidc/upstreamoidc.go @@ -9,7 +9,7 @@ import ( "net/http" "net/url" - coreosoidc "github.com/coreos/go-oidc" + coreosoidc "github.com/coreos/go-oidc/v3/oidc" "golang.org/x/oauth2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/upstreamoidc/upstreamoidc_test.go b/internal/upstreamoidc/upstreamoidc_test.go index 53061b23..9a2d07ca 100644 --- a/internal/upstreamoidc/upstreamoidc_test.go +++ b/internal/upstreamoidc/upstreamoidc_test.go @@ -15,7 +15,7 @@ import ( "time" "unsafe" - "github.com/coreos/go-oidc" + "github.com/coreos/go-oidc/v3/oidc" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" "golang.org/x/oauth2" diff --git a/pkg/oidcclient/login.go b/pkg/oidcclient/login.go index 9718a297..53b6efd4 100644 --- a/pkg/oidcclient/login.go +++ b/pkg/oidcclient/login.go @@ -16,7 +16,7 @@ import ( "strings" "time" - "github.com/coreos/go-oidc" + "github.com/coreos/go-oidc/v3/oidc" "github.com/pkg/browser" "golang.org/x/oauth2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/oidcclient/login_test.go b/pkg/oidcclient/login_test.go index cc0edea5..eaa7a1b1 100644 --- a/pkg/oidcclient/login_test.go +++ b/pkg/oidcclient/login_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/coreos/go-oidc" + "github.com/coreos/go-oidc/v3/oidc" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/oidcclient/nonce/nonce.go b/pkg/oidcclient/nonce/nonce.go index fc10112e..6766bec2 100644 --- a/pkg/oidcclient/nonce/nonce.go +++ b/pkg/oidcclient/nonce/nonce.go @@ -11,7 +11,7 @@ import ( "fmt" "io" - "github.com/coreos/go-oidc" + "github.com/coreos/go-oidc/v3/oidc" "golang.org/x/oauth2" ) diff --git a/pkg/oidcclient/nonce/nonce_test.go b/pkg/oidcclient/nonce/nonce_test.go index 9738a245..0ba3a7ce 100644 --- a/pkg/oidcclient/nonce/nonce_test.go +++ b/pkg/oidcclient/nonce/nonce_test.go @@ -9,7 +9,7 @@ import ( "net/url" "testing" - "github.com/coreos/go-oidc" + "github.com/coreos/go-oidc/v3/oidc" "github.com/stretchr/testify/require" "golang.org/x/oauth2" ) diff --git a/test/integration/e2e_test.go b/test/integration/e2e_test.go index 2c9ce325..cc5f4964 100644 --- a/test/integration/e2e_test.go +++ b/test/integration/e2e_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - coreosoidc "github.com/coreos/go-oidc" + coreosoidc "github.com/coreos/go-oidc/v3/oidc" "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" diff --git a/test/integration/supervisor_login_test.go b/test/integration/supervisor_login_test.go index 3c3b966e..6b25408b 100644 --- a/test/integration/supervisor_login_test.go +++ b/test/integration/supervisor_login_test.go @@ -20,7 +20,7 @@ import ( v1 "k8s.io/api/core/v1" - coreosoidc "github.com/coreos/go-oidc" + coreosoidc "github.com/coreos/go-oidc/v3/oidc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/oauth2"