diff --git a/CHANGELOG.md b/CHANGELOG.md index 8daff6c99fe..72b053cfb04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - [#21843](https://github.com/influxdata/influxdb/pull/21843): fix: hard limit on field size while parsing line protocol - [#21895](https://github.com/influxdata/influxdb/pull/21895): fix: systemd unit should block on startup until http endpoint is ready - [#21863](https://github.com/influxdata/influxdb/pull/21863): fix: export example and fix adjacent shards +- [#](https://github.com/influxdata/influxdb/pull/): chore: use community maintained golang-jwt v1.9.2 [unreleased] - [#21631](https://github.com/influxdata/influxdb/pull/21631): fix: group by returns multiple results per group in some circumstances diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index 227268d106e..df0c844e9cb 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -9,11 +9,11 @@ - github.com/cespare/xxhash [MIT LICENSE](https://github.com/cespare/xxhash/blob/master/LICENSE.txt) - github.com/clarkduvall/hyperloglog [MIT LICENSE](https://github.com/clarkduvall/hyperloglog/blob/master/LICENSE) - github.com/davecgh/go-spew/spew [ISC LICENSE](https://github.com/davecgh/go-spew/blob/master/LICENSE) -- github.com/dgrijalva/jwt-go [MIT LICENSE](https://github.com/dgrijalva/jwt-go/blob/master/LICENSE) - github.com/dgryski/go-bits [MIT LICENSE](https://github.com/dgryski/go-bits/blob/master/LICENSE) - github.com/dgryski/go-bitstream [MIT LICENSE](https://github.com/dgryski/go-bitstream/blob/master/LICENSE) - github.com/glycerine/go-unsnap-stream [MIT LICENSE](https://github.com/glycerine/go-unsnap-stream/blob/master/LICENSE) - github.com/gogo/protobuf/proto [BSD LICENSE](https://github.com/gogo/protobuf/blob/master/LICENSE) +- github.com/golang-jwt/jwt [MIT LICENSE](https://github.com/golang-jwt/jwt/blob/master/LICENSE) - github.com/golang/protobuf [BSD LICENSE](https://github.com/golang/protobuf/blob/master/LICENSE) - github.com/golang/snappy [BSD LICENSE](https://github.com/golang/snappy/blob/master/LICENSE) - github.com/google/go-cmp [BSD LICENSE](https://github.com/google/go-cmp/blob/master/LICENSE) diff --git a/go.mod b/go.mod index d1dfc16b1a9..73ac8d631f8 100644 --- a/go.mod +++ b/go.mod @@ -8,13 +8,13 @@ require ( github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01 github.com/benbjohnson/tmpl v1.0.0 github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40 - github.com/boltdb/bolt v1.3.1 + github.com/boltdb/bolt v1.3.1 // indirect github.com/cespare/xxhash v1.1.0 github.com/davecgh/go-spew v1.1.1 - github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1 github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8 github.com/go-chi/chi v4.1.0+incompatible github.com/gogo/protobuf v1.3.2 + github.com/golang-jwt/jwt v3.2.1+incompatible github.com/golang/mock v1.4.3 github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.1 diff --git a/go.sum b/go.sum index 540970ba143..2eba9061e28 100644 --- a/go.sum +++ b/go.sum @@ -175,8 +175,6 @@ github.com/denisenkom/go-mssqldb v0.10.0 h1:QykgLZBorFE95+gO3u9esLd0BmbvpWp0/waN github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1 h1:CaO/zOnF8VvUfEbhRatPcwKVWamvbYd8tQGRWacE9kU= -github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8 h1:akOQj8IVgoeFfBTzGOEQakCYshWD6RNo1M5pivFXt70= github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= @@ -333,6 +331,8 @@ github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= +github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= diff --git a/services/httpd/handler.go b/services/httpd/handler.go index 84c166f8336..9c728330b81 100644 --- a/services/httpd/handler.go +++ b/services/httpd/handler.go @@ -22,8 +22,8 @@ import ( "time" "github.com/bmizerany/pat" - "github.com/dgrijalva/jwt-go/v4" "github.com/gogo/protobuf/proto" + "github.com/golang-jwt/jwt" "github.com/golang/snappy" "github.com/influxdata/flux" "github.com/influxdata/flux/lang" diff --git a/services/httpd/handler_test.go b/services/httpd/handler_test.go index 752d9f3fce6..f1140c73708 100644 --- a/services/httpd/handler_test.go +++ b/services/httpd/handler_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" - "github.com/dgrijalva/jwt-go/v4" "github.com/gogo/protobuf/proto" + "github.com/golang-jwt/jwt" "github.com/golang/snappy" "github.com/google/go-cmp/cmp" "github.com/influxdata/flux" @@ -195,7 +195,7 @@ func TestHandler_Query_Auth(t *testing.T) { h.ServeHTTP(w, req) if w.Code != http.StatusUnauthorized { t.Fatalf("unexpected status: %d: %s", w.Code, w.Body.String()) - } else if body := strings.TrimSpace(w.Body.String()); body != `{"error":"token signature is invalid"}` { + } else if body := strings.TrimSpace(w.Body.String()); body != `{"error":"signature is invalid"}` { t.Fatalf("unexpected body: %s", body) } @@ -219,7 +219,7 @@ func TestHandler_Query_Auth(t *testing.T) { h.ServeHTTP(w, req) if w.Code != http.StatusUnauthorized { t.Fatalf("unexpected status: %d: %s", w.Code, w.Body.String()) - } else if !strings.Contains(w.Body.String(), `{"error":"token is expired`) { + } else if !strings.Contains(w.Body.String(), `{"error":"Token is expired`) { t.Fatalf("unexpected body: %s", w.Body.String()) }