From 01914d086c129e48dcaace975cbb97ef0624e5f7 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Mon, 10 May 2021 09:01:47 +0200 Subject: [PATCH 1/4] chore: bump fosite to go-jose --- go.mod | 5 +++-- go.sum | 21 +++++---------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 09423890825..3b4a3b01828 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,8 @@ replace github.com/dgrijalva/jwt-go => github.com/form3tech-oss/jwt-go v3.2.1+in replace github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2 +replace github.com/ory/fosite => github.com/narg95/fosite v0.36.1-0.20210507190643-4f09eb743b32 + require ( github.com/DataDog/datadog-go v4.6.0+incompatible // indirect github.com/cenkalti/backoff/v3 v3.0.0 @@ -44,7 +46,7 @@ require ( github.com/mattn/go-colorable v0.1.7 // indirect github.com/mattn/go-runewidth v0.0.4 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 - github.com/oleiade/reflections v1.0.0 + github.com/oleiade/reflections v1.0.1 github.com/olekukonko/tablewriter v0.0.1 github.com/ory/analytics-go/v4 v4.0.1 github.com/ory/cli v0.0.49 @@ -65,7 +67,6 @@ require ( github.com/sawadashota/encrypta v0.0.2 github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.1.3 - github.com/sqs/goreturns v0.0.0-20181028201513-538ac6014518 // indirect github.com/stretchr/testify v1.7.0 github.com/tidwall/gjson v1.7.1 github.com/toqueteos/webbrowser v1.2.0 diff --git a/go.sum b/go.sum index 9f4bc4d5872..2ca96483355 100644 --- a/go.sum +++ b/go.sum @@ -215,7 +215,6 @@ github.com/elastic/go-sysinfo v1.1.1 h1:ZVlaLDyhVkDfjwPGU55CQRCRolNpc7P0BbyhhQZQ github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= -github.com/elazarl/goproxy v0.0.0-20181003060214-f58a169a71a5/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elnormous/contenttype v0.0.0-20210110050721-79150725153f h1:juwLa2Kbp2uwOGMOagrkTYXN/5+7sbINMmIZSluH2Gc= github.com/elnormous/contenttype v0.0.0-20210110050721-79150725153f/go.mod h1:ngVcyGGU8pnn4QJ5sL4StrNgc/wmXZXy5IQSBuHOFPg= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= @@ -742,7 +741,6 @@ github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181004151105-1babbf986f6f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -917,7 +915,6 @@ github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jteeuwen/go-bindata v3.0.7+incompatible/go.mod h1:JVvhzYOiGBnFSYRyV00iY8q7/0PThjIYav1p9h5dmKs= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -1083,9 +1080,10 @@ github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGE github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/narg95/fosite v0.36.1-0.20210507190643-4f09eb743b32 h1:btuaroBCyfSO2Fprawe2MSb2MG/l61P8Tfu9/HtLL8g= +github.com/narg95/fosite v0.36.1-0.20210507190643-4f09eb743b32/go.mod h1:KbDZzqSDLaOLDN2haRIsBQHUhl8MQp66cYMqCpO/8Mg= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= @@ -1099,8 +1097,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/oleiade/reflections v1.0.0 h1:0ir4pc6v8/PJ0yw5AEtMddfXpWBXg9cnG7SgSoJuCgY= -github.com/oleiade/reflections v1.0.0/go.mod h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w= +github.com/oleiade/reflections v1.0.1 h1:D1XO3LVEYroYskEsoSiGItp9RUxG6jWnCVvrqH0HHQM= +github.com/oleiade/reflections v1.0.1/go.mod h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1 h1:b3iUnf1v+ppJiOfNX4yxxqfWKMQPZR5yoh8urCTFX88= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -1152,12 +1150,8 @@ github.com/ory/dockertest/v3 v3.5.4/go.mod h1:J8ZUbNB2FOhm1cFZW9xBpDsODqsSWcyYgt github.com/ory/dockertest/v3 v3.6.2/go.mod h1:EFLcVUOl8qCwp9NyDAcCDtq/QviLtYswW/VbWzUnTNE= github.com/ory/dockertest/v3 v3.6.3 h1:L8JWiGgR+fnj90AEOkTFIEp4j5uWAK72P3IUsYgn2cs= github.com/ory/dockertest/v3 v3.6.3/go.mod h1:EFLcVUOl8qCwp9NyDAcCDtq/QviLtYswW/VbWzUnTNE= -github.com/ory/fosite v0.29.0/go.mod h1:0atSZmXO7CAcs6NPMI/Qtot8tmZYj04Nddoold4S2h0= -github.com/ory/fosite v0.39.0 h1:u1Ct/ME7XYzREvufr7ehBIdq/KatjVLIYg/ABqWzprw= -github.com/ory/fosite v0.39.0/go.mod h1:37r59qkOSPueYKmaA7EHiXrDMF1B+XPN+MgkZgTRg3Y= github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90/go.mod h1:sxnvPCxChFuSmTJGj8FdMupeq1BezCiEpDjTUXQ4hf4= github.com/ory/go-acc v0.1.0/go.mod h1:0omgy2aa3nDBJ45VAKeLHH8ccPBudxLeic4xiDRtug0= -github.com/ory/go-acc v0.2.5/go.mod h1:4Kb/UnPcT8qRAk3IAxta+hvVapdxTLWtrr7bFLlEgpw= github.com/ory/go-acc v0.2.6 h1:YfI+L9dxI7QCtWn2RbawqO0vXhiThdXu/RgizJBbaq0= github.com/ory/go-acc v0.2.6/go.mod h1:4Kb/UnPcT8qRAk3IAxta+hvVapdxTLWtrr7bFLlEgpw= github.com/ory/go-convenience v0.1.0 h1:zouLKfF2GoSGnJwGq+PE/nJAE6dj2Zj5QlTgmMTsTS8= @@ -1201,13 +1195,13 @@ github.com/ory/x v0.0.85/go.mod h1:s44V8t3xyjWZREcU+mWlp4h302rTuM4aLXcW+y5FbQ8= github.com/ory/x v0.0.93/go.mod h1:lfcTaGXpTZs7IEQAW00r9EtTCOxD//SiP5uWtNiz31g= github.com/ory/x v0.0.110/go.mod h1:DJfkE3GdakhshNhw4zlKoRaL/ozg/lcTahA9OCih2BE= github.com/ory/x v0.0.127/go.mod h1:FwUujfFuCj5d+xgLn4fGMYPnzriR5bdAIulFXMtnK0M= -github.com/ory/x v0.0.162/go.mod h1:sj3z/MeCrAyNFFTfN6yK1nTmHXGSFnw+QwIIQ/Rowec= github.com/ory/x v0.0.166/go.mod h1:gT/3K0mSFaPllJgoFrvKYIBYI5W1Nz5RxQTJCGrIwDY= github.com/ory/x v0.0.179/go.mod h1:SGETCUk1DgQC30bb7y4hjhkKGQ1x0YOsldrmGmy6MNc= github.com/ory/x v0.0.181/go.mod h1:SGETCUk1DgQC30bb7y4hjhkKGQ1x0YOsldrmGmy6MNc= github.com/ory/x v0.0.189/go.mod h1:uJK3Re/AF6F3LCNnwqzeU/ftmexCpjqwfdyrDc6PbcM= github.com/ory/x v0.0.205/go.mod h1:A1s4iwmFIppRXZLF3J9GGWeY/HpREVm0Dk5z/787iek= github.com/ory/x v0.0.207/go.mod h1:sBgvUAcmc2lmtOBe5VMcV2vNAlADT4bkFHomG29y7N4= +github.com/ory/x v0.0.212/go.mod h1:RDxYOolvMdzumYnHWha8D+RoLjYtGszyDDed4OCGC54= github.com/ory/x v0.0.233 h1:AiBvucFkE054XJ04OnUziM9Ect5nR/NbMe5101EBjVE= github.com/ory/x v0.0.233/go.mod h1:0mSGWLFgcqckIvgexka1GJK/sshYrFFkU7lPajzGTFw= github.com/ory/x v0.0.237 h1:sFcWr8EcOYrPb30tsWk3BZM7jdzHeBAqaOSHveizmfs= @@ -1360,7 +1354,6 @@ github.com/smallstep/truststore v0.9.6 h1:vNzEJmaJL0XOZD8uouXLmYu4/aP1UQ/wHUopH3 github.com/smallstep/truststore v0.9.6/go.mod h1:HwHKRcBi0RUxxw1LYDpTRhYC4jZUuxPpkHdVonlkoDM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -1686,7 +1679,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1777,7 +1769,6 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1896,7 +1887,6 @@ golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200721223218-6123e77877b2/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -2045,7 +2035,6 @@ gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= gopkg.in/mail.v2 v2.3.1/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.1.9/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= From 88019081875d114410cba5f906e9ec0c03a10d84 Mon Sep 17 00:00:00 2001 From: Nestor Date: Mon, 10 May 2021 15:38:25 +0200 Subject: [PATCH 2/4] migrate from jwt-go to fosite/token/jwt --- consent/strategy_default.go | 9 ++------- consent/strategy_default_test.go | 4 ++-- consent/strategy_logout_test.go | 2 +- go.mod | 2 +- internal/testhelpers/oauth2.go | 4 ++-- jwk/jwt_strategy.go | 4 ++-- jwk/jwt_strategy_test.go | 2 +- oauth2/handler.go | 2 +- oauth2/handler_test.go | 8 ++++---- oauth2/oauth2_auth_code_test.go | 11 +++++------ oauth2/oauth2_client_credentials_test.go | 4 ++-- test/mock-client/main.go | 6 +++--- x/jwt.go | 15 +++++++++++++++ 13 files changed, 41 insertions(+), 32 deletions(-) create mode 100644 x/jwt.go diff --git a/consent/strategy_default.go b/consent/strategy_default.go index bfa95d158ab..fffefc85287 100644 --- a/consent/strategy_default.go +++ b/consent/strategy_default.go @@ -35,8 +35,8 @@ import ( "github.com/ory/x/sqlcon" - jwtgo "github.com/dgrijalva/jwt-go" "github.com/gorilla/sessions" + jwtgo "github.com/ory/fosite/token/jwt" "github.com/pborman/uuid" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -191,12 +191,7 @@ func (s *DefaultStrategy) getIDTokenHintClaims(ctx context.Context, idTokenHint return nil, errorsx.WithStack(fosite.ErrInvalidRequest.WithHint(err.Error())) } - claims, ok := token.Claims.(jwtgo.MapClaims) - if !ok { - return nil, errorsx.WithStack(fosite.ErrInvalidRequest.WithHint("Failed to validate OpenID Connect request as decoding id token from id_token_hint to jwt.MapClaims failed.")) - } - - return claims, nil + return token.Claims, nil } func (s *DefaultStrategy) getSubjectFromIDTokenHint(ctx context.Context, idTokenHint string) (string, error) { diff --git a/consent/strategy_default_test.go b/consent/strategy_default_test.go index bfe159dc179..303c02c6375 100644 --- a/consent/strategy_default_test.go +++ b/consent/strategy_default_test.go @@ -27,7 +27,7 @@ import ( "net/http/httptest" "testing" - jwtgo "github.com/dgrijalva/jwt-go" + jwtgo "github.com/ory/fosite/token/jwt" "github.com/stretchr/testify/require" "github.com/ory/fosite/token/jwt" @@ -122,7 +122,7 @@ func newAuthCookieJar(t *testing.T, reg driver.Registry, u, sessionID string) ht return cj } -func genIDToken(t *testing.T, reg driver.Registry, c jwtgo.Claims) string { +func genIDToken(t *testing.T, reg driver.Registry, c jwtgo.MapClaims) string { r, _, err := reg.OpenIDJWTStrategy().Generate(context.TODO(), c, jwt.NewHeaders()) require.NoError(t, err) return r diff --git a/consent/strategy_logout_test.go b/consent/strategy_logout_test.go index a77bf619ba0..6648b5920f1 100644 --- a/consent/strategy_logout_test.go +++ b/consent/strategy_logout_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - jwtgo "github.com/dgrijalva/jwt-go" + jwtgo "github.com/ory/fosite/token/jwt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" diff --git a/go.mod b/go.mod index 3b4a3b01828..72195e156d8 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/DataDog/datadog-go v4.6.0+incompatible // indirect github.com/cenkalti/backoff/v3 v3.0.0 github.com/containerd/containerd v1.4.4 // indirect - github.com/dgrijalva/jwt-go v3.2.0+incompatible + github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect github.com/evanphx/json-patch v0.5.2 github.com/go-bindata/go-bindata v3.1.1+incompatible github.com/go-openapi/errors v0.20.0 diff --git a/internal/testhelpers/oauth2.go b/internal/testhelpers/oauth2.go index 35fa65c1954..44af0b8ef52 100644 --- a/internal/testhelpers/oauth2.go +++ b/internal/testhelpers/oauth2.go @@ -9,7 +9,7 @@ import ( "testing" "time" - djwt "github.com/dgrijalva/jwt-go" + djwt "github.com/ory/fosite/token/jwt" "github.com/stretchr/testify/assert" "github.com/ory/fosite/token/jwt" @@ -80,7 +80,7 @@ func DecodeIDToken(t *testing.T, token *oauth2.Token) gjson.Result { require.True(t, ok) assert.NotEmpty(t, idt) - body, err := djwt.DecodeSegment(strings.Split(idt, ".")[1]) + body, err := x.DecodeSegment(strings.Split(idt, ".")[1]) require.NoError(t, err) return gjson.ParseBytes(body) diff --git a/jwk/jwt_strategy.go b/jwk/jwt_strategy.go index ec86b279bcf..a713a3e2d42 100644 --- a/jwk/jwt_strategy.go +++ b/jwk/jwt_strategy.go @@ -28,7 +28,7 @@ import ( "github.com/ory/hydra/driver/config" - jwt2 "github.com/dgrijalva/jwt-go" + jwt2 "github.com/ory/fosite/token/jwt" "github.com/pkg/errors" "github.com/ory/fosite/token/jwt" @@ -75,7 +75,7 @@ func (j *RS256JWTStrategy) GetSignature(ctx context.Context, token string) (stri return j.RS256JWTStrategy.GetSignature(ctx, token) } -func (j *RS256JWTStrategy) Generate(ctx context.Context, claims jwt2.Claims, header jwt.Mapper) (string, string, error) { +func (j *RS256JWTStrategy) Generate(ctx context.Context, claims jwt2.MapClaims, header jwt.Mapper) (string, string, error) { if err := j.refresh(ctx); err != nil { return "", "", err } diff --git a/jwk/jwt_strategy_test.go b/jwk/jwt_strategy_test.go index c52788edd98..faa8c20a006 100644 --- a/jwk/jwt_strategy_test.go +++ b/jwk/jwt_strategy_test.go @@ -26,7 +26,7 @@ import ( "github.com/ory/hydra/internal" - jwt2 "github.com/dgrijalva/jwt-go" + jwt2 "github.com/ory/fosite/token/jwt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/oauth2/handler.go b/oauth2/handler.go index 694c75f236b..c5ea22bbda6 100644 --- a/oauth2/handler.go +++ b/oauth2/handler.go @@ -33,8 +33,8 @@ import ( "github.com/ory/x/errorsx" - jwt2 "github.com/dgrijalva/jwt-go" "github.com/julienschmidt/httprouter" + jwt2 "github.com/ory/fosite/token/jwt" "github.com/pkg/errors" "github.com/ory/fosite" diff --git a/oauth2/handler_test.go b/oauth2/handler_test.go index db197e6c395..989fa74fa19 100644 --- a/oauth2/handler_test.go +++ b/oauth2/handler_test.go @@ -46,8 +46,8 @@ import ( "github.com/ory/hydra/internal" "github.com/ory/x/urlx" - jwt2 "github.com/dgrijalva/jwt-go" "github.com/golang/mock/gomock" + jwt2 "github.com/ory/fosite/token/jwt" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -373,9 +373,9 @@ func TestUserinfo(t *testing.T) { return jwk.MustRSAPublic(key), nil }) require.NoError(t, err) - assert.EqualValues(t, "alice", claims.Claims.(jwt2.MapClaims)["sub"]) - assert.EqualValues(t, []interface{}{"foobar-client"}, claims.Claims.(jwt2.MapClaims)["aud"], "%#v", claims.Claims) - assert.NotEmpty(t, claims.Claims.(jwt2.MapClaims)["jti"]) + assert.EqualValues(t, "alice", claims.Claims["sub"]) + assert.EqualValues(t, []interface{}{"foobar-client"}, claims.Claims["aud"], "%#v", claims.Claims) + assert.NotEmpty(t, claims.Claims["jti"]) }, }, } { diff --git a/oauth2/oauth2_auth_code_test.go b/oauth2/oauth2_auth_code_test.go index cf1999a469b..5d90999fe1c 100644 --- a/oauth2/oauth2_auth_code_test.go +++ b/oauth2/oauth2_auth_code_test.go @@ -40,7 +40,6 @@ import ( "github.com/ory/hydra/client" "github.com/ory/hydra/internal/testhelpers" - djwt "github.com/dgrijalva/jwt-go" "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -201,7 +200,7 @@ func TestAuthCodeWithDefaultStrategy(t *testing.T) { require.True(t, ok) assert.NotEmpty(t, idt) - body, err := djwt.DecodeSegment(strings.Split(idt, ".")[1]) + body, err := x.DecodeSegment(strings.Split(idt, ".")[1]) require.NoError(t, err) claims := gjson.ParseBytes(body) @@ -241,7 +240,7 @@ func TestAuthCodeWithDefaultStrategy(t *testing.T) { } require.Len(t, parts, 3) - body, err := djwt.DecodeSegment(parts[1]) + body, err := x.DecodeSegment(parts[1]) require.NoError(t, err) i := gjson.ParseBytes(body) @@ -658,7 +657,7 @@ func TestAuthCodeWithMockStrategy(t *testing.T) { return } - body, err := djwt.DecodeSegment(strings.Split(token, ".")[1]) + body, err := x.DecodeSegment(strings.Split(token, ".")[1]) require.NoError(t, err) data := map[string]interface{}{} @@ -867,13 +866,13 @@ func TestAuthCodeWithMockStrategy(t *testing.T) { t.Skip() } - body, err := djwt.DecodeSegment(strings.Split(token.AccessToken, ".")[1]) + body, err := x.DecodeSegment(strings.Split(token.AccessToken, ".")[1]) require.NoError(t, err) origPayload := map[string]interface{}{} require.NoError(t, json.Unmarshal(body, &origPayload)) - body, err = djwt.DecodeSegment(strings.Split(refreshedToken.AccessToken, ".")[1]) + body, err = x.DecodeSegment(strings.Split(refreshedToken.AccessToken, ".")[1]) require.NoError(t, err) refreshedPayload := map[string]interface{}{} diff --git a/oauth2/oauth2_client_credentials_test.go b/oauth2/oauth2_client_credentials_test.go index 9735c7460d7..bbca408eecb 100644 --- a/oauth2/oauth2_client_credentials_test.go +++ b/oauth2/oauth2_client_credentials_test.go @@ -30,7 +30,6 @@ import ( "github.com/google/uuid" "github.com/tidwall/gjson" - "github.com/dgrijalva/jwt-go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" goauth2 "golang.org/x/oauth2" @@ -41,6 +40,7 @@ import ( hc "github.com/ory/hydra/client" "github.com/ory/hydra/driver/config" "github.com/ory/hydra/internal" + "github.com/ory/hydra/x" ) func TestClientCredentials(t *testing.T) { @@ -108,7 +108,7 @@ func TestClientCredentials(t *testing.T) { return } - body, err := jwt.DecodeSegment(strings.Split(token.AccessToken, ".")[1]) + body, err := x.DecodeSegment(strings.Split(token.AccessToken, ".")[1]) require.NoError(t, err) jwtClaims := gjson.ParseBytes(body) diff --git a/test/mock-client/main.go b/test/mock-client/main.go index 0f667465b69..8be757e56b2 100644 --- a/test/mock-client/main.go +++ b/test/mock-client/main.go @@ -34,11 +34,11 @@ import ( "strings" "time" - "github.com/dgrijalva/jwt-go" "golang.org/x/oauth2" hydra "github.com/ory/hydra/internal/httpclient/client" "github.com/ory/hydra/internal/httpclient/client/admin" + "github.com/ory/hydra/x" "github.com/ory/x/cmdx" "github.com/ory/x/urlx" ) @@ -173,7 +173,7 @@ func checkTokenResponse(token oauth2token) { log.Fatalf("JWT Access Token does not seem to have three parts: %d - %+v - %v", len(parts), token, parts) } - payload, err := jwt.DecodeSegment(parts[1]) + payload, err := x.DecodeSegment(parts[1]) if err != nil { log.Fatalf("Unable to decode id token segment: %s", err) } @@ -221,7 +221,7 @@ func checkTokenResponse(token oauth2token) { log.Fatalf("ID Token does not seem to have three parts: %d - %+v - %v", len(parts), token, parts) } - payload, err := jwt.DecodeSegment(parts[1]) + payload, err := x.DecodeSegment(parts[1]) if err != nil { log.Fatalf("Unable to decode id token segment: %s", err) } diff --git a/x/jwt.go b/x/jwt.go new file mode 100644 index 00000000000..fe3fefdf588 --- /dev/null +++ b/x/jwt.go @@ -0,0 +1,15 @@ +package x + +import ( + "encoding/base64" + "strings" +) + +// Decode JWT specific base64url encoding with padding stripped +func DecodeSegment(seg string) ([]byte, error) { + if l := len(seg) % 4; l > 0 { + seg += strings.Repeat("=", 4-l) + } + + return base64.URLEncoding.DecodeString(seg) +} From 23f30656b68bc7a4ec665d29f352bf9aa0130a09 Mon Sep 17 00:00:00 2001 From: Nestor Date: Mon, 10 May 2021 17:27:45 +0200 Subject: [PATCH 3/4] update fosite dependency --- consent/strategy_default.go | 1 - consent/strategy_logout_test.go | 2 +- go.mod | 3 +-- go.sum | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/consent/strategy_default.go b/consent/strategy_default.go index fffefc85287..7448440b291 100644 --- a/consent/strategy_default.go +++ b/consent/strategy_default.go @@ -190,7 +190,6 @@ func (s *DefaultStrategy) getIDTokenHintClaims(ctx context.Context, idTokenHint } else if err != nil { return nil, errorsx.WithStack(fosite.ErrInvalidRequest.WithHint(err.Error())) } - return token.Claims, nil } diff --git a/consent/strategy_logout_test.go b/consent/strategy_logout_test.go index 6648b5920f1..4a03e429e56 100644 --- a/consent/strategy_logout_test.go +++ b/consent/strategy_logout_test.go @@ -258,7 +258,7 @@ func TestLogoutFlows(t *testing.T) { acceptLoginAs(t, "aeneas-rekkas") checkAndAcceptLogout(t, nil, nil) - expectedMessage := "token contains an invalid number of segments" + expectedMessage := "compact JWS format must have three parts" browser := createBrowserWithSession(t, createSampleClient(t)) values := url.Values{"state": {"1234"}, "post_logout_redirect_uri": {customPostLogoutURL}, "id_token_hint": {"i am not valid"}} t.Run("method=get", testExpectErrorPage(browser, http.MethodGet, values, expectedMessage)) diff --git a/go.mod b/go.mod index 72195e156d8..77da8b2d686 100644 --- a/go.mod +++ b/go.mod @@ -14,13 +14,12 @@ replace github.com/dgrijalva/jwt-go => github.com/form3tech-oss/jwt-go v3.2.1+in replace github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2 -replace github.com/ory/fosite => github.com/narg95/fosite v0.36.1-0.20210507190643-4f09eb743b32 +replace github.com/ory/fosite => github.com/narg95/fosite v0.36.1-0.20210517115142-45a8e10bb40b require ( github.com/DataDog/datadog-go v4.6.0+incompatible // indirect github.com/cenkalti/backoff/v3 v3.0.0 github.com/containerd/containerd v1.4.4 // indirect - github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect github.com/evanphx/json-patch v0.5.2 github.com/go-bindata/go-bindata v3.1.1+incompatible github.com/go-openapi/errors v0.20.0 diff --git a/go.sum b/go.sum index 2ca96483355..4eed094182b 100644 --- a/go.sum +++ b/go.sum @@ -1082,8 +1082,8 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/narg95/fosite v0.36.1-0.20210507190643-4f09eb743b32 h1:btuaroBCyfSO2Fprawe2MSb2MG/l61P8Tfu9/HtLL8g= -github.com/narg95/fosite v0.36.1-0.20210507190643-4f09eb743b32/go.mod h1:KbDZzqSDLaOLDN2haRIsBQHUhl8MQp66cYMqCpO/8Mg= +github.com/narg95/fosite v0.36.1-0.20210517115142-45a8e10bb40b h1:FRczO4iUxmCZ5sce621CdPx436ph1DoyQBM5bM9877Y= +github.com/narg95/fosite v0.36.1-0.20210517115142-45a8e10bb40b/go.mod h1:KbDZzqSDLaOLDN2haRIsBQHUhl8MQp66cYMqCpO/8Mg= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= From 6a1aeb7bea4facdd5777e9c0b8467ba9fedc70e0 Mon Sep 17 00:00:00 2001 From: Nestor Date: Fri, 28 May 2021 21:31:45 +0200 Subject: [PATCH 4/4] bump fosite to v0.40.2 --- go.mod | 4 +--- go.sum | 15 +++++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 77da8b2d686..de4f3cd0977 100644 --- a/go.mod +++ b/go.mod @@ -14,8 +14,6 @@ replace github.com/dgrijalva/jwt-go => github.com/form3tech-oss/jwt-go v3.2.1+in replace github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2 -replace github.com/ory/fosite => github.com/narg95/fosite v0.36.1-0.20210517115142-45a8e10bb40b - require ( github.com/DataDog/datadog-go v4.6.0+incompatible // indirect github.com/cenkalti/backoff/v3 v3.0.0 @@ -49,7 +47,7 @@ require ( github.com/olekukonko/tablewriter v0.0.1 github.com/ory/analytics-go/v4 v4.0.1 github.com/ory/cli v0.0.49 - github.com/ory/fosite v0.39.0 + github.com/ory/fosite v0.40.2 github.com/ory/go-acc v0.2.6 github.com/ory/graceful v0.1.1 github.com/ory/herodot v0.9.3 diff --git a/go.sum b/go.sum index 4eed094182b..bf224b8d2d2 100644 --- a/go.sum +++ b/go.sum @@ -215,6 +215,7 @@ github.com/elastic/go-sysinfo v1.1.1 h1:ZVlaLDyhVkDfjwPGU55CQRCRolNpc7P0BbyhhQZQ github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= +github.com/elazarl/goproxy v0.0.0-20181003060214-f58a169a71a5/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elnormous/contenttype v0.0.0-20210110050721-79150725153f h1:juwLa2Kbp2uwOGMOagrkTYXN/5+7sbINMmIZSluH2Gc= github.com/elnormous/contenttype v0.0.0-20210110050721-79150725153f/go.mod h1:ngVcyGGU8pnn4QJ5sL4StrNgc/wmXZXy5IQSBuHOFPg= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= @@ -741,6 +742,7 @@ github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181004151105-1babbf986f6f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -915,6 +917,7 @@ github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jteeuwen/go-bindata v3.0.7+incompatible/go.mod h1:JVvhzYOiGBnFSYRyV00iY8q7/0PThjIYav1p9h5dmKs= +github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -1080,10 +1083,9 @@ github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGE github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/narg95/fosite v0.36.1-0.20210517115142-45a8e10bb40b h1:FRczO4iUxmCZ5sce621CdPx436ph1DoyQBM5bM9877Y= -github.com/narg95/fosite v0.36.1-0.20210517115142-45a8e10bb40b/go.mod h1:KbDZzqSDLaOLDN2haRIsBQHUhl8MQp66cYMqCpO/8Mg= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= @@ -1097,6 +1099,7 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oleiade/reflections v1.0.0/go.mod h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w= github.com/oleiade/reflections v1.0.1 h1:D1XO3LVEYroYskEsoSiGItp9RUxG6jWnCVvrqH0HHQM= github.com/oleiade/reflections v1.0.1/go.mod h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -1150,6 +1153,9 @@ github.com/ory/dockertest/v3 v3.5.4/go.mod h1:J8ZUbNB2FOhm1cFZW9xBpDsODqsSWcyYgt github.com/ory/dockertest/v3 v3.6.2/go.mod h1:EFLcVUOl8qCwp9NyDAcCDtq/QviLtYswW/VbWzUnTNE= github.com/ory/dockertest/v3 v3.6.3 h1:L8JWiGgR+fnj90AEOkTFIEp4j5uWAK72P3IUsYgn2cs= github.com/ory/dockertest/v3 v3.6.3/go.mod h1:EFLcVUOl8qCwp9NyDAcCDtq/QviLtYswW/VbWzUnTNE= +github.com/ory/fosite v0.29.0/go.mod h1:0atSZmXO7CAcs6NPMI/Qtot8tmZYj04Nddoold4S2h0= +github.com/ory/fosite v0.40.2 h1:xOS/1kPOlk1LqnAEnNXUqNGdMwvHBqw20ZbURaK+qoM= +github.com/ory/fosite v0.40.2/go.mod h1:KbDZzqSDLaOLDN2haRIsBQHUhl8MQp66cYMqCpO/8Mg= github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90/go.mod h1:sxnvPCxChFuSmTJGj8FdMupeq1BezCiEpDjTUXQ4hf4= github.com/ory/go-acc v0.1.0/go.mod h1:0omgy2aa3nDBJ45VAKeLHH8ccPBudxLeic4xiDRtug0= github.com/ory/go-acc v0.2.6 h1:YfI+L9dxI7QCtWn2RbawqO0vXhiThdXu/RgizJBbaq0= @@ -1202,8 +1208,6 @@ github.com/ory/x v0.0.189/go.mod h1:uJK3Re/AF6F3LCNnwqzeU/ftmexCpjqwfdyrDc6PbcM= github.com/ory/x v0.0.205/go.mod h1:A1s4iwmFIppRXZLF3J9GGWeY/HpREVm0Dk5z/787iek= github.com/ory/x v0.0.207/go.mod h1:sBgvUAcmc2lmtOBe5VMcV2vNAlADT4bkFHomG29y7N4= github.com/ory/x v0.0.212/go.mod h1:RDxYOolvMdzumYnHWha8D+RoLjYtGszyDDed4OCGC54= -github.com/ory/x v0.0.233 h1:AiBvucFkE054XJ04OnUziM9Ect5nR/NbMe5101EBjVE= -github.com/ory/x v0.0.233/go.mod h1:0mSGWLFgcqckIvgexka1GJK/sshYrFFkU7lPajzGTFw= github.com/ory/x v0.0.237 h1:sFcWr8EcOYrPb30tsWk3BZM7jdzHeBAqaOSHveizmfs= github.com/ory/x v0.0.237/go.mod h1:KPgNsUzpztH15EZdw5HjurtTe+mXQ34yqMCCTb5BZAc= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= @@ -1354,6 +1358,7 @@ github.com/smallstep/truststore v0.9.6 h1:vNzEJmaJL0XOZD8uouXLmYu4/aP1UQ/wHUopH3 github.com/smallstep/truststore v0.9.6/go.mod h1:HwHKRcBi0RUxxw1LYDpTRhYC4jZUuxPpkHdVonlkoDM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -1679,6 +1684,7 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2035,6 +2041,7 @@ gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= gopkg.in/mail.v2 v2.3.1/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.1.9/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=