fix(deps): update go-jose to new updated repo due to migration (#630)

* updates go-jose to new updated repo due to migration

- updated from /square/go-jose to /go-jose/go-jose
- updates to v2.6.3
- addresses CVE-2016-9123 and CVE-2016-9121
- fixes tests that were adjusting for a 1s delay

* revert 299>300 in op_test.go
This commit is contained in:
Andrew 2024-08-27 05:58:50 -04:00 committed by GitHub
parent e8769ce896
commit 2308e2f8be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 33 additions and 33 deletions

View file

@ -12,7 +12,7 @@ import (
"time"
"golang.org/x/oauth2"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/crypto"
httphelper "github.com/zitadel/oidc/v2/pkg/http"

View file

@ -5,7 +5,7 @@ import (
"time"
"golang.org/x/oauth2"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/client"
"github.com/zitadel/oidc/v2/pkg/oidc"

View file

@ -7,7 +7,7 @@ import (
"net/http"
"sync"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
httphelper "github.com/zitadel/oidc/v2/pkg/http"
"github.com/zitadel/oidc/v2/pkg/oidc"

View file

@ -12,7 +12,7 @@ import (
"github.com/google/uuid"
"golang.org/x/oauth2"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/client"
httphelper "github.com/zitadel/oidc/v2/pkg/http"

View file

@ -4,7 +4,7 @@ import (
"context"
"time"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/oidc"
)

View file

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/require"
tu "github.com/zitadel/oidc/v2/internal/testutil"
"github.com/zitadel/oidc/v2/pkg/oidc"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
)
func TestVerifyTokens(t *testing.T) {

View file

@ -8,7 +8,7 @@ import (
"fmt"
"hash"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
)
var ErrUnsupportedAlgorithm = errors.New("unsupported signing algorithm")

View file

@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
)
func Sign(object any, signer jose.Signer) (string, error) {

View file

@ -7,7 +7,7 @@ import (
"crypto/rsa"
"errors"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
)
const (

View file

@ -7,7 +7,7 @@ import (
"reflect"
"testing"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
)
func TestFindKey(t *testing.T) {

View file

@ -6,7 +6,7 @@ import (
"time"
"golang.org/x/oauth2"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/muhlemmer/gu"
"github.com/zitadel/oidc/v2/pkg/crypto"

View file

@ -5,7 +5,7 @@ import (
"fmt"
"time"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
)
const (

View file

@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/assert"
"golang.org/x/text/language"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
)
var (

View file

@ -11,7 +11,7 @@ import (
"github.com/gorilla/schema"
"github.com/muhlemmer/gu"
"golang.org/x/text/language"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
)
type Audience []string

View file

@ -10,7 +10,7 @@ import (
"strings"
"time"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
str "github.com/zitadel/oidc/v2/pkg/strings"
)

View file

@ -4,7 +4,7 @@ import (
"context"
"net/http"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
httphelper "github.com/zitadel/oidc/v2/pkg/http"
"github.com/zitadel/oidc/v2/pkg/oidc"

View file

@ -9,7 +9,7 @@ import (
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/oidc"
"github.com/zitadel/oidc/v2/pkg/op"

View file

@ -4,7 +4,7 @@ import (
"context"
"net/http"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
httphelper "github.com/zitadel/oidc/v2/pkg/http"
)

View file

@ -9,7 +9,7 @@ import (
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/oidc"
"github.com/zitadel/oidc/v2/pkg/op"

View file

@ -6,7 +6,7 @@ import (
"github.com/golang/mock/gomock"
"github.com/gorilla/schema"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/oidc"
"github.com/zitadel/oidc/v2/pkg/op"

View file

@ -9,7 +9,7 @@ import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
jose "gopkg.in/square/go-jose.v2"
jose "gopkg.in/go-jose/go-jose.v2"
)
// MockDiscoverStorage is a mock of DiscoverStorage interface.

View file

@ -8,7 +8,7 @@ import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
jose "gopkg.in/square/go-jose.v2"
jose "gopkg.in/go-jose/go-jose.v2"
)
// MockSigningKey is a mock of SigningKey interface.

View file

@ -12,7 +12,7 @@ import (
gomock "github.com/golang/mock/gomock"
oidc "github.com/zitadel/oidc/v2/pkg/oidc"
op "github.com/zitadel/oidc/v2/pkg/op"
jose "gopkg.in/square/go-jose.v2"
jose "gopkg.in/go-jose/go-jose.v2"
)
// MockStorage is a mock of Storage interface.

View file

@ -12,7 +12,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
"golang.org/x/text/language"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
httphelper "github.com/zitadel/oidc/v2/pkg/http"
"github.com/zitadel/oidc/v2/pkg/oidc"

View file

@ -3,7 +3,7 @@ package op
import (
"errors"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
)
var ErrSignerCreationFailed = errors.New("signer creation failed")

View file

@ -5,7 +5,7 @@ import (
"errors"
"time"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/oidc"
)

View file

@ -6,7 +6,7 @@ import (
"fmt"
"time"
"gopkg.in/square/go-jose.v2"
"gopkg.in/go-jose/go-jose.v2"
"github.com/zitadel/oidc/v2/pkg/oidc"
)