diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json b/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json index 4876ac9c0de..a453e8f0ec8 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json @@ -1,5 +1,5 @@ { - "client_id": "create-client-2", + "client_id": "0f1bb84e-4405-4e93-950b-cdae88c5dbf6", "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ @@ -24,5 +24,5 @@ "metadata": { "foo": "bar" }, - "registration_client_uri": "http://localhost:4444/oauth2/register/create-client-2" + "registration_client_uri": "http://localhost:4444/oauth2/register/0f1bb84e-4405-4e93-950b-cdae88c5dbf6" } diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=basic_dynamic_client_registration.json b/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=basic_dynamic_client_registration.json index ed7884997ef..7fb3d90325c 100644 --- a/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=basic_dynamic_client_registration.json +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=basic_dynamic_client_registration.json @@ -1,4 +1,4 @@ { - "error": "The requested action was forbidden", + "error": "The request was malformed or contained invalid parameters", "error_description": "It is not allowed to choose your own OAuth2 Client secret." } diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_fails.json b/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_fails.json new file mode 100644 index 00000000000..daa080881c2 --- /dev/null +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_fails.json @@ -0,0 +1,4 @@ +{ + "error": "The request was malformed or contained invalid parameters", + "error_description": "Only UUID V4 (e.g. 8dcd6868-e294-4180-aa36-fbad26de79a6) can be chosen as OAuth2 Client IDs but got: not-a-uuid" +} diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=basic_dynamic_client_registration.json b/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=basic_dynamic_client_registration.json new file mode 100644 index 00000000000..7fb3d90325c --- /dev/null +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=basic_dynamic_client_registration.json @@ -0,0 +1,4 @@ +{ + "error": "The request was malformed or contained invalid parameters", + "error_description": "It is not allowed to choose your own OAuth2 Client secret." +} diff --git a/client/.snapshots/TestHandler-common-case=create_clients-case=6-description=empty_ID_succeeds.json b/client/.snapshots/TestHandler-common-case=create_clients-case=6-description=empty_ID_succeeds.json new file mode 100644 index 00000000000..d4a7b0985de --- /dev/null +++ b/client/.snapshots/TestHandler-common-case=create_clients-case=6-description=empty_ID_succeeds.json @@ -0,0 +1,24 @@ +{ + "client_name": "", + "client_secret": "averylongsecret", + "redirect_uris": [ + "http://localhost:3000/cb" + ], + "grant_types": null, + "response_types": null, + "scope": "offline_access offline openid", + "audience": [], + "owner": "", + "policy_uri": "", + "allowed_cors_origins": [], + "tos_uri": "", + "client_uri": "", + "logo_uri": "", + "contacts": null, + "client_secret_expires_at": 0, + "subject_type": "public", + "jwks": {}, + "token_endpoint_auth_method": "client_secret_basic", + "userinfo_signed_response_alg": "none", + "metadata": {} +} diff --git a/client/.snapshots/TestHandler-common-case=creating_a_client_dynamically_does_not_allow_setting_the_secret.json b/client/.snapshots/TestHandler-common-case=creating_a_client_dynamically_does_not_allow_setting_the_secret.json index 3fae03ce5b7..6f90147188d 100644 --- a/client/.snapshots/TestHandler-common-case=creating_a_client_dynamically_does_not_allow_setting_the_secret.json +++ b/client/.snapshots/TestHandler-common-case=creating_a_client_dynamically_does_not_allow_setting_the_secret.json @@ -1,7 +1,7 @@ { "body": { - "error": "The requested action was forbidden", + "error": "The request was malformed or contained invalid parameters", "error_description": "It is not allowed to choose your own OAuth2 Client secret." }, - "status": 403 + "status": 400 } diff --git a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json index 12b3874a129..266162fc797 100644 --- a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json +++ b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json @@ -1,6 +1,6 @@ { "body": { - "client_id": "existing-client-fetch", + "client_id": "0e837115-5105-4da7-a85e-ac286c2ef50e", "client_name": "", "redirect_uris": [ "http://localhost:3000/cb" diff --git a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json index 526b2ff51db..28cff67ab0a 100644 --- a/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json +++ b/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json @@ -1,6 +1,6 @@ { "body": { - "client_id": "existing-client-fetch", + "client_id": "0e837115-5105-4da7-a85e-ac286c2ef50e", "client_name": "", "redirect_uris": [ "http://localhost:3000/cb" diff --git a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json index 5b7ef762567..5ac6f4b461f 100644 --- a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json +++ b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json @@ -1,6 +1,6 @@ { "body": { - "client_id": "update-existing-client-admin", + "client_id": "c614c65a-72f3-4dd4-8217-f4c6343533dc", "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ diff --git a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json index c8e9984abfa..40601dcaead 100644 --- a/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json +++ b/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json @@ -1,6 +1,6 @@ { "body": { - "client_id": "update-existing-client-selfservice", + "client_id": "b33d7cff-ecc9-4acf-9ce7-67436bc763d4", "client_name": "", "redirect_uris": [ "http://localhost:3000/cb", diff --git a/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=false.json b/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=false.json index 113273781db..8d54b6f7df3 100644 --- a/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=false.json +++ b/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=false.json @@ -1,5 +1,4 @@ { - "client_id": "create-client-0", "client_name": "", "redirect_uris": null, "grant_types": null, @@ -16,6 +15,5 @@ "client_secret_expires_at": 0, "subject_type": "", "jwks": {}, - "metadata": {}, - "registration_client_uri": "http://localhost:4444/oauth2/register/create-client-0" + "metadata": {} } diff --git a/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json b/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json index 4af9626078a..8d54b6f7df3 100644 --- a/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json +++ b/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json @@ -1,5 +1,4 @@ { - "client_id": "create-client-1", "client_name": "", "redirect_uris": null, "grant_types": null, @@ -16,6 +15,5 @@ "client_secret_expires_at": 0, "subject_type": "", "jwks": {}, - "metadata": {}, - "registration_client_uri": "http://localhost:4444/oauth2/register/create-client-1" + "metadata": {} } diff --git a/client/.snapshots/TestHandler-create_client_registration_tokens-case=3-dynamic=false.json b/client/.snapshots/TestHandler-create_client_registration_tokens-case=3-dynamic=false.json index 47c5f10d932..28490b7fac7 100644 --- a/client/.snapshots/TestHandler-create_client_registration_tokens-case=3-dynamic=false.json +++ b/client/.snapshots/TestHandler-create_client_registration_tokens-case=3-dynamic=false.json @@ -1,7 +1,6 @@ { - "client_id": "", "client_name": "", - "client_secret": "create-client-2", + "client_secret": "01bbf13a-ae3e-44d5-b4b4-dd78137041be", "redirect_uris": null, "grant_types": null, "response_types": null, @@ -17,6 +16,5 @@ "client_secret_expires_at": 0, "subject_type": "", "jwks": {}, - "metadata": {}, - "registration_client_uri": "http://localhost:4444/oauth2/register/" + "metadata": {} } diff --git a/client/client.go b/client/client.go index 80e65cd26ac..8b20dc43891 100644 --- a/client/client.go +++ b/client/client.go @@ -24,6 +24,8 @@ import ( "strings" "time" + "github.com/ory/x/stringsx" + "github.com/gobuffalo/pop/v6" "github.com/gofrs/uuid" @@ -46,11 +48,12 @@ type Client struct { ID uuid.UUID `json:"-" db:"pk"` NID uuid.UUID `db:"nid" faker:"-" json:"-"` - // This field is deprecated and will be removed - PKDeprecated int64 `json:"-" db:"pk_deprecated"` + // ID is the id for this client. + LegacyClientID string `json:"client_id" db:"id"` - // ID is the id for this client. - OutfacingID string `json:"client_id" db:"id"` + // DEPRECATED: This field is deprecated and will be removed. It serves + // no purpose except the database not complaining. + PKDeprecated int64 `json:"-" db:"pk_deprecated"` // Name is the human-readable string name of the client to be presented to the // end-user during authorization. @@ -252,7 +255,7 @@ func (c *Client) BeforeSave(_ *pop.Connection) error { } func (c *Client) GetID() string { - return c.OutfacingID + return stringsx.Coalesce(c.LegacyClientID, c.ID.String()) } func (c *Client) GetRedirectURIs() []string { diff --git a/client/client_test.go b/client/client_test.go index 90c9f92b1e7..fc546a30c6a 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -33,7 +33,7 @@ var _ fosite.Client = new(Client) func TestClient(t *testing.T) { c := &Client{ - OutfacingID: "foo", + LegacyClientID: "foo", RedirectURIs: []string{"foo"}, Scope: "foo bar", TokenEndpointAuthMethod: "none", diff --git a/client/handler.go b/client/handler.go index 85342ca99c1..560cb0ba33e 100644 --- a/client/handler.go +++ b/client/handler.go @@ -28,7 +28,9 @@ import ( "net/http" "time" - "github.com/pborman/uuid" + "github.com/gofrs/uuid" + + "github.com/ory/x/uuidx" "github.com/ory/x/urlx" @@ -156,12 +158,20 @@ func (h *Handler) CreateClient(r *http.Request, validator func(context.Context, } if isDynamic { - c.OutfacingID = uuid.New() + c.LegacyClientID = uuidx.NewV4().String() if c.Secret != "" { - return nil, errorsx.WithStack(herodot.ErrForbidden.WithReasonf("It is not allowed to choose your own OAuth2 Client secret.")) + return nil, errorsx.WithStack(herodot.ErrBadRequest.WithReasonf("It is not allowed to choose your own OAuth2 Client secret.")) } } + if c.LegacyClientID == "" { + c.LegacyClientID = uuidx.NewV4().String() + } + + if _, err := uuid.FromString(c.LegacyClientID); err != nil { + return nil, errorsx.WithStack(herodot.ErrBadRequest.WithReasonf("Only UUID V4 (e.g. 8dcd6868-e294-4180-aa36-fbad26de79a6) can be chosen as OAuth2 Client IDs but got: %s", c.LegacyClientID)) + } + if len(c.Secret) == 0 { secretb, err := x.GenerateSecret(26) if err != nil { @@ -185,7 +195,7 @@ func (h *Handler) CreateClient(r *http.Request, validator func(context.Context, c.RegistrationAccessToken = token c.RegistrationAccessTokenSignature = signature - c.RegistrationClientURI = urlx.AppendPaths(h.r.Config().PublicURL(r.Context()), DynClientsHandlerPath+"/"+c.OutfacingID).String() + c.RegistrationClientURI = urlx.AppendPaths(h.r.Config().PublicURL(r.Context()), DynClientsHandlerPath+"/"+c.GetID()).String() if err := h.r.ClientManager().CreateClient(r.Context(), &c); err != nil { return nil, err @@ -226,7 +236,7 @@ func (h *Handler) Update(w http.ResponseWriter, r *http.Request, ps httprouter.P return } - c.OutfacingID = ps.ByName("id") + c.LegacyClientID = ps.ByName("id") if err := h.updateClient(r.Context(), &c, h.r.ClientValidator().Validate); err != nil { h.r.Writer().WriteError(w, r, err) return @@ -319,7 +329,7 @@ func (h *Handler) UpdateDynamicRegistration(w http.ResponseWriter, r *http.Reque c.RegistrationAccessToken = token c.RegistrationAccessTokenSignature = signature - c.OutfacingID = client.GetID() + c.LegacyClientID = client.GetID() if err := h.updateClient(r.Context(), &c, h.r.ClientValidator().ValidateDynamicRegistration); err != nil { h.r.Writer().WriteError(w, r, err) return diff --git a/client/handler_test.go b/client/handler_test.go index a97ccbc440f..5c33f3f5bf9 100644 --- a/client/handler_test.go +++ b/client/handler_test.go @@ -51,11 +51,11 @@ func TestHandler(t *testing.T) { c *client.Client dynamic bool }{ - {c: &client.Client{OutfacingID: "create-client-0"}}, + {c: &client.Client{LegacyClientID: "f4cce82a-94ef-4c7e-92a6-b4054362d2b4"}}, {dynamic: true, c: new(client.Client)}, - {c: &client.Client{OutfacingID: "create-client-1"}}, - {c: &client.Client{Secret: "create-client-2"}}, - {c: &client.Client{OutfacingID: "create-client-3"}, dynamic: true}, + {c: &client.Client{LegacyClientID: "4df581fe-e971-4661-a92a-f69f776e4123"}}, + {c: &client.Client{Secret: "01bbf13a-ae3e-44d5-b4b4-dd78137041be"}}, + {c: &client.Client{LegacyClientID: "a24e960d-5764-4a74-a687-f7fc1b3545b4"}, dynamic: true}, } { t.Run(fmt.Sprintf("case=%d/dynamic=%v", k, tc.dynamic), func(t *testing.T) { var b bytes.Buffer @@ -70,7 +70,7 @@ func TestHandler(t *testing.T) { require.NoError(t, err) require.NotEqual(t, c.NID, uuid.Nil) - except := []string{"registration_access_token", "updated_at", "created_at"} + except := []string{"client_id", "registration_access_token", "updated_at", "created_at", "registration_client_uri"} require.NotEmpty(t, c.RegistrationAccessToken) require.NotEqual(t, c.RegistrationAccessTokenSignature, c.RegistrationAccessToken) if !hadSecret { @@ -79,8 +79,8 @@ func TestHandler(t *testing.T) { } if tc.dynamic { - require.NotEmpty(t, c.OutfacingID) - assert.Equal(t, reg.Config().PublicURL(ctx).String()+"oauth2/register/"+c.OutfacingID, c.RegistrationClientURI) + require.NotEmpty(t, c.GetID()) + assert.Equal(t, reg.Config().PublicURL(ctx).String()+"oauth2/register/"+c.GetID(), c.RegistrationClientURI) except = append(except, "client_id", "client_secret", "registration_client_uri") } @@ -99,7 +99,7 @@ func TestHandler(t *testing.T) { t.Run("valid auth", func(t *testing.T) { actual, err := h.ValidDynamicAuth(&http.Request{Header: http.Header{"Authorization": {"Bearer " + expected.RegistrationAccessToken}}}, httprouter.Params{ - httprouter.Param{Key: "id", Value: expected.OutfacingID}, + httprouter.Param{Key: "id", Value: expected.GetID()}, }) require.NoError(t, err, "authentication with registration access token works") assert.EqualValues(t, expected.GetID(), actual.GetID()) @@ -107,14 +107,14 @@ func TestHandler(t *testing.T) { t.Run("missing auth", func(t *testing.T) { _, err := h.ValidDynamicAuth(&http.Request{}, httprouter.Params{ - httprouter.Param{Key: "id", Value: expected.OutfacingID}, + httprouter.Param{Key: "id", Value: expected.GetID()}, }) require.Error(t, err, "authentication without registration access token fails") }) t.Run("incorrect auth", func(t *testing.T) { _, err := h.ValidDynamicAuth(&http.Request{Header: http.Header{"Authorization": {"Bearer invalid"}}}, httprouter.Params{ - httprouter.Param{Key: "id", Value: expected.OutfacingID}, + httprouter.Param{Key: "id", Value: expected.GetID()}, }) require.Error(t, err, "authentication with invalid registration access token fails") }) @@ -174,7 +174,7 @@ func TestHandler(t *testing.T) { ts, hc := newServer(t, false) trap := &client.Client{ - OutfacingID: "dynamic-client-test-trap", + LegacyClientID: "8dcd6868-e294-4180-aa36-fbad26de79a6", } createClient(t, trap, ts, client.ClientsHandlerPath) @@ -182,10 +182,10 @@ func TestHandler(t *testing.T) { method string path string }{ - {method: "GET", path: ts.URL + client.DynClientsHandlerPath + "/" + trap.OutfacingID}, + {method: "GET", path: ts.URL + client.DynClientsHandlerPath + "/" + trap.GetID()}, {method: "POST", path: ts.URL + client.DynClientsHandlerPath}, - {method: "PUT", path: ts.URL + client.DynClientsHandlerPath + "/" + trap.OutfacingID}, - {method: "DELETE", path: ts.URL + client.DynClientsHandlerPath + "/" + trap.OutfacingID}, + {method: "PUT", path: ts.URL + client.DynClientsHandlerPath + "/" + trap.GetID()}, + {method: "DELETE", path: ts.URL + client.DynClientsHandlerPath + "/" + trap.GetID()}, } { t.Run("method="+tc.method, func(t *testing.T) { req, err := http.NewRequest(tc.method, tc.path, nil) @@ -201,7 +201,7 @@ func TestHandler(t *testing.T) { t.Run("case=selfservice with incorrect or missing auth", func(t *testing.T) { ts, hc := newServer(t, true) expected := &client.Client{ - OutfacingID: "incorrect-missing-client", + LegacyClientID: "3c1cd777-0b14-43ab-9b52-c00ab534f8e8", Secret: "averylongsecret", RedirectURIs: []string{"http://localhost:3000/cb"}, TokenEndpointAuthMethod: "client_secret_basic", @@ -210,9 +210,9 @@ func TestHandler(t *testing.T) { // Create the second client secondClient := &client.Client{ - OutfacingID: "second-existing-client", - Secret: "averylongsecret", - RedirectURIs: []string{"http://localhost:3000/cb"}, + LegacyClientID: "e0a877ec-63a6-4f39-9f0f-ebd9e0129220", + Secret: "averylongsecret", + RedirectURIs: []string{"http://localhost:3000/cb"}, } createClient(t, secondClient, ts, client.ClientsHandlerPath) @@ -220,7 +220,7 @@ func TestHandler(t *testing.T) { for _, method := range []string{"GET", "DELETE", "PUT"} { t.Run("method="+method, func(t *testing.T) { t.Run("without auth", func(t *testing.T) { - req, err := http.NewRequest(method, ts.URL+client.DynClientsHandlerPath+"/"+expected.OutfacingID, nil) + req, err := http.NewRequest(method, ts.URL+client.DynClientsHandlerPath+"/"+expected.GetID(), nil) require.NoError(t, err) res, err := hc.Do(req) @@ -234,13 +234,13 @@ func TestHandler(t *testing.T) { }) t.Run("without incorrect auth", func(t *testing.T) { - body, res := fetchWithBearerAuth(t, method, ts.URL+client.DynClientsHandlerPath+"/"+expected.OutfacingID, "incorrect", nil) + body, res := fetchWithBearerAuth(t, method, ts.URL+client.DynClientsHandlerPath+"/"+expected.GetID(), "incorrect", nil) assert.Equal(t, http.StatusUnauthorized, res.StatusCode) snapshotx.SnapshotTExcept(t, newResponseSnapshot(body, res), nil) }) t.Run("with a different client auth", func(t *testing.T) { - body, res := fetchWithBearerAuth(t, method, ts.URL+client.DynClientsHandlerPath+"/"+expected.OutfacingID, secondClient.RegistrationAccessToken, nil) + body, res := fetchWithBearerAuth(t, method, ts.URL+client.DynClientsHandlerPath+"/"+expected.GetID(), secondClient.RegistrationAccessToken, nil) assert.Equal(t, http.StatusUnauthorized, res.StatusCode) snapshotx.SnapshotTExcept(t, newResponseSnapshot(body, res), nil) }) @@ -252,7 +252,7 @@ func TestHandler(t *testing.T) { t.Run("common", func(t *testing.T) { ts, _ := newServer(t, true) expected := &client.Client{ - OutfacingID: "existing-client", + LegacyClientID: "5dad3497-0cb7-469f-8e30-18cc5d35e10e", Secret: "averylongsecret", RedirectURIs: []string{"http://localhost:3000/cb"}, TokenEndpointAuthMethod: "client_secret_basic", @@ -269,8 +269,8 @@ func TestHandler(t *testing.T) { { d: "basic dynamic client registration", payload: &client.Client{ - OutfacingID: "create-client-1", - RedirectURIs: []string{"http://localhost:3000/cb"}, + LegacyClientID: "create-client-1", + RedirectURIs: []string{"http://localhost:3000/cb"}, }, path: client.DynClientsHandlerPath, statusCode: http.StatusCreated, @@ -278,10 +278,10 @@ func TestHandler(t *testing.T) { { d: "basic admin registration", payload: &client.Client{ - OutfacingID: "create-client-2", - Secret: "averylongsecret", - RedirectURIs: []string{"http://localhost:3000/cb"}, - Metadata: []byte(`{"foo":"bar"}`), + LegacyClientID: "0f1bb84e-4405-4e93-950b-cdae88c5dbf6", + Secret: "averylongsecret", + RedirectURIs: []string{"http://localhost:3000/cb"}, + Metadata: []byte(`{"foo":"bar"}`), }, path: client.ClientsHandlerPath, statusCode: http.StatusCreated, @@ -289,9 +289,9 @@ func TestHandler(t *testing.T) { { d: "metadata fails for dynamic client registration", payload: &client.Client{ - OutfacingID: "create-client-3", - RedirectURIs: []string{"http://localhost:3000/cb"}, - Metadata: []byte(`{"foo":"bar"}`), + LegacyClientID: "3f9ffb75-dc9d-4850-b6b6-40b2e5aa5aa4", + RedirectURIs: []string{"http://localhost:3000/cb"}, + Metadata: []byte(`{"foo":"bar"}`), }, path: client.DynClientsHandlerPath, statusCode: http.StatusBadRequest, @@ -299,9 +299,19 @@ func TestHandler(t *testing.T) { { d: "short secret fails for admin", payload: &client.Client{ - OutfacingID: "create-client-4", - Secret: "short", - RedirectURIs: []string{"http://localhost:3000/cb"}, + LegacyClientID: "98941dac-f963-4468-8a23-9483b1e04e3c", + Secret: "short", + RedirectURIs: []string{"http://localhost:3000/cb"}, + }, + path: client.ClientsHandlerPath, + statusCode: http.StatusBadRequest, + }, + { + d: "non-uuid fails", + payload: &client.Client{ + LegacyClientID: "not-a-uuid", + Secret: "averylongsecret", + RedirectURIs: []string{"http://localhost:3000/cb"}, }, path: client.ClientsHandlerPath, statusCode: http.StatusBadRequest, @@ -309,12 +319,21 @@ func TestHandler(t *testing.T) { { d: "basic dynamic client registration", payload: &client.Client{ - OutfacingID: "create-client-5", + LegacyClientID: "ead800c5-a316-4d0c-bf00-d25666ba72cf", + Secret: "averylongsecret", + RedirectURIs: []string{"http://localhost:3000/cb"}, + }, + path: client.DynClientsHandlerPath, + statusCode: http.StatusBadRequest, + }, + { + d: "empty ID succeeds", + payload: &client.Client{ Secret: "averylongsecret", RedirectURIs: []string{"http://localhost:3000/cb"}, }, - path: client.DynClientsHandlerPath, - statusCode: http.StatusForbidden, + path: client.ClientsHandlerPath, + statusCode: http.StatusCreated, }, } { t.Run(fmt.Sprintf("case=%d/description=%s", k, tc.d), func(t *testing.T) { @@ -324,6 +343,10 @@ func TestHandler(t *testing.T) { if tc.path == client.DynClientsHandlerPath { exclude = append(exclude, "client_id", "client_secret", "registration_client_uri") } + if tc.payload.LegacyClientID == "" { + exclude = append(exclude, "client_id", "registration_client_uri") + assert.NotEqual(t, uuid.Nil.String(), gjson.Get(body, "client_id").String(), body) + } if tc.statusCode == http.StatusOK { for _, key := range exclude { assert.NotEmpty(t, gjson.Get(body, key).String(), "%s in %s", key, body) @@ -377,9 +400,9 @@ func TestHandler(t *testing.T) { t.Run("case=fetching existing client", func(t *testing.T) { expected := createClient(t, &client.Client{ - OutfacingID: "existing-client-fetch", - Secret: "rdetzfuzgihojuzgtfrdes", - RedirectURIs: []string{"http://localhost:3000/cb"}, + LegacyClientID: "0e837115-5105-4da7-a85e-ac286c2ef50e", + Secret: "rdetzfuzgihojuzgtfrdes", + RedirectURIs: []string{"http://localhost:3000/cb"}, }, ts, client.ClientsHandlerPath) id := gjson.Get(expected, "client_id").String() rat := gjson.Get(expected, "registration_access_token").String() @@ -402,7 +425,7 @@ func TestHandler(t *testing.T) { t.Run("case=updating existing client fails with metadata on self service", func(t *testing.T) { expected := &client.Client{ - OutfacingID: "update-existing-client-selfservice-metadata", + LegacyClientID: "e3b3d617-73ea-4bf7-9919-43da61815f90", Secret: "averylongsecret", RedirectURIs: []string{"http://localhost:3000/cb"}, TokenEndpointAuthMethod: "client_secret_basic", @@ -415,7 +438,7 @@ func TestHandler(t *testing.T) { payload, err := json.Marshal(expected) require.NoError(t, err) - body, res := fetchWithBearerAuth(t, "PUT", ts.URL+client.DynClientsHandlerPath+"/"+expected.OutfacingID, gjson.Get(body, "registration_access_token").String(), bytes.NewReader(payload)) + body, res := fetchWithBearerAuth(t, "PUT", ts.URL+client.DynClientsHandlerPath+"/"+expected.GetID(), gjson.Get(body, "registration_access_token").String(), bytes.NewReader(payload)) assert.Equal(t, http.StatusBadRequest, res.StatusCode) snapshotx.SnapshotTExcept(t, newResponseSnapshot(body, res), nil) }) @@ -423,7 +446,7 @@ func TestHandler(t *testing.T) { t.Run("case=updating existing client", func(t *testing.T) { t.Run("endpoint=admin", func(t *testing.T) { expected := &client.Client{ - OutfacingID: "update-existing-client-admin", + LegacyClientID: "c614c65a-72f3-4dd4-8217-f4c6343533dc", Secret: "averylongsecret", RedirectURIs: []string{"http://localhost:3000/cb"}, TokenEndpointAuthMethod: "client_secret_basic", @@ -431,14 +454,14 @@ func TestHandler(t *testing.T) { createClient(t, expected, ts, client.ClientsHandlerPath) expected.RedirectURIs = append(expected.RedirectURIs, "https://foobar.com") - body, res := makeJSON(t, ts, "PUT", client.ClientsHandlerPath+"/"+expected.OutfacingID, expected) + body, res := makeJSON(t, ts, "PUT", client.ClientsHandlerPath+"/"+expected.GetID(), expected) assert.Equal(t, http.StatusOK, res.StatusCode) snapshotx.SnapshotTExcept(t, newResponseSnapshot(body, res), []string{"body.created_at", "body.updated_at"}) }) t.Run("endpoint=dynamic client registration", func(t *testing.T) { expected := &client.Client{ - OutfacingID: "update-existing-client-selfservice", + LegacyClientID: "b33d7cff-ecc9-4acf-9ce7-67436bc763d4", Secret: "averylongsecret", RedirectURIs: []string{"http://localhost:3000/cb"}, TokenEndpointAuthMethod: "client_secret_basic", @@ -452,23 +475,23 @@ func TestHandler(t *testing.T) { require.NoError(t, err) originalRAT := gjson.Get(actual, "registration_access_token").String() - body, res := fetchWithBearerAuth(t, "PUT", ts.URL+client.DynClientsHandlerPath+"/"+expected.OutfacingID, originalRAT, bytes.NewReader(payload)) + body, res := fetchWithBearerAuth(t, "PUT", ts.URL+client.DynClientsHandlerPath+"/"+expected.GetID(), originalRAT, bytes.NewReader(payload)) assert.Equal(t, http.StatusOK, res.StatusCode) newToken := gjson.Get(body, "registration_access_token").String() assert.NotEmpty(t, newToken) require.NotEqual(t, originalRAT, newToken, "the new token should be different from the old token") snapshotx.SnapshotTExcept(t, newResponseSnapshot(body, res), []string{"body.created_at", "body.updated_at", "body.registration_access_token"}) - _, res = fetchWithBearerAuth(t, "GET", ts.URL+client.DynClientsHandlerPath+"/"+expected.OutfacingID, originalRAT, bytes.NewReader(payload)) + _, res = fetchWithBearerAuth(t, "GET", ts.URL+client.DynClientsHandlerPath+"/"+expected.GetID(), originalRAT, bytes.NewReader(payload)) assert.Equal(t, http.StatusUnauthorized, res.StatusCode) - body, res = fetchWithBearerAuth(t, "GET", ts.URL+client.DynClientsHandlerPath+"/"+expected.OutfacingID, newToken, bytes.NewReader(payload)) + body, res = fetchWithBearerAuth(t, "GET", ts.URL+client.DynClientsHandlerPath+"/"+expected.GetID(), newToken, bytes.NewReader(payload)) assert.Equal(t, http.StatusOK, res.StatusCode) assert.Empty(t, gjson.Get(body, "registration_access_token").String()) }) t.Run("endpoint=dynamic client registration does not allow changing the secret", func(t *testing.T) { expected := &client.Client{ - OutfacingID: "update-existing-client-no-secret-change", + LegacyClientID: "d0c76ce1-ff9e-454d-b2ee-22fde66ae95e", RedirectURIs: []string{"http://localhost:3000/cb"}, TokenEndpointAuthMethod: "client_secret_basic", } @@ -481,7 +504,7 @@ func TestHandler(t *testing.T) { require.NoError(t, err) originalRAT := gjson.Get(actual, "registration_access_token").String() - body, res := fetchWithBearerAuth(t, "PUT", ts.URL+client.DynClientsHandlerPath+"/"+expected.OutfacingID, originalRAT, bytes.NewReader(payload)) + body, res := fetchWithBearerAuth(t, "PUT", ts.URL+client.DynClientsHandlerPath+"/"+expected.GetID(), originalRAT, bytes.NewReader(payload)) assert.Equal(t, http.StatusForbidden, res.StatusCode) snapshotx.SnapshotTExcept(t, newResponseSnapshot(body, res), nil) }) @@ -492,14 +515,14 @@ func TestHandler(t *testing.T) { TokenEndpointAuthMethod: "client_secret_basic", Secret: "foobarbaz", }) - require.Equal(t, http.StatusForbidden, res.StatusCode, body) + require.Equal(t, http.StatusBadRequest, res.StatusCode, body) snapshotx.SnapshotTExcept(t, newResponseSnapshot(body, res), nil) }) t.Run("case=delete existing client", func(t *testing.T) { t.Run("endpoint=admin", func(t *testing.T) { expected := &client.Client{ - OutfacingID: "delete-existing-client-admin", + LegacyClientID: "23e03b61-3d7b-4dfa-ba07-a05a94929efd", Secret: "averylongsecret", RedirectURIs: []string{"http://localhost:3000/cb"}, TokenEndpointAuthMethod: "client_secret_basic", @@ -507,13 +530,13 @@ func TestHandler(t *testing.T) { body, res := makeJSON(t, ts, "POST", client.ClientsHandlerPath, expected) require.Equal(t, http.StatusCreated, res.StatusCode, body) - _, res = makeJSON(t, ts, "DELETE", client.ClientsHandlerPath+"/"+expected.OutfacingID, nil) + _, res = makeJSON(t, ts, "DELETE", client.ClientsHandlerPath+"/"+expected.GetID(), nil) assert.Equal(t, http.StatusNoContent, res.StatusCode) }) t.Run("endpoint=selfservice", func(t *testing.T) { expected := &client.Client{ - OutfacingID: "delete-existing-client-selfservice", + LegacyClientID: "ef763972-9589-4a22-9a0b-5a9a2abf9982", Secret: "averylongsecret", RedirectURIs: []string{"http://localhost:3000/cb"}, TokenEndpointAuthMethod: "client_secret_basic", @@ -522,7 +545,7 @@ func TestHandler(t *testing.T) { require.Equal(t, http.StatusCreated, res.StatusCode, actual) originalRAT := gjson.Get(actual, "registration_access_token").String() - _, res = fetchWithBearerAuth(t, "DELETE", ts.URL+client.DynClientsHandlerPath+"/"+expected.OutfacingID, originalRAT, nil) + _, res = fetchWithBearerAuth(t, "DELETE", ts.URL+client.DynClientsHandlerPath+"/"+expected.GetID(), originalRAT, nil) assert.Equal(t, http.StatusNoContent, res.StatusCode) }) }) diff --git a/client/manager_test_helpers.go b/client/manager_test_helpers.go index 9a98b87eb96..1f6f8432bfc 100644 --- a/client/manager_test_helpers.go +++ b/client/manager_test_helpers.go @@ -49,7 +49,6 @@ func TestHelperClientAutoGenerateKey(k string, m Storage) func(t *testing.T) { return func(t *testing.T) { ctx := context.TODO() c := &Client{ - OutfacingID: "foo", Secret: "secret", RedirectURIs: []string{"http://redirect"}, TermsOfServiceURI: "foo", @@ -68,9 +67,9 @@ func TestHelperClientAuthenticate(k string, m Manager) func(t *testing.T) { return func(t *testing.T) { ctx := context.TODO() require.NoError(t, m.CreateClient(ctx, &Client{ - OutfacingID: "1234321", - Secret: "secret", - RedirectURIs: []string{"http://redirect"}, + LegacyClientID: "1234321", + Secret: "secret", + RedirectURIs: []string{"http://redirect"}, })) c, err := m.Authenticate(ctx, "1234321", []byte("secret1")) @@ -84,12 +83,12 @@ func TestHelperClientAuthenticate(k string, m Manager) func(t *testing.T) { func TestHelperUpdateTwoClients(_ string, m Manager) func(t *testing.T) { return func(t *testing.T) { - c1, c2 := &Client{OutfacingID: "klojdfc", Name: "test client 1"}, &Client{OutfacingID: "jlsdfkj", Name: "test client 2"} + c1, c2 := &Client{Name: "test client 1"}, &Client{Name: "test client 2"} require.NoError(t, m.CreateClient(context.Background(), c1)) require.NoError(t, m.CreateClient(context.Background(), c2)) - c1.Name, c2.Name = "updated klojdfc client 1", "updated klojdfc client 2" + c1.Name, c2.Name = "updated client 1", "updated client 2" assert.NoError(t, m.UpdateClient(context.Background(), c1)) assert.NoError(t, m.UpdateClient(context.Background(), c2)) @@ -100,7 +99,7 @@ func testHelperUpdateClient(t *testing.T, ctx context.Context, tenant Storage, k d, err := tenant.GetClient(ctx, "1234") assert.NoError(t, err) err = tenant.UpdateClient(ctx, &Client{ - OutfacingID: "2-1234", + LegacyClientID: "2-1234", Name: "name-new", Secret: "secret-new", RedirectURIs: []string{"http://redirect/new"}, @@ -142,11 +141,9 @@ func TestHelperCreateGetUpdateDeleteClientNext(t *testing.T, m Storage, networks }) t.Run("lifecycle=exists", func(t *testing.T) { - fakeID := client.ID require.NoError(t, m.CreateClient(ctx, &client)) c, err := m.GetClient(ctx, client.GetID()) require.NoError(t, err) - require.NotEqual(t, fakeID.String(), c.(*Client).ID.String(), "create must generate a new ID instead of using the original") assertx.EqualAsJSONExcept(t, &client, c, []string{ "registration_access_token", "registration_client_uri", @@ -228,7 +225,7 @@ func TestHelperCreateGetUpdateDeleteClient(k string, connection *pop.Connection, require.Error(t, err) t1c1 := &Client{ - OutfacingID: "1234", + LegacyClientID: "1234", Name: "name", Secret: "secret", RedirectURIs: []string{"http://redirect", "http://redirect1"}, @@ -264,14 +261,14 @@ func TestHelperCreateGetUpdateDeleteClient(k string, connection *pop.Connection, { t2c1 := *t1c1 require.Error(t, connection.Create(&t2c1), "should not be able to create the same client in other manager/tenant; are they backed by the same database?") - require.NoError(t, t2.CreateClient(ctx, &t2c1), "we should be able to create a client with the same OutfacingID but different ID in other tenant") + require.NoError(t, t2.CreateClient(ctx, &t2c1), "we should be able to create a client with the same GetID() but different ID in other tenant") } t2c3 := *t1c1 { pk, _ := uuid.NewV4() t2c3.ID = pk - t2c3.OutfacingID = "t2c2-1234" + t2c3.LegacyClientID = "t2c2-1234" require.NoError(t, t2.CreateClient(ctx, &t2c3)) require.Error(t, t2.CreateClient(ctx, &t2c3)) } @@ -281,7 +278,7 @@ func TestHelperCreateGetUpdateDeleteClient(k string, connection *pop.Connection, } c2Template := &Client{ - OutfacingID: "2-1234", + LegacyClientID: "2-1234", Name: "name2", Secret: "secret", RedirectURIs: []string{"http://redirect"}, @@ -303,8 +300,8 @@ func TestHelperCreateGetUpdateDeleteClient(k string, connection *pop.Connection, ds, err := t1.GetClients(ctx, Filter{Limit: 100, Offset: 0}) assert.NoError(t, err) assert.Len(t, ds, 2) - assert.NotEqual(t, ds[0].OutfacingID, ds[1].OutfacingID) - assert.NotEqual(t, ds[0].OutfacingID, ds[1].OutfacingID) + assert.NotEqual(t, ds[0].GetID(), ds[1].GetID()) + assert.NotEqual(t, ds[0].GetID(), ds[1].GetID()) // test if SecretExpiresAt was set properly assert.Equal(t, ds[0].SecretExpiresAt, 0) assert.Equal(t, ds[1].SecretExpiresAt, 1) @@ -338,7 +335,7 @@ func TestHelperCreateGetUpdateDeleteClient(k string, connection *pop.Connection, err = t1.DeleteClient(ctx, "1234") assert.NoError(t, err) - err = t1.DeleteClient(ctx, t2c3.OutfacingID) + err = t1.DeleteClient(ctx, t2c3.GetID()) assert.Error(t, err, "tenant 1 should not be able to delete tenant 2's client") _, err = t1.GetClient(ctx, "1234") diff --git a/client/sdk_test.go b/client/sdk_test.go index 5994dd71eaf..5b242d87b81 100644 --- a/client/sdk_test.go +++ b/client/sdk_test.go @@ -27,6 +27,8 @@ import ( "strings" "testing" + "github.com/ory/x/uuidx" + "github.com/go-openapi/strfmt" "github.com/mohae/deepcopy" @@ -51,7 +53,7 @@ import ( func createTestClient(prefix string) *models.OAuth2Client { return &models.OAuth2Client{ - ClientID: "1234", + ClientID: uuidx.NewV4().String(), ClientName: prefix + "name", ClientSecret: prefix + "secret", ClientURI: prefix + "uri", @@ -94,13 +96,11 @@ func TestClientSDK(t *testing.T) { c := hydra.NewHTTPClientWithConfig(nil, &hydra.TransportConfig{Schemes: []string{"http"}, Host: urlx.ParseOrPanic(server.URL).Host}) t.Run("case=client default scopes are set", func(t *testing.T) { - result, err := c.Admin.CreateOAuth2Client(admin.NewCreateOAuth2ClientParams().WithBody(&models.OAuth2Client{ - ClientID: "scoped", - })) + result, err := c.Admin.CreateOAuth2Client(admin.NewCreateOAuth2ClientParams().WithBody(&models.OAuth2Client{})) require.NoError(t, err) assert.EqualValues(t, conf.DefaultClientScope(ctx), strings.Split(result.Payload.Scope, " ")) - _, err = c.Admin.DeleteOAuth2Client(admin.NewDeleteOAuth2ClientParams().WithID("scoped")) + _, err = c.Admin.DeleteOAuth2Client(admin.NewDeleteOAuth2ClientParams().WithID(result.Payload.ClientID)) require.NoError(t, err) }) @@ -169,6 +169,8 @@ func TestClientSDK(t *testing.T) { uresult.Payload.UpdatedAt = strfmt.DateTime{} assert.NotEmpty(t, uresult.Payload.CreatedAt) uresult.Payload.CreatedAt = strfmt.DateTime{} + assert.NotEqual(t, updateClient.ClientID, uresult.Payload.ClientID) + updateClient.ClientID = uresult.Payload.ClientID assert.EqualValues(t, updateClient, uresult.Payload) // again, test if secret is not returned on Get @@ -205,6 +207,7 @@ func TestClientSDK(t *testing.T) { }) t.Run("case=id should be set properly", func(t *testing.T) { + id1, id2 := uuidx.NewV4().String(), uuidx.NewV4().String() for k, tc := range []struct { client *models.OAuth2Client expectID string @@ -213,12 +216,12 @@ func TestClientSDK(t *testing.T) { client: &models.OAuth2Client{}, }, { - client: &models.OAuth2Client{ClientID: "set-properly-1"}, - expectID: "set-properly-1", + client: &models.OAuth2Client{ClientID: id1}, + expectID: id1, }, { - client: &models.OAuth2Client{ClientID: "set-properly-2"}, - expectID: "set-properly-2", + client: &models.OAuth2Client{ClientID: id2}, + expectID: id2, }, } { t.Run(fmt.Sprintf("case=%d", k), func(t *testing.T) { @@ -246,7 +249,7 @@ func TestClientSDK(t *testing.T) { value := "http://foo.bar" client := createTestClient("") - client.ClientID = "patch1_client" + client.ClientID = uuidx.NewV4().String() _, err := c.Admin.CreateOAuth2Client(admin.NewCreateOAuth2ClientParams().WithBody(client)) require.NoError(t, err) @@ -268,7 +271,7 @@ func TestClientSDK(t *testing.T) { value := "foo" client := createTestClient("") - client.ClientID = "patch2_client" + client.ClientID = uuidx.NewV4().String() _, err := c.Admin.CreateOAuth2Client(admin.NewCreateOAuth2ClientParams().WithBody(client)) require.NoError(t, err) @@ -282,7 +285,7 @@ func TestClientSDK(t *testing.T) { value := "http://foo.bar" client := createTestClient("") - client.ClientID = "patch3_client" + client.ClientID = uuidx.NewV4().String() _, err := c.Admin.CreateOAuth2Client(admin.NewCreateOAuth2ClientParams().WithBody(client)) require.NoError(t, err) diff --git a/client/validator.go b/client/validator.go index db4cce2bf3f..9420e5eb31c 100644 --- a/client/validator.go +++ b/client/validator.go @@ -30,10 +30,7 @@ import ( "github.com/ory/x/errorsx" - "github.com/pborman/uuid" - "github.com/ory/x/stringslice" - "github.com/ory/x/stringsx" ) var ( @@ -70,9 +67,6 @@ func NewValidatorWithClient(registry Registry, client *http.Client) *Validator { } func (v *Validator) Validate(ctx context.Context, c *Client) error { - id := uuid.New() - c.OutfacingID = stringsx.Coalesce(c.OutfacingID, id) - if c.TokenEndpointAuthMethod == "" { c.TokenEndpointAuthMethod = "client_secret_basic" } else if c.TokenEndpointAuthMethod == "private_key_jwt" { diff --git a/client/validator_test.go b/client/validator_test.go index 0c0700f0753..68afda17887 100644 --- a/client/validator_test.go +++ b/client/validator_test.go @@ -27,6 +27,8 @@ import ( "net/http/httptest" "testing" + "github.com/gofrs/uuid" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" jose "gopkg.in/square/go-jose.v2" @@ -57,59 +59,59 @@ func TestValidate(t *testing.T) { { in: new(Client), check: func(t *testing.T, c *Client) { - assert.NotEmpty(t, c.OutfacingID) - assert.NotEmpty(t, c.GetID()) - assert.Equal(t, c.GetID(), c.OutfacingID) + assert.Equal(t, uuid.Nil.String(), c.GetID()) + assert.EqualValues(t, c.GetID(), c.ID.String()) + assert.Empty(t, c.LegacyClientID) }, }, { - in: &Client{OutfacingID: "foo"}, + in: &Client{LegacyClientID: "foo"}, check: func(t *testing.T, c *Client) { - assert.Equal(t, c.GetID(), c.OutfacingID) + assert.EqualValues(t, c.GetID(), c.LegacyClientID) }, }, { - in: &Client{OutfacingID: "foo"}, + in: &Client{LegacyClientID: "foo"}, check: func(t *testing.T, c *Client) { - assert.Equal(t, c.GetID(), c.OutfacingID) + assert.EqualValues(t, c.GetID(), c.LegacyClientID) }, }, { - in: &Client{OutfacingID: "foo", UserinfoSignedResponseAlg: "foo"}, + in: &Client{LegacyClientID: "foo", UserinfoSignedResponseAlg: "foo"}, expectErr: true, }, { - in: &Client{OutfacingID: "foo", TokenEndpointAuthMethod: "private_key_jwt"}, + in: &Client{LegacyClientID: "foo", TokenEndpointAuthMethod: "private_key_jwt"}, expectErr: true, }, { - in: &Client{OutfacingID: "foo", JSONWebKeys: &x.JoseJSONWebKeySet{JSONWebKeySet: new(jose.JSONWebKeySet)}, JSONWebKeysURI: "asdf", TokenEndpointAuthMethod: "private_key_jwt"}, + in: &Client{LegacyClientID: "foo", JSONWebKeys: &x.JoseJSONWebKeySet{JSONWebKeySet: new(jose.JSONWebKeySet)}, JSONWebKeysURI: "asdf", TokenEndpointAuthMethod: "private_key_jwt"}, expectErr: true, }, { - in: &Client{OutfacingID: "foo", JSONWebKeys: &x.JoseJSONWebKeySet{JSONWebKeySet: new(jose.JSONWebKeySet)}, TokenEndpointAuthMethod: "private_key_jwt", TokenEndpointAuthSigningAlgorithm: "HS256"}, + in: &Client{LegacyClientID: "foo", JSONWebKeys: &x.JoseJSONWebKeySet{JSONWebKeySet: new(jose.JSONWebKeySet)}, TokenEndpointAuthMethod: "private_key_jwt", TokenEndpointAuthSigningAlgorithm: "HS256"}, expectErr: true, }, { - in: &Client{OutfacingID: "foo", PostLogoutRedirectURIs: []string{"https://bar/"}, RedirectURIs: []string{"https://foo/"}}, + in: &Client{LegacyClientID: "foo", PostLogoutRedirectURIs: []string{"https://bar/"}, RedirectURIs: []string{"https://foo/"}}, expectErr: true, }, { - in: &Client{OutfacingID: "foo", PostLogoutRedirectURIs: []string{"http://foo/"}, RedirectURIs: []string{"https://foo/"}}, + in: &Client{LegacyClientID: "foo", PostLogoutRedirectURIs: []string{"http://foo/"}, RedirectURIs: []string{"https://foo/"}}, expectErr: true, }, { - in: &Client{OutfacingID: "foo", PostLogoutRedirectURIs: []string{"https://foo:1234/"}, RedirectURIs: []string{"https://foo/"}}, + in: &Client{LegacyClientID: "foo", PostLogoutRedirectURIs: []string{"https://foo:1234/"}, RedirectURIs: []string{"https://foo/"}}, expectErr: true, }, { - in: &Client{OutfacingID: "foo", PostLogoutRedirectURIs: []string{"https://foo/"}, RedirectURIs: []string{"https://foo/"}}, + in: &Client{LegacyClientID: "foo", PostLogoutRedirectURIs: []string{"https://foo/"}, RedirectURIs: []string{"https://foo/"}}, check: func(t *testing.T, c *Client) { assert.Equal(t, []string{"https://foo/"}, []string(c.PostLogoutRedirectURIs)) }, }, { - in: &Client{OutfacingID: "foo"}, + in: &Client{LegacyClientID: "foo"}, check: func(t *testing.T, c *Client) { assert.Equal(t, "public", c.SubjectType) }, @@ -119,19 +121,19 @@ func TestValidate(t *testing.T) { c.MustSet(ctx, config.KeySubjectTypesSupported, []string{"pairwise"}) return NewValidator(reg) }, - in: &Client{OutfacingID: "foo"}, + in: &Client{LegacyClientID: "foo"}, check: func(t *testing.T, c *Client) { assert.Equal(t, "pairwise", c.SubjectType) }, }, { - in: &Client{OutfacingID: "foo", SubjectType: "pairwise"}, + in: &Client{LegacyClientID: "foo", SubjectType: "pairwise"}, check: func(t *testing.T, c *Client) { assert.Equal(t, "pairwise", c.SubjectType) }, }, { - in: &Client{OutfacingID: "foo", SubjectType: "foo"}, + in: &Client{LegacyClientID: "foo", SubjectType: "foo"}, expectErr: true, }, } { @@ -223,7 +225,7 @@ func TestValidateDynamicRegistration(t *testing.T) { }{ { in: &Client{ - OutfacingID: "foo", + LegacyClientID: "foo", PostLogoutRedirectURIs: []string{"https://foo/"}, RedirectURIs: []string{"https://foo/"}, Metadata: []byte("{\"access_token_ttl\":10}"), @@ -232,7 +234,7 @@ func TestValidateDynamicRegistration(t *testing.T) { }, { in: &Client{ - OutfacingID: "foo", + LegacyClientID: "foo", PostLogoutRedirectURIs: []string{"https://foo/"}, RedirectURIs: []string{"https://foo/"}, Metadata: []byte("{\"id_token_ttl\":10}"), @@ -241,7 +243,7 @@ func TestValidateDynamicRegistration(t *testing.T) { }, { in: &Client{ - OutfacingID: "foo", + LegacyClientID: "foo", PostLogoutRedirectURIs: []string{"https://foo/"}, RedirectURIs: []string{"https://foo/"}, Metadata: []byte("{\"anything\":10}"), @@ -250,12 +252,12 @@ func TestValidateDynamicRegistration(t *testing.T) { }, { in: &Client{ - OutfacingID: "foo", + LegacyClientID: "foo", PostLogoutRedirectURIs: []string{"https://foo/"}, RedirectURIs: []string{"https://foo/"}, }, check: func(t *testing.T, c *Client) { - assert.Equal(t, "foo", c.OutfacingID) + assert.EqualValues(t, "foo", c.LegacyClientID) }, }, } { diff --git a/cmd/cli/handler_jwk.go b/cmd/cli/handler_jwk.go index 151dba40b49..e89b3178b4e 100644 --- a/cmd/cli/handler_jwk.go +++ b/cmd/cli/handler_jwk.go @@ -28,11 +28,12 @@ import ( "io/ioutil" "net/http" + "github.com/ory/x/uuidx" + "github.com/ory/hydra/internal/httpclient/client/admin" "github.com/ory/hydra/internal/httpclient/models" "github.com/ory/x/pointerx" - "github.com/pborman/uuid" "github.com/spf13/cobra" jose "gopkg.in/square/go-jose.v2" @@ -149,7 +150,7 @@ func (h *JWKHandler) ImportKeys(cmd *cobra.Command, args []string) { keyID := flagx.MustGetString(cmd, "default-key-id") if keyID == "" { - keyID = uuid.New() + keyID = uuidx.NewV4().String() } if key, privateErr := josex.LoadPrivateKey(file); privateErr != nil { diff --git a/cmd/root_test.go b/cmd/root_test.go index e31c0b37964..b1ca47efb73 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -30,6 +30,8 @@ import ( "testing" "time" + "github.com/ory/x/uuidx" + "github.com/ory/hydra/internal" "github.com/phayes/freeport" @@ -78,6 +80,9 @@ func TestExecute(t *testing.T) { backend := fmt.Sprintf("https://localhost:%d/", backendPort) conf := internal.NewConfigurationWithDefaults() + clientID1 := uuidx.NewV4().String() + clientID2 := uuidx.NewV4().String() + rootCmd := NewRootCmd() for _, c := range []struct { args []string @@ -115,11 +120,11 @@ func TestExecute(t *testing.T) { return false }, }, - {args: []string{"clients", "create", "--skip-tls-verify", "--endpoint", backend, "--id", "foobarbaz", "--secret", "foobar", "-g", "client_credentials"}}, - {args: []string{"clients", "get", "--skip-tls-verify", "--endpoint", backend, "foobarbaz"}}, - {args: []string{"clients", "create", "--skip-tls-verify", "--endpoint", backend, "--id", "public-foo"}}, - {args: []string{"clients", "create", "--skip-tls-verify", "--endpoint", backend, "--id", "confidential-foo", "--pgp-key", base64EncodedPGPPublicKey(t), "--grant-types", "client_credentials", "--response-types", "token"}}, - {args: []string{"clients", "delete", "--skip-tls-verify", "--endpoint", backend, "public-foo"}}, + {args: []string{"clients", "create", "--skip-tls-verify", "--endpoint", backend, "--id", clientID1, "--secret", "foobar", "-g", "client_credentials"}}, + {args: []string{"clients", "get", "--skip-tls-verify", "--endpoint", backend, clientID1}}, + {args: []string{"clients", "create", "--skip-tls-verify", "--endpoint", backend, "--id", clientID2}}, + {args: []string{"clients", "create", "--skip-tls-verify", "--endpoint", backend, "--id", uuidx.NewV4().String(), "--pgp-key", base64EncodedPGPPublicKey(t), "--grant-types", "client_credentials", "--response-types", "token"}}, + {args: []string{"clients", "delete", "--skip-tls-verify", "--endpoint", backend, clientID2}}, {args: []string{"keys", "create", "--skip-tls-verify", "foo", "--endpoint", backend, "-a", "RS256"}}, {args: []string{"keys", "get", "--skip-tls-verify", "--endpoint", backend, "foo"}}, // {args: []string{"keys", "rotate", "--skip-tls-verify", "--endpoint", backend, "foo"}}, @@ -128,8 +133,8 @@ func TestExecute(t *testing.T) { {args: []string{"keys", "import", "--skip-tls-verify", "--endpoint", backend, "import-1", "../test/stub/ecdh.key", "../test/stub/ecdh.pub"}, skipTest: conf.HSMEnabled()}, {args: []string{"keys", "import", "--skip-tls-verify", "--endpoint", backend, "import-2", "../test/stub/rsa.key", "../test/stub/rsa.pub"}, skipTest: conf.HSMEnabled()}, {args: []string{"keys", "import", "--skip-tls-verify", "--endpoint", backend, "import-2", "../test/stub/rsa.key", "../test/stub/rsa.pub"}, skipTest: conf.HSMEnabled()}, - {args: []string{"token", "revoke", "--skip-tls-verify", "--endpoint", frontend, "--client-secret", "foobar", "--client-id", "foobarbaz", "foo"}}, - {args: []string{"token", "client", "--skip-tls-verify", "--endpoint", frontend, "--client-secret", "foobar", "--client-id", "foobarbaz"}}, + {args: []string{"token", "revoke", "--skip-tls-verify", "--endpoint", frontend, "--client-secret", "foobar", "--client-id", clientID1, "foo"}}, + {args: []string{"token", "client", "--skip-tls-verify", "--endpoint", frontend, "--client-secret", "foobar", "--client-id", clientID1}}, {args: []string{"help", "migrate", "sql"}}, {args: []string{"version"}}, {args: []string{"token", "flush", "--skip-tls-verify", "--endpoint", backend}}, diff --git a/consent/handler_test.go b/consent/handler_test.go index 62d5c48dcd2..995aefba8d1 100644 --- a/consent/handler_test.go +++ b/consent/handler_test.go @@ -64,7 +64,7 @@ func TestGetLogoutRequest(t *testing.T) { reg := internal.NewRegistryMemory(t, conf, &contextx.Default{}) if tc.exists { - cl := &client.Client{OutfacingID: "client" + key} + cl := &client.Client{LegacyClientID: "client" + key} require.NoError(t, reg.ClientManager().CreateClient(context.Background(), cl)) require.NoError(t, reg.ConsentManager().CreateLogoutRequest(context.TODO(), &LogoutRequest{ Client: cl, @@ -118,7 +118,7 @@ func TestGetLoginRequest(t *testing.T) { reg := internal.NewRegistryMemory(t, conf, &contextx.Default{}) if tc.exists { - cl := &client.Client{OutfacingID: "client" + key} + cl := &client.Client{LegacyClientID: "client" + key} require.NoError(t, reg.ClientManager().CreateClient(context.Background(), cl)) require.NoError(t, reg.ConsentManager().CreateLoginRequest(context.Background(), &LoginRequest{ Client: cl, @@ -177,7 +177,7 @@ func TestGetConsentRequest(t *testing.T) { reg := internal.NewRegistryMemory(t, conf, &contextx.Default{}) if tc.exists { - cl := &client.Client{OutfacingID: "client" + key} + cl := &client.Client{LegacyClientID: "client" + key} require.NoError(t, reg.ClientManager().CreateClient(context.Background(), cl)) lr := &LoginRequest{ID: "login-" + challenge, Client: cl, RequestURL: requestURL} require.NoError(t, reg.ConsentManager().CreateLoginRequest(context.Background(), lr)) @@ -238,7 +238,7 @@ func TestGetLoginRequestWithDuplicateAccept(t *testing.T) { conf := internal.NewConfigurationWithDefaults() reg := internal.NewRegistryMemory(t, conf, &contextx.Default{}) - cl := &client.Client{OutfacingID: "client"} + cl := &client.Client{LegacyClientID: "client"} require.NoError(t, reg.ClientManager().CreateClient(context.Background(), cl)) require.NoError(t, reg.ConsentManager().CreateLoginRequest(context.Background(), &LoginRequest{ Client: cl, diff --git a/consent/manager_test_helpers.go b/consent/manager_test_helpers.go index 6c579f77389..e8c53a6b022 100644 --- a/consent/manager_test_helpers.go +++ b/consent/manager_test_helpers.go @@ -52,7 +52,7 @@ func MockConsentRequest(key string, remember bool, rememberFor int, hasError boo UILocales: []string{"fr" + key, "de" + key}, Display: "popup" + key, }, - Client: &client.Client{OutfacingID: "fk-client-" + key}, + Client: &client.Client{LegacyClientID: "fk-client-" + key}, RequestURL: "https://request-url/path" + key, LoginChallenge: sqlxx.NullString(makeID(loginChallengeBase, tenant, key)), LoginSessionID: sqlxx.NullString(makeID("fk-login-session", tenant, key)), @@ -103,7 +103,7 @@ func MockLogoutRequest(key string, withClient bool, tenant string) (c *LogoutReq var cl *client.Client if withClient { cl = &client.Client{ - OutfacingID: "fk-client-" + key, + LegacyClientID: "fk-client-" + key, } } return &LogoutRequest{ @@ -128,7 +128,7 @@ func MockAuthRequest(key string, authAt bool, tenant string) (c *LoginRequest, h Display: "popup" + key, }, RequestedAt: time.Now().UTC().Add(-time.Minute), - Client: &client.Client{OutfacingID: "fk-client-" + key}, + Client: &client.Client{LegacyClientID: "fk-client-" + key}, Subject: "subject" + key, RequestURL: "https://request-url/path" + key, Skip: true, @@ -262,7 +262,7 @@ func makeID(base string, tenant string, key string) string { } func TestHelperNID(t1ClientManager client.Manager, t1ValidNID Manager, t2InvalidNID Manager) func(t *testing.T) { - testClient := client.Client{OutfacingID: fmt.Sprintf("2022-03-11-client-nid-test-1")} + testClient := client.Client{LegacyClientID: fmt.Sprintf("2022-03-11-client-nid-test-1")} testLS := LoginSession{ ID: "2022-03-11-ls-nid-test-1", Subject: "2022-03-11-test-1-sub", @@ -272,7 +272,7 @@ func TestHelperNID(t1ClientManager client.Manager, t1ValidNID Manager, t2Invalid Subject: "2022-03-11-test-1-sub", Verifier: "2022-03-11-test-1-ver", RequestedAt: time.Now(), - Client: &client.Client{OutfacingID: fmt.Sprintf("2022-03-11-client-nid-test-1")}, + Client: &client.Client{LegacyClientID: fmt.Sprintf("2022-03-11-client-nid-test-1")}, } testHLR := HandledLoginRequest{ LoginRequest: &testLR, @@ -318,7 +318,7 @@ func ManagerTests(m Manager, clientManager client.Manager, fositeManager x.Fosit } t.Run("case=init-fks", func(t *testing.T) { for _, k := range []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "rv1", "rv2"} { - require.NoError(t, clientManager.CreateClient(context.Background(), &client.Client{OutfacingID: fmt.Sprintf("fk-client-%s", k)})) + require.NoError(t, clientManager.CreateClient(context.Background(), &client.Client{LegacyClientID: fmt.Sprintf("fk-client-%s", k)})) require.NoError(t, m.CreateLoginSession(context.Background(), &LoginSession{ ID: makeID("fk-login-session", tenant, k), @@ -330,7 +330,7 @@ func ManagerTests(m Manager, clientManager client.Manager, fositeManager x.Fosit ID: makeID("fk-login-challenge", tenant, k), Subject: fmt.Sprintf("subject%s", k), Verifier: makeID("fk-login-verifier", tenant, k), - Client: &client.Client{OutfacingID: fmt.Sprintf("fk-client-%s", k)}, + Client: &client.Client{LegacyClientID: fmt.Sprintf("fk-client-%s", k)}, AuthenticatedAt: sqlxx.NullTime(time.Now()), RequestedAt: time.Now(), } @@ -714,7 +714,7 @@ func ManagerTests(m Manager, clientManager client.Manager, fositeManager x.Fosit require.NoError(t, err) for _, consent := range consents { assert.Contains(t, tc.challenges, consent.ID) - assert.Contains(t, tc.clients, consent.ConsentRequest.Client.OutfacingID) + assert.Contains(t, tc.clients, consent.ConsentRequest.Client.GetID()) } } @@ -782,7 +782,7 @@ func ManagerTests(m Manager, clientManager client.Manager, fositeManager x.Fosit } require.NoError(t, m.CreateLoginSession(context.Background(), ls)) - cl := &client.Client{OutfacingID: uuid.New().String()} + cl := &client.Client{LegacyClientID: uuid.New().String()} switch k % 4 { case 0: cl.FrontChannelLogoutURI = "http://some-url.com/" @@ -818,10 +818,10 @@ func ManagerTests(m Manager, clientManager client.Manager, fositeManager x.Fosit for _, e := range es { var found bool for _, a := range actual { - if e.OutfacingID == a.OutfacingID { + if e.GetID() == a.GetID() { found = true } - assert.Equal(t, e.OutfacingID, a.OutfacingID) + assert.Equal(t, e.GetID(), a.GetID()) assert.Equal(t, e.FrontChannelLogoutURI, a.FrontChannelLogoutURI) assert.Equal(t, e.BackChannelLogoutURI, a.BackChannelLogoutURI) } diff --git a/consent/sdk_test.go b/consent/sdk_test.go index 1457591ed07..8a5024ff182 100644 --- a/consent/sdk_test.go +++ b/consent/sdk_test.go @@ -140,7 +140,7 @@ func TestSDK(t *testing.T) { _, err = sdk.Admin.RevokeConsentSessions(admin.NewRevokeConsentSessionsParams().WithSubject("subject1")) require.Error(t, err) - _, err = sdk.Admin.RevokeConsentSessions(admin.NewRevokeConsentSessionsParams().WithSubject(cr4.Subject).WithClient(&cr4.Client.OutfacingID)) + _, err = sdk.Admin.RevokeConsentSessions(admin.NewRevokeConsentSessionsParams().WithSubject(cr4.Subject).WithClient(pointerx.String(cr4.Client.GetID()))) require.NoError(t, err) _, err = sdk.Admin.RevokeConsentSessions(admin.NewRevokeConsentSessionsParams().WithSubject("subject1").WithAll(pointerx.Bool(true))) diff --git a/consent/strategy_default.go b/consent/strategy_default.go index e66d0e69ab6..f1e9df5265b 100644 --- a/consent/strategy_default.go +++ b/consent/strategy_default.go @@ -657,7 +657,7 @@ func (s *DefaultStrategy) executeBackChannelLogout(ctx context.Context, r *http. t, _, err := s.r.OpenIDJWTStrategy().Generate(ctx, jwtgo.MapClaims{ "iss": s.c.IssuerURL(ctx).String(), - "aud": []string{c.OutfacingID}, + "aud": []string{c.LegacyClientID}, "iat": time.Now().UTC().Unix(), "jti": uuid.New(), "events": map[string]struct{}{"http://schemas.openid.net/event/backchannel-logout": {}}, @@ -669,7 +669,7 @@ func (s *DefaultStrategy) executeBackChannelLogout(ctx context.Context, r *http. return err } - tasks = append(tasks, task{url: c.BackChannelLogoutURI, clientID: c.OutfacingID, token: t}) + tasks = append(tasks, task{url: c.BackChannelLogoutURI, clientID: c.GetID(), token: t}) } hc := httpx.NewResilientClient() @@ -997,7 +997,7 @@ func (s *DefaultStrategy) ObfuscateSubjectIdentifier(ctx context.Context, cl fos if c, ok := cl.(*client.Client); ok && c.SubjectType == "pairwise" { algorithm, ok := s.r.SubjectIdentifierAlgorithm(ctx)[c.SubjectType] if !ok { - return "", errorsx.WithStack(fosite.ErrInvalidRequest.WithHintf(`Subject Identifier Algorithm '%s' was requested by OAuth 2.0 Client '%s' but is not configured.`, c.SubjectType, c.OutfacingID)) + return "", errorsx.WithStack(fosite.ErrInvalidRequest.WithHintf(`Subject Identifier Algorithm '%s' was requested by OAuth 2.0 Client '%s' but is not configured.`, c.SubjectType, c.GetID())) } if len(forcedIdentifier) > 0 { diff --git a/consent/strategy_default_test.go b/consent/strategy_default_test.go index ec10279d85c..0e0bfd9bf77 100644 --- a/consent/strategy_default_test.go +++ b/consent/strategy_default_test.go @@ -84,7 +84,7 @@ func makeOAuth2Request(t *testing.T, reg driver.Registry, hc *http.Client, oc *c values.Add("response_type", "code") values.Add("state", uuid.New().String()) - values.Add("client_id", oc.OutfacingID) + values.Add("client_id", oc.GetID()) res, err := hc.Get(urlx.CopyWithQuery(reg.Config().OAuth2AuthURL(ctx), values).String()) require.NoError(t, err) defer res.Body.Close() @@ -96,7 +96,7 @@ func createClient(t *testing.T, reg driver.Registry, c *client.Client) *client.C secret := uuid.New().String() c.Secret = secret c.Scope = "openid offline" - c.OutfacingID = uuid.New().String() + c.LegacyClientID = uuid.New().String() require.NoError(t, reg.ClientManager().CreateClient(context.Background(), c)) c.Secret = secret return c diff --git a/consent/strategy_logout_test.go b/consent/strategy_logout_test.go index 6a0c3bd6f56..707f55bb370 100644 --- a/consent/strategy_logout_test.go +++ b/consent/strategy_logout_test.go @@ -309,7 +309,7 @@ func TestLogoutFlows(t *testing.T) { checkAndAcceptLogout(t, wg, nil) tc.claims["sub"] = subject tc.claims["sid"] = <-sid - tc.claims["aud"] = c.OutfacingID + tc.claims["aud"] = c.GetID() tc.claims["exp"] = time.Now().Add(-time.Hour).Unix() logoutAndExpectErrorPage(t, browser, http.MethodGet, url.Values{ @@ -332,7 +332,7 @@ func TestLogoutFlows(t *testing.T) { "state": {"1234"}, "post_logout_redirect_uri": {"https://this-is-not-a-valid-redirect-url/custom"}, "id_token_hint": {testhelpers.NewIDTokenWithClaims(t, reg, jwtgo.MapClaims{ - "aud": c.OutfacingID, + "aud": c.GetID(), "iss": reg.Config().IssuerURL(ctx).String(), "sub": subject, "sid": "logout-session-temp4", @@ -356,7 +356,7 @@ func TestLogoutFlows(t *testing.T) { sendClaims := jwtgo.MapClaims{ "iss": reg.Config().IssuerURL(ctx).String(), - "aud": c.OutfacingID, + "aud": c.GetID(), "sid": <-sid, "sub": subject, "exp": time.Now().Add(time.Hour).Unix(), @@ -388,7 +388,7 @@ func TestLogoutFlows(t *testing.T) { t.Run("case=should pass even if audience is an array not a string", func(t *testing.T) { // formerly: should pass rp-inititated flow" - claims := jwtgo.MapClaims{"aud": []string{c.OutfacingID}} + claims := jwtgo.MapClaims{"aud": []string{c.GetID()}} t.Run("method=GET", run("GET", claims)) t.Run("method=POST", run("POST", claims)) }) @@ -407,7 +407,7 @@ func TestLogoutFlows(t *testing.T) { "state": {"1234"}, "post_logout_redirect_uri": {customPostLogoutURL}, "id_token_hint": {genIDToken(t, reg, jwtgo.MapClaims{ - "aud": []string{c.OutfacingID}, // make sure this works with string slices too + "aud": []string{c.GetID()}, // make sure this works with string slices too "iss": reg.Config().IssuerURL(ctx).String(), "sub": subject, "sid": "i-do-not-exist", @@ -429,7 +429,7 @@ func TestLogoutFlows(t *testing.T) { "post_logout_redirect_uri": {customPostLogoutURL}, "id_token_hint": {testhelpers.NewIDTokenWithClaims(t, reg, jwtgo.MapClaims{ "iss": reg.Config().IssuerURL(ctx).String(), - "aud": c.OutfacingID, + "aud": c.GetID(), "sid": <-sid, "sub": subject, "exp": time.Now().Add(time.Hour).Unix(), @@ -458,7 +458,7 @@ func TestLogoutFlows(t *testing.T) { "post_logout_redirect_uri": {customPostLogoutURL}, "id_token_hint": {testhelpers.NewIDTokenWithClaims(t, reg, jwtgo.MapClaims{ "iss": reg.Config().IssuerURL(ctx).String(), - "aud": c.OutfacingID, + "aud": c.GetID(), "sid": <-sid, "sub": subject, "exp": time.Now().Add(time.Hour).Unix(), diff --git a/consent/strategy_oauth_test.go b/consent/strategy_oauth_test.go index 611a0461011..587bd8699ec 100644 --- a/consent/strategy_oauth_test.go +++ b/consent/strategy_oauth_test.go @@ -26,6 +26,7 @@ import ( "github.com/ory/fosite" "github.com/ory/x/urlx" + "github.com/ory/x/uuidx" "github.com/ory/hydra/client" "github.com/ory/hydra/driver/config" @@ -50,7 +51,7 @@ func TestStrategyLoginConsentNext(t *testing.T) { oauth2Config := func(t *testing.T, c *client.Client) *oauth2.Config { return &oauth2.Config{ - ClientID: c.OutfacingID, + ClientID: c.GetID(), ClientSecret: c.Secret, Endpoint: oauth2.Endpoint{ AuthURL: publicTS.URL + "/oauth2/auth", @@ -306,7 +307,7 @@ func TestStrategyLoginConsentNext(t *testing.T) { // - This should fail because prompt=none, client is public, and redirection scheme is not HTTPS but a custom scheme // - This should pass because prompt=none, client is public, redirection scheme is HTTP and host is localhost - c := &client.Client{OutfacingID: uuid.New(), TokenEndpointAuthMethod: "none", + c := &client.Client{LegacyClientID: uuidx.NewV4().String(), TokenEndpointAuthMethod: "none", RedirectURIs: []string{ testhelpers.NewCallbackURL(t, "callback", testhelpers.HTTPServerNotImplementedHandler), "custom://redirection-scheme/path", @@ -341,7 +342,7 @@ func TestStrategyLoginConsentNext(t *testing.T) { "response_type": {"code"}, "state": {uuid.New()}, "redirect_uri": {redir}, - "client_id": {c.OutfacingID}, + "client_id": {c.GetID()}, "prompt": {"none"}, }).String()) diff --git a/consent/subject_identifier_algorithm_pairwise.go b/consent/subject_identifier_algorithm_pairwise.go index 148370ed8c7..45900c1a75d 100644 --- a/consent/subject_identifier_algorithm_pairwise.go +++ b/consent/subject_identifier_algorithm_pairwise.go @@ -43,9 +43,9 @@ func (g *SubjectIdentifierAlgorithmPairwise) Obfuscate(subject string, client *c // sub = SHA-256 ( sector_identifier || local_account_id || salt ). var id string if len(client.SectorIdentifierURI) == 0 && len(client.RedirectURIs) > 1 { - return "", errorsx.WithStack(fosite.ErrInvalidRequest.WithHintf("OAuth 2.0 Client %s has multiple redirect_uris but no sector_identifier_uri was set which is not allowed when performing using subject type pairwise. Please reconfigure the OAuth 2.0 client properly.", client.OutfacingID)) + return "", errorsx.WithStack(fosite.ErrInvalidRequest.WithHintf("OAuth 2.0 Client %s has multiple redirect_uris but no sector_identifier_uri was set which is not allowed when performing using subject type pairwise. Please reconfigure the OAuth 2.0 client properly.", client.GetID())) } else if len(client.SectorIdentifierURI) == 0 && len(client.RedirectURIs) == 0 { - return "", errorsx.WithStack(fosite.ErrInvalidRequest.WithHintf("OAuth 2.0 Client %s neither specifies a sector_identifier_uri nor a redirect_uri which is not allowed when performing using subject type pairwise. Please reconfigure the OAuth 2.0 client properly.", client.OutfacingID)) + return "", errorsx.WithStack(fosite.ErrInvalidRequest.WithHintf("OAuth 2.0 Client %s neither specifies a sector_identifier_uri nor a redirect_uri which is not allowed when performing using subject type pairwise. Please reconfigure the OAuth 2.0 client properly.", client.GetID())) } else if len(client.SectorIdentifierURI) > 0 { id = client.SectorIdentifierURI } else { diff --git a/consent/types.go b/consent/types.go index 04c2d398f18..79a7b532993 100644 --- a/consent/types.go +++ b/consent/types.go @@ -420,7 +420,7 @@ func (r *LogoutRequest) BeforeSave(_ *pop.Connection) error { if r.Client != nil { r.ClientID = sql.NullString{ Valid: true, - String: r.Client.OutfacingID, + String: r.Client.GetID(), } } return nil diff --git a/cypress/helpers/index.js b/cypress/helpers/index.js index c57d12cb307..a6ec7463ddd 100644 --- a/cypress/helpers/index.js +++ b/cypress/helpers/index.js @@ -1,9 +1,6 @@ -export const prng = () => { - var array = new Uint32Array(2) - crypto.getRandomValues(array) +import { v4 as uuidv4 } from 'uuid' - return `${array[0].toString()}${array[1].toString()}` -} +export const prng = () => uuidv4() const isStatusOk = (res) => res.ok diff --git a/flow/flow.go b/flow/flow.go index a3255f65aac..efafc7f4bf7 100644 --- a/flow/flow.go +++ b/flow/flow.go @@ -453,7 +453,7 @@ func (_ Flow) TableName() string { func (f *Flow) BeforeSave(_ *pop.Connection) error { if f.Client != nil { - f.ClientID = f.Client.OutfacingID + f.ClientID = f.Client.GetID() } if f.State == FlowStateLoginUnused && string(f.Context) == "" { f.Context = sqlxx.JSONRawMessage("{}") diff --git a/go.mod b/go.mod index f11f0faa19e..16aea96617c 100644 --- a/go.mod +++ b/go.mod @@ -15,10 +15,6 @@ replace github.com/ory/fosite => github.com/ory/fosite v0.42.3-0.20220513181618- replace github.com/gobuffalo/pop/v6 => github.com/gobuffalo/pop/v6 v6.0.4-0.20220524160009-195240e4a669 -replace github.com/ory/x => github.com/ory/x v0.0.413 - -//replace github.com/ory/x => ../x - require ( github.com/ThalesIgnite/crypto11 v1.2.4 github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect @@ -67,7 +63,7 @@ require ( github.com/ory/go-acc v0.2.8 github.com/ory/graceful v0.1.1 github.com/ory/herodot v0.9.13 - github.com/ory/x v0.0.404 + github.com/ory/x v0.0.415 github.com/pborman/uuid v1.2.1 github.com/pelletier/go-toml v1.9.5 // indirect github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 diff --git a/go.sum b/go.sum index 5e4a47803f5..ff935134e5f 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,7 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxo cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.41.0/go.mod h1:OauMR7DV8fzvZIl2qg6rkaIhD/vmgk4iwEw/h6ercmg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= @@ -75,9 +76,11 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-agent/pkg/obfuscate v0.0.0-20211129110424-6491aa3bf583 h1:3nVO1nQyh64IUY6BPZUpMYMZ738Pu+LsMt3E0eqqIYw= github.com/DataDog/datadog-agent/pkg/obfuscate v0.0.0-20211129110424-6491aa3bf583/go.mod h1:EP9f4GqaDJyP1F5jTNMtzdIpw3JpNs3rMSJOnYywCiw= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/datadog-go v4.0.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v4.8.2+incompatible h1:qbcKSx29aBLD+5QLvlQZlGmRMF/FfGqFLFev/1TDzRo= github.com/DataDog/datadog-go v4.8.2+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go/v5 v5.0.2 h1:UFtEe7662/Qojxkw1d6SboAeA0CPI3naKhVASwFn+04= @@ -90,6 +93,7 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver/v3 v3.0.3/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= @@ -169,6 +173,7 @@ github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:W github.com/avast/retry-go/v4 v4.0.5 h1:C0Fm9MjPCmgLW6Jb1zBTVRx0ycr+VUaaUZO5wpqYjqg= github.com/avast/retry-go/v4 v4.0.5/go.mod h1:HqmLvS2VLdStPCGDFjSuZ9pzlTqVRldCI4w2dO4m1Ms= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/aws/aws-sdk-go v1.23.19/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM= @@ -187,6 +192,7 @@ github.com/aws/aws-sdk-go-v2/service/sqs v1.0.0/go.mod h1:w5BclCU8ptTbagzXS/fHBr github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= github.com/aws/aws-sdk-go-v2/service/sts v1.0.0/go.mod h1:5f+cELGATgill5Pu3/vK3Ebuigstc+qYEHW5MvGWZO4= github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= +github.com/aws/aws-xray-sdk-go v0.9.4/go.mod h1:XtMKdBQfpVut+tJEwI7+dJFRxxRdxHDyVNp2tHXRq04= github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.11.0/go.mod h1:3xHYmszWVx2c0kIwQeEVf9uSm4fYZt67FBJnwub1bgM= @@ -204,6 +210,7 @@ github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edY github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmatcuk/doublestar/v2 v2.0.3/go.mod h1:QMmcs3H2AUQICWhfzLXz+IYln8lRQmTZRptLie8RgRw= github.com/bmatcuk/doublestar/v2 v2.0.4/go.mod h1:QMmcs3H2AUQICWhfzLXz+IYln8lRQmTZRptLie8RgRw= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= @@ -217,6 +224,9 @@ github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0Bsq github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/bxcodec/faker/v3 v3.7.0 h1:qWAFFwcyVS0ukF0UoJju1wBLO0cuPQ7JdVBPggM8kNo= github.com/bxcodec/faker/v3 v3.7.0/go.mod h1:gF31YgnMSMKgkvl+fyEo1xuSMbEuieyqfeslGYFjneM= +github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v3 v3.0.0 h1:ske+9nBpD9qZsTBoF41nW5L+AIuFBKMeze18XQ3eG1c= github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -235,6 +245,7 @@ github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAc github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= @@ -256,11 +267,14 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c h1:2zRrJWIt/f9c9HhNHAgrRgq0San5gRRUJTBXLkchal0= github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= +github.com/cockroachdb/cockroach-go v0.0.0-20190925194419-606b3d062051/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= +github.com/cockroachdb/cockroach-go v0.0.0-20200312223839-f565e4789405 h1:i1XXyBMAGL7NqogtoS6NHQ/IJwCbG0R725hAhEhldOI= +github.com/cockroachdb/cockroach-go v0.0.0-20200312223839-f565e4789405/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= github.com/cockroachdb/cockroach-go/v2 v2.2.10 h1:O7Hl8m0rs/oJNBmRr14ED3Q3+AmugMK9DtJwRDHZ2DA= github.com/cockroachdb/cockroach-go/v2 v2.2.10/go.mod h1:xZ2VHjUEb/cySv0scXBx7YsBnHtLHkR1+w/w73b5i3M= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= github.com/confluentinc/confluent-kafka-go v1.4.0/go.mod h1:u2zNLny2xq+5rWeTQjFHbDzzNuba4P1vo31r9r4uAdg= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= @@ -298,9 +312,12 @@ github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoT github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= github.com/containerd/containerd v1.5.7 h1:rQyoYtj4KddB3bxG6SAqd4+08gePNyJjRqvOIfV3rkM= github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= +github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= @@ -376,6 +393,7 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cucumber/godog v0.8.1/go.mod h1:vSh3r/lM+psC1BPXvdkSEuNjmXfpVqrMGYAElF6hxnA= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= @@ -408,6 +426,7 @@ github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v17.12.0-ce-rc1.0.20201201034508-7d75c1d40d88+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.9+incompatible h1:JlsVnETOjM2RLQa0Cc1XCIspUdXW3Zenq9P54uXBm6k= github.com/docker/docker v20.10.9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= @@ -502,6 +521,7 @@ github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjX github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE= github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-chi/chi v1.5.0/go.mod h1:REp24E+25iKvxgeTfHmdUoL5x15kBiDBlnIl5bCwe2k= @@ -646,6 +666,7 @@ github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8w github.com/go-redis/redis/v7 v7.1.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= github.com/go-redis/redis/v8 v8.0.0/go.mod h1:isLoQT/NFSP7V67lyvM9GmdvLdyZ7pEhsXvvyQtnQTo= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= @@ -659,19 +680,28 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg78 github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/attrs v0.1.0/go.mod h1:fmNpaWyHM0tRm8gCZWKx8yY9fvaNLo2PyzBNSrBZ5Hw= github.com/gobuffalo/attrs v1.0.1/go.mod h1:qGdnq2RukKtBl4ASJit0OFckc5XGSyTFk98SvRpMFrQ= github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY= github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs= github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4= +github.com/gobuffalo/buffalo-plugins v1.15.0/go.mod h1:BqSx01nwgKUQr/MArXzFkSD0QvdJidiky1OKgyfgrK8= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc= github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= +github.com/gobuffalo/envy v1.8.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= +github.com/gobuffalo/envy v1.9.0/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= github.com/gobuffalo/envy v1.10.1 h1:ppDLoXv2feQ5nus4IcgtyMdHQkKng2lhJCIm33cblM0= github.com/gobuffalo/envy v1.10.1/go.mod h1:AWx4++KnNOW3JOeEvhSaq+mvgAvnMYOY1XSIin4Mago= github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw= +github.com/gobuffalo/events v1.3.1/go.mod h1:9JOkQVoyRtailYVE/JJ2ZQ/6i4gTjM5t2HsZK4C1cSA= +github.com/gobuffalo/events v1.4.1/go.mod h1:SjXgWKpeSuvQDvGhgMz5IXx3Czu+IbL+XPLR41NvVQY= github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc= +github.com/gobuffalo/fizz v1.9.8/go.mod h1:w1FEn1yKNVCc49KnADGyYGRPH7jFON3ak4Bj1yUudHo= +github.com/gobuffalo/fizz v1.10.0/go.mod h1:J2XGPO0AfJ1zKw7+2BA+6FEGAkyEsdCOLvN93WCT2WI= github.com/gobuffalo/fizz v1.14.0 h1:hicZBYSwSWITXEDUR77tqrLU1/vScXHddd02IaFkkPI= github.com/gobuffalo/fizz v1.14.0/go.mod h1:0aF1kAZYCfKqbLM/lmZ3jXFyqqWE/kY/nIOKnNdAYXQ= github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= @@ -679,6 +709,9 @@ github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gobuffalo/flect v0.2.1/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= github.com/gobuffalo/flect v0.2.4/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= github.com/gobuffalo/flect v0.2.5 h1:H6vvsv2an0lalEaCDRThvtBfmg44W/QHXBCYUXf/6S4= github.com/gobuffalo/flect v0.2.5/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= @@ -689,15 +722,27 @@ github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/genny v0.2.0/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.3.0/go.mod h1:ywJ2CoXrTZj7rbS8HTbzv7uybnLKlsNSBhEQ+yFI3E8= +github.com/gobuffalo/genny v0.6.0/go.mod h1:Vigx9VDiNscYpa/LwrURqGXLSIbzTfapt9+K6gF1kTA= +github.com/gobuffalo/genny/v2 v2.0.5/go.mod h1:kRkJuAw9mdI37AiEYjV4Dl+TgkBDYf8HZVjLkqe5eBg= github.com/gobuffalo/genny/v2 v2.0.9/go.mod h1:R45scCyQfff2HysNJHNanjrpvPw4Qu+rM1MOMDBB5oU= github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I= github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY= +github.com/gobuffalo/github_flavored_markdown v1.0.7/go.mod h1:w93Pd9Lz6LvyQXEG6DktTPHkOtCbr+arAD5mkwMzXLI= +github.com/gobuffalo/github_flavored_markdown v1.1.0/go.mod h1:TSpTKWcRTI0+v7W3x8dkSKMLJSUpuVitlptCkpeY8ic= github.com/gobuffalo/github_flavored_markdown v1.1.1 h1:kUf8ginyBOTRXcKSTPsPAqlA25vQ80+xAspLIYaxmTU= github.com/gobuffalo/github_flavored_markdown v1.1.1/go.mod h1:yU32Pen+eorS58oxh/bNZx76zUOCJwmvyV5FBrvzOKQ= github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/gogen v0.2.0/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/helpers v0.2.2/go.mod h1:xYbzUdCUpVzLwLnqV8HIjT6hmG0Cs7YIBCJkNM597jw= +github.com/gobuffalo/helpers v0.2.4/go.mod h1:NX7v27yxPDOPTgUFYmJ5ow37EbxdoLraucOGvMNawyk= +github.com/gobuffalo/helpers v0.5.0/go.mod h1:stpgxJ2C7T99NLyAxGUnYMM2zAtBk5NKQR0SIbd05j4= +github.com/gobuffalo/helpers v0.6.0/go.mod h1:pncVrer7x/KRvnL5aJABLAuT/RhKRR9klL6dkUOhyv8= +github.com/gobuffalo/helpers v0.6.1/go.mod h1:wInbDi0vTJKZBviURTLRMFLE4+nF2uRuuL2fnlYo7w4= github.com/gobuffalo/helpers v0.6.4 h1:N9is8xgaotJzGIge1GoLYiWRpKZPqnS9RSty72OhIn8= github.com/gobuffalo/helpers v0.6.4/go.mod h1:m2aOKsTl3KB0RUwwpxf3tykaaitujQ3irivqrlNAcJ0= github.com/gobuffalo/here v0.6.0 h1:hYrd0a6gDmWxBM4TnrGw8mQg24iSVoIkHEk7FodQcBI= @@ -705,43 +750,77 @@ github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PL github.com/gobuffalo/httptest v1.0.2 h1:LWp2khlgA697h4BIYWW2aRxvB93jMnBrbakQ/r2KLzs= github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E= github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w= +github.com/gobuffalo/licenser v1.1.0/go.mod h1:ZVWE6uKUE3rGf7sedUHWVjNWrEgxaUQLVFL+pQiWpfY= github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= +github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= +github.com/gobuffalo/logger v1.0.3/go.mod h1:SoeejUwldiS7ZsyCBphOGURmWdwUFXs0J7TCjEhjKxM= github.com/gobuffalo/logger v1.0.6/go.mod h1:J31TBEHR1QLV2683OXTAItYIg8pv2JMHnF/quuAbMjs= github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw= github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.1.0/go.mod h1:pqQ1XAqvpy/JYtRwoieNps2yU8MFiMxBUpAm2FBtQ50= +github.com/gobuffalo/mapi v1.2.1/go.mod h1:giGJ2AUESRepOFYAzWpq8Gf/s/QDryxoEHisQtFN3cY= +github.com/gobuffalo/meta v0.0.0-20190329152330-e161e8a93e3b/go.mod h1:mCRSy5F47tjK8yaIDcJad4oe9fXxY5gLrx3Xx2spK+0= +github.com/gobuffalo/meta v0.3.0/go.mod h1:cpr6mrUX5H/B4wEP86Gdq568TK4+dKUD8oRPl698RUw= +github.com/gobuffalo/nulls v0.2.0/go.mod h1:w4q8RoSCEt87Q0K0sRIZWYeIxkxog5mh3eN3C/n+dUc= +github.com/gobuffalo/nulls v0.3.0/go.mod h1:UP49vd/k+bcaz6m0cHMyuk8oQ7XgLnkfxeiVoPAvBSs= github.com/gobuffalo/nulls v0.4.1 h1:k7QVCJfMplv9VRQQLb4N1d8tXUdGvcdMNfp4BfMnG2M= github.com/gobuffalo/nulls v0.4.1/go.mod h1:pp8e1hWTRJZFpMl4fj/CVbSMlaxjeGKkFq4RuBZi3w8= github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.2.0/go.mod h1:k2CkHP3bjbqL2GwxwhxUy1DgnlbW644hkLC9iIUvZwY= github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= +github.com/gobuffalo/packd v1.0.0/go.mod h1:6VTc4htmJRFB7u1m/4LeMTWjFoYrUiBkU9Fdec9hrhI= github.com/gobuffalo/packd v1.0.1/go.mod h1:PP2POP3p3RXGz7Jh6eYEf93S7vA2za6xM7QT85L4+VY= github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/packr/v2 v2.4.0/go.mod h1:ra341gygw9/61nSjAbfwcwh8IrYL4WmR4IsPkPBhQiY= github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= -github.com/gobuffalo/plush v3.7.16+incompatible h1:nonpy24axg04np13bYi0zNu3gr812cXKJDNLSkKcEwk= +github.com/gobuffalo/packr/v2 v2.5.2/go.mod h1:sgEE1xNZ6G0FNN5xn9pevVu4nywaxHvgup67xisti08= +github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= +github.com/gobuffalo/packr/v2 v2.8.0/go.mod h1:PDk2k3vGevNE3SwVyVRgQCCXETC9SaONCNSXT1Q8M1g= github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= +github.com/gobuffalo/plush v3.8.2+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= +github.com/gobuffalo/plush v3.8.3+incompatible h1:kzvUTnFPhwyfPEsx7U7LI05/IIslZVGnAlMA1heWub8= +github.com/gobuffalo/plush v3.8.3+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= +github.com/gobuffalo/plush/v4 v4.0.0/go.mod h1:ErFS3UxKqEb8fpFJT7lYErfN/Nw6vHGiDMTjxpk5bQ0= github.com/gobuffalo/plush/v4 v4.1.9/go.mod h1:9OOII9uAM5pZnhWu1OkQnboXJjaWMQ7kcTl3zNcxvTM= github.com/gobuffalo/plush/v4 v4.1.11 h1:IOLBE07W0VkiraJf36x547l3q5Ek3osP9vHzN48wAh0= github.com/gobuffalo/plush/v4 v4.1.11/go.mod h1:9OOII9uAM5pZnhWu1OkQnboXJjaWMQ7kcTl3zNcxvTM= -github.com/gobuffalo/pop v4.8.2+incompatible h1:/nP7hiu5arwMWzHBUZY5BmEKq6XcdjnceNCTZGe7uO0= +github.com/gobuffalo/plushgen v0.1.2/go.mod h1:3U71v6HWZpVER1nInTXeAwdoRNsRd4W8aeIa1Lyp+Bk= github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= +github.com/gobuffalo/pop v4.13.1+incompatible h1:AhbqPxNOBN/DBb2DBaiBqzOXIBQXxEYzngHHJ+ytP4g= +github.com/gobuffalo/pop v4.13.1+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= +github.com/gobuffalo/pop/v5 v5.0.11/go.mod h1:mZJHJbA3cy2V18abXYuVop2ldEJ8UZ2DK6qOekC5u5g= +github.com/gobuffalo/pop/v5 v5.3.1/go.mod h1:vcEDhh6cJ3WVENqJDFt/6z7zNb7lLnlN8vj3n5G9rYA= github.com/gobuffalo/pop/v6 v6.0.4-0.20220524160009-195240e4a669 h1:IVk9uuVEVLRo1VrNsj/A6eBMDs3xdAdZNPUhJqFybck= github.com/gobuffalo/pop/v6 v6.0.4-0.20220524160009-195240e4a669/go.mod h1:dFcrMNPOwk+sl1Oa0lOb/jGbmjv+JV+5CZjMWNYR3KI= github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= +github.com/gobuffalo/release v1.7.0/go.mod h1:xH2NjAueVSY89XgC4qx24ojEQ4zQ9XCGVs5eXwJTkEs= github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA= +github.com/gobuffalo/shoulders v1.0.4/go.mod h1:LqMcHhKRuBPMAYElqOe3POHiZ1x7Ry0BE8ZZ84Bx+k4= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/tags v2.0.11+incompatible h1:zLkaontB8lWefU+DX38mzPLRKFGTJL8FKb9JnKMt0Z0= +github.com/gobuffalo/syncx v0.1.0/go.mod h1:Mg/s+5pv7IgxEp6sA+NFpqS4o2x+R9dQNwbwT0iuOGQ= github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= +github.com/gobuffalo/tags v2.1.0+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= +github.com/gobuffalo/tags v2.1.7+incompatible h1:GUxxh34f9SI4U0Pj3ZqvopO9SlzuqSf+g4ZGSPSszt4= +github.com/gobuffalo/tags v2.1.7+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= +github.com/gobuffalo/tags/v3 v3.0.2/go.mod h1:ZQeN6TCTiwAFnS0dNcbDtSgZDwNKSpqajvVtt6mlYpA= +github.com/gobuffalo/tags/v3 v3.1.0/go.mod h1:ZQeN6TCTiwAFnS0dNcbDtSgZDwNKSpqajvVtt6mlYpA= github.com/gobuffalo/tags/v3 v3.1.2 h1:68sHcwFFDstXyfbk5ovbGcQFDsupgVLs+lw1XZinHJw= github.com/gobuffalo/tags/v3 v3.1.2/go.mod h1:o3ldUfKv50jxWAC8eZHXMm8dnKW3YvyZUMr0xqUcZTI= github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/validate v2.0.3+incompatible h1:6f4JCEz11Zi6iIlexMv7Jz10RBPvgI795AOaubtCwTE= +github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= +github.com/gobuffalo/validate v2.0.4+incompatible h1:ZTxozrIw8qQ5nfhShmc4izjYPTsPhfdXTdhXOd5OS9o= +github.com/gobuffalo/validate v2.0.4+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= +github.com/gobuffalo/validate/v3 v3.0.0/go.mod h1:HFpjq+AIiA2RHoQnQVTFKF/ZpUPXwyw82LgyDPxQ9r0= +github.com/gobuffalo/validate/v3 v3.1.0/go.mod h1:HFpjq+AIiA2RHoQnQVTFKF/ZpUPXwyw82LgyDPxQ9r0= +github.com/gobuffalo/validate/v3 v3.2.0/go.mod h1:PrhDOdDHxtN8KUgMvF3TDL0r1YZXV4sQnyFX/EmeETY= github.com/gobuffalo/validate/v3 v3.3.1 h1:5YLQL22YARUsYS5ZGsPU6TrD0Utiu53N1JJ5qi+foYk= github.com/gobuffalo/validate/v3 v3.3.1/go.mod h1:Ehu8ieNJQuUM4peDDr/0VapzdGA7RgTc3wbe51vHfS0= github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc= @@ -766,6 +845,7 @@ github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gofrs/uuid v4.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid/v3 v3.1.2/go.mod h1:xPwMqoocQ1L5G6pXX5BcE7N5jlzn2o19oqAKxwZW/kI= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= @@ -774,6 +854,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= 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= +github.com/golang/gddo v0.0.0-20180828051604-96d2a289f41e/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4= +github.com/golang/gddo v0.0.0-20190904175337-72a348e765d2/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= @@ -835,6 +917,7 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-jsonnet v0.16.0/go.mod h1:sOcuej3UW1vpPTZOr8L7RQimqai1a57bt5j22LzGZCw= github.com/google/go-jsonnet v0.17.0/go.mod h1:sOcuej3UW1vpPTZOr8L7RQimqai1a57bt5j22LzGZCw= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -865,6 +948,7 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -887,6 +971,7 @@ github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.5.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= @@ -903,6 +988,8 @@ github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gotestyourself/gotestyourself v1.3.0/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -999,6 +1086,7 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inhies/go-bytesize v0.0.0-20201103132853-d0aed0d254f8/go.mod h1:KrtyD5PFj++GKkFS/7/RRrfnRhAMGQwy75GLCHWrCNs= github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743 h1:X3Xxno5Ji8idrNiUoFc7QyXpqhSYlDRYQmc7mlpMBzU= github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743/go.mod h1:KrtyD5PFj++GKkFS/7/RRrfnRhAMGQwy75GLCHWrCNs= github.com/instana/go-sensor v1.41.1 h1:duCCYLzwVRjgptqwc0doWfJb1oT6w1CzTRQDRNrQ6zw= @@ -1015,9 +1103,11 @@ github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80s github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= +github.com/jackc/pgconn v1.3.2/go.mod h1:LvCquS3HbBKwgl7KbX9KyqEIumJAbm1UMcTvGaIf3bM= github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= +github.com/jackc/pgconn v1.6.0/go.mod h1:yeseQo4xhQbgyJs2c87RAXOH2i624N0Fh1KSPJya7qo= github.com/jackc/pgconn v1.6.4/go.mod h1:w2pne1C2tZgP+TvjqLpOigGzNqjBgQW9dUw/4Chex78= github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= @@ -1055,6 +1145,7 @@ github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01C github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= +github.com/jackc/pgtype v1.3.0/go.mod h1:b0JqxHvPmljG+HQ5IsvQ0yqeSi4nGcDTVjFoiLDb0Ik= github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= github.com/jackc/pgtype v1.4.2/go.mod h1:JCULISAZBFGrHaOXIIFiyfzW5VY0GRitRr8NeJsrdig= @@ -1063,12 +1154,15 @@ github.com/jackc/pgtype v1.8.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76I github.com/jackc/pgtype v1.9.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgtype v1.11.0 h1:u4uiGPz/1hryuXzyaBhSk6dnIyyG2683olG2OV+UUgs= github.com/jackc/pgtype v1.11.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= -github.com/jackc/pgx v3.2.0+incompatible h1:0Vihzu20St42/UDsvZGdNE6jak7oi/UOeMzwMPHkgFY= github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= +github.com/jackc/pgx v3.6.2+incompatible h1:2zP5OD7kiyR3xzRYMhOcXVvkDZsImVXfj+yIyTQf3/o= +github.com/jackc/pgx v3.6.2+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= +github.com/jackc/pgx/v4 v4.4.1/go.mod h1:6iSW+JznC0YT+SgBn7rNxoEBsBgSmnC5FwyCekOGUiE= github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= +github.com/jackc/pgx/v4 v4.6.0/go.mod h1:vPh43ZzxijXUVJ+t/EmXBtFmbFVO72cuneCT9oAlxAg= github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= github.com/jackc/pgx/v4 v4.8.1/go.mod h1:4HOLxrl8wToZJReD04/yB20GDwf4KBYETvlHciCnwW0= @@ -1085,6 +1179,7 @@ github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.2.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jandelgado/gcov2lcov v1.0.4-0.20210120124023-b83752c6dc08/go.mod h1:NnSxK6TMlg1oGDBfGelGbjgorT5/L3cchlbtgFYZSss= github.com/jandelgado/gcov2lcov v1.0.4/go.mod h1:NnSxK6TMlg1oGDBfGelGbjgorT5/L3cchlbtgFYZSss= github.com/jandelgado/gcov2lcov v1.0.5 h1:rkBt40h0CVK4oCb8Dps950gvfd1rYvQ8+cWa346lVU0= github.com/jandelgado/gcov2lcov v1.0.5/go.mod h1:NnSxK6TMlg1oGDBfGelGbjgorT5/L3cchlbtgFYZSss= @@ -1144,7 +1239,11 @@ github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/karrick/godirwalk v1.10.9/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/karrick/godirwalk v1.15.3/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= +github.com/karrick/godirwalk v1.15.5/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= +github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -1157,6 +1256,7 @@ github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8 github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.14.2/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/knadh/koanf v0.14.1-0.20201201075439-e0853799f9ec/go.mod h1:H5mEFsTeWizwFXHKtsITL5ipsLTuAMQoGuQpp+1JL9U= github.com/knadh/koanf v1.4.0 h1:/k0Bh49SqLyLNfte9r6cvuZWrApOQhglOmhIU3L/zDw= github.com/knadh/koanf v1.4.0/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -1193,6 +1293,8 @@ github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/looplab/fsm v0.1.0 h1:Qte7Zdn/5hBNbXzP7yxVU4OIFHWXBovyTT2LaBTyC20= github.com/looplab/fsm v0.1.0/go.mod h1:m2VaOfDHxqXBBMgc26m6yUOwkFn8H2AlJDE+jd/uafI= +github.com/luna-duclos/instrumentedsql v0.0.0-20181127104832-b7d587d28109/go.mod h1:PWUIzhtavmOR965zfawVsHXbEuU1G29BPZ/CB3C7jXk= +github.com/luna-duclos/instrumentedsql v1.1.2/go.mod h1:4LGbEqDnopzNAiyxPPDXhLspyunZxgPTMJBKtC6U0BQ= github.com/luna-duclos/instrumentedsql v1.1.3 h1:t7mvC0z1jUt5A0UQ6I/0H31ryymuQRnJcWCiqV3lSAA= github.com/luna-duclos/instrumentedsql v1.1.3/go.mod h1:9J1njvFds+zN7y85EDhN9XNQLANWwZt2ULeIC8yMNYs= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= @@ -1216,6 +1318,8 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= +github.com/markbates/deplist v1.1.3/go.mod h1:BF7ioVzAJYEtzQN/os4rt8H8Ti3h0T7EoN+7eyALktE= +github.com/markbates/errx v1.1.0/go.mod h1:PLa46Oex9KNbVDZhKel8v1OT7hD5JZ2eI7AHhA0wswc= github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c= github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs= github.com/markbates/hmax v1.0.0 h1:yo2N0gBoCnUMKhV/VRLHomT6Y9wUm+oQQENuWJqCdlM= @@ -1260,6 +1364,7 @@ github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-sqlite3 v1.14.13 h1:1tj15ngiFfcZzii7yd82foL+ks+ouQcj8j/TPq3fk1I= github.com/mattn/go-sqlite3 v1.14.13/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/mattn/goveralls v0.0.6/go.mod h1:h8b4ow6FxSPMQHF6o2ve3qsclnffZjYTNEKmLesRwqw= github.com/mattn/goveralls v0.0.11 h1:eJXea6R6IFlL1QMKNMzDvvHv/hwGrnvyig4N+0+XiMM= github.com/mattn/goveralls v0.0.11/go.mod h1:gU8SyhNswsJKchEV93xRQxX6X3Ei4PJdQk/6ZHvrvRk= @@ -1267,6 +1372,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= +github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/microcosm-cc/bluemonday v1.0.16 h1:kHmAq2t7WPWLjiGvzKa5o3HzSfahUKiOq7fAPUiMNIc= github.com/microcosm-cc/bluemonday v1.0.16/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -1294,6 +1400,7 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -1312,6 +1419,7 @@ github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2J github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1353,6 +1461,8 @@ github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.9.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -1366,6 +1476,8 @@ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGV github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.6.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -1403,35 +1515,57 @@ github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xA github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.4.0 h1:CtfRrOVZtbDj8rt1WXjklw0kqqJQwICrCKmlfUuBUUw= github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= +github.com/ory/analytics-go/v4 v4.0.0/go.mod h1:FMx9cLRD9xN+XevPvZ5FDMfignpmcqPP6FUKnJ9/MmE= github.com/ory/analytics-go/v4 v4.0.3 h1:2zNBQLlm3UiD8U7DdUGLLUBm62ZA5GtbEJ3S5U+xEOI= github.com/ory/analytics-go/v4 v4.0.3/go.mod h1:A3Chm/3TmM8jw4nqRss+gFhAYHRI5j/HFYH3C1FRahU= +github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/ory/dockertest/v3 v3.5.4/go.mod h1:J8ZUbNB2FOhm1cFZW9xBpDsODqsSWcyYgtJYVPcnF70= +github.com/ory/dockertest/v3 v3.6.3/go.mod h1:EFLcVUOl8qCwp9NyDAcCDtq/QviLtYswW/VbWzUnTNE= github.com/ory/dockertest/v3 v3.9.0 h1:U7M9FfYEwF4uqEE6WUSFs7K+Hvb31CsCX5uZUZD3olI= github.com/ory/dockertest/v3 v3.9.0/go.mod h1:jgm0rnguArPXsVduy+oUjzFtD0Na+DDNbUl8W5v+ez8= github.com/ory/fosite v0.42.3-0.20220513181618-5f156bd07d5d h1:+6pj38oTZ72Pt9TIOXbmZvVq3R44nhf1g0fJsZhDOx8= github.com/ory/fosite v0.42.3-0.20220513181618-5f156bd07d5d/go.mod h1:UZqP9A6ust3zwOe6pp5yfX2V1+FhZlnsEqDGdPvM4Os= +github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90/go.mod h1:sxnvPCxChFuSmTJGj8FdMupeq1BezCiEpDjTUXQ4hf4= github.com/ory/go-acc v0.2.6/go.mod h1:4Kb/UnPcT8qRAk3IAxta+hvVapdxTLWtrr7bFLlEgpw= github.com/ory/go-acc v0.2.8 h1:rOHHAPQjf0u7eHFGWpiXK+gIu/e0GRSJNr9pDukdNC4= github.com/ory/go-acc v0.2.8/go.mod h1:iCRZUdGb/7nqvSn8xWZkhfVrtXRZ9Wru2E5rabCjFPI= github.com/ory/go-convenience v0.1.0 h1:zouLKfF2GoSGnJwGq+PE/nJAE6dj2Zj5QlTgmMTsTS8= github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8TWB0yn9KNs= +github.com/ory/gojsonreference v0.0.0-20190720135523-6b606c2d8ee8/go.mod h1:wsH1C4nIeeQClDtD5AH7kF1uTS6zWyqfjVDTmB0Em7A= +github.com/ory/gojsonschema v1.1.1-0.20190919112458-f254ca73d5e9/go.mod h1:BNZpdJgB74KOLSsWFvzw6roXg1I6O51WO8roMmW+T7Y= github.com/ory/graceful v0.1.1 h1:zx+8tDObLPrG+7Tc8jKYlXsqWnLtOQA1IZ/FAAKHMXU= github.com/ory/graceful v0.1.1/go.mod h1:zqu70l95WrKHF4AZ6tXHvAqAvpY6M7g6ttaAVcMm7KU= +github.com/ory/herodot v0.6.2/go.mod h1:3BOneqcyBsVybCPAJoi92KN2BpJHcmDqAMcAAaJiJow= +github.com/ory/herodot v0.7.0/go.mod h1:YXKOfAXYdQojDP5sD8m0ajowq3+QXNdtxA+QiUXBwn0= +github.com/ory/herodot v0.8.3/go.mod h1:rvLjxOAlU5omtmgjCfazQX2N82EpMfl3BytBWc1jjsk= +github.com/ory/herodot v0.9.2/go.mod h1:Da2HXR8mpwPbPrH+Gv9qV8mM5gI3v+PoJ69BA4l2RAk= github.com/ory/herodot v0.9.13 h1:cN/Z4eOkErl/9W7hDIDLb79IO/bfsH+8yscBjRpB4IU= github.com/ory/herodot v0.9.13/go.mod h1:IWDs9kSvFQqw/cQ8zi5ksyYvITiUU4dI7glUrhZcJYo= +github.com/ory/jsonschema/v3 v3.0.1/go.mod h1:jgLHekkFk0uiGdEWGleC+tOm6JSSP8cbf17PnBuGXlw= github.com/ory/jsonschema/v3 v3.0.7 h1:GQ9qfZDiJqs4l2d3p56dozCChvejQFZyLKGHYzDzOSo= github.com/ory/jsonschema/v3 v3.0.7/go.mod h1:g8c8YOtN4TrR2wYeMdT02GDmzJDI0fEW2nI26BECafY= +github.com/ory/viper v1.5.6/go.mod h1:TYmpFpKLxjQwvT4f0QPpkOn4sDXU1kDgAwJpgLYiQ28= +github.com/ory/viper v1.7.4/go.mod h1:T6sodNZKNGPpashUOk7EtXz2isovz8oCd57GNVkkNmE= github.com/ory/viper v1.7.5 h1:+xVdq7SU3e1vNaCsk/ixsfxE4zylk1TJUiJrY647jUE= github.com/ory/viper v1.7.5/go.mod h1:ypOuyJmEUb3oENywQZRgeAMwqgOyDqwboO1tj3DjTaM= -github.com/ory/x v0.0.413 h1:9yPuWHevnFSkVISYbNySqbykyTM1mA9u/90ZgRFQxbY= -github.com/ory/x v0.0.413/go.mod h1:Rchv+ANloKAhmN3LZ5KUIAU2TIRlHPF7EYEB2i3xL0Q= +github.com/ory/x v0.0.84/go.mod h1:RXLPBG7B+hAViONVg0sHwK+U/ie1Y/NeXrq1JcARfoE= +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.214/go.mod h1:aRl57gzyD4GF0HQCekovXhv0xTZgAgiht3o8eVhsm9Q= +github.com/ory/x v0.0.415 h1:er86z/KGP8mHxsepoDh3XxpI7wXZstwApIzcWhzoPMw= +github.com/ory/x v0.0.415/go.mod h1:Rchv+ANloKAhmN3LZ5KUIAU2TIRlHPF7EYEB2i3xL0Q= github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -1440,6 +1574,7 @@ github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= @@ -1449,6 +1584,7 @@ github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= @@ -1525,6 +1661,8 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/rhnvrm/simples3 v0.5.0/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -1532,14 +1670,19 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.0 h1:P2KMzcFwrPoSjkF1WLRPsp3UMLyql8L4v9hQpVeK5so= github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= +github.com/rubenv/sql-migrate v0.0.0-20190212093014-1007f53448d7/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1552,15 +1695,19 @@ github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiB github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= github.com/santhosh-tekuri/jsonschema v1.2.4 h1:hNhW8e7t+H1vgY+1QeEQpveR6D4+OwKPXCfD2aieJis= github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= +github.com/santhosh-tekuri/jsonschema/v2 v2.1.0/go.mod h1:yzJzKUGV4RbWqWIBBP4wSOBqavX5saE02yirLS0OTyg= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sawadashota/encrypta v0.0.2 h1:R46/RxYmYdxI3VOt63B637OVBHzu+fazPyLo5CqK6QE= github.com/sawadashota/encrypta v0.0.2/go.mod h1:pcPebEvF012kXmZXvfVzwFEr/GUE/ZntaR805jk0nsE= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seatgeek/logrus-gelf-formatter v0.0.0-20210219220335-367fa274be2c/go.mod h1:/THDZYi7F/BsVEcYzYPqdcWFQ+1C2InkawTKfLOAnzg= github.com/seatgeek/logrus-gelf-formatter v0.0.0-20210414080842-5b05eb8ff761 h1:0b8DF5kR0PhRoRXDiEEdzrgBc8UqVY4JWLkQJCRsLME= github.com/seatgeek/logrus-gelf-formatter v0.0.0-20210414080842-5b05eb8ff761/go.mod h1:/THDZYi7F/BsVEcYzYPqdcWFQ+1C2InkawTKfLOAnzg= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/segmentio/analytics-go v3.0.1+incompatible/go.mod h1:C7CYBtQWk4vRk2RyLu0qOcbHJ18E3F1HV2C/8JvKN48= github.com/segmentio/analytics-go v3.1.0+incompatible/go.mod h1:C7CYBtQWk4vRk2RyLu0qOcbHJ18E3F1HV2C/8JvKN48= +github.com/segmentio/backo-go v0.0.0-20160424052352-204274ad699c/go.mod h1:kJ9mm9YmoWSkk+oQ+5Cj8DEoRCX2JT6As4kEtIIOp1M= github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3 h1:ZuhckGJ10ulaKkdvJtiAqsLTiPrLaXSdnVgXJKJkTxE= github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3/go.mod h1:9/Rh6yILuLysoQnZ2oNooD2g7aBnvM7r/fNVxRNWfBc= github.com/segmentio/conf v1.2.0/go.mod h1:Y3B9O/PqqWqjyxyWWseyj/quPEtMu1zDp/kVbSWWaB0= @@ -1591,6 +1738,7 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= @@ -1624,6 +1772,8 @@ github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155 github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v0.0.7/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= @@ -1646,6 +1796,7 @@ github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5q github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.10.0 h1:mXH0UwHS4D2HwWZa75im4xIQynLfblmWV7qcWpfv0yk= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= +github.com/sqs/goreturns v0.0.0-20181028201513-538ac6014518/go.mod h1:CKI4AZ4XmGV240rTHfO0hfE83S6/a3/Q1siZJ/vXf7A= github.com/square/go-jose/v3 v3.0.0-20200630053402-0a67ce9b0693/go.mod h1:6hSY48PjDm4UObWmGLyJE9DxYVKTgR9kbCspXXJEhcU= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1664,6 +1815,7 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.1.1/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= @@ -1677,21 +1829,27 @@ github.com/thales-e-security/pool v0.0.2/go.mod h1:qtpMm2+thHtqhLzTwgDBj/OuNnMpu github.com/tidwall/btree v0.3.0/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8= github.com/tidwall/btree v1.1.0/go.mod h1:TzIRzen6yHbibdSfK6t8QimqbUnoxUSrZfeW7Uob0q4= github.com/tidwall/buntdb v1.2.0/go.mod h1:XLza/dhlwzO6dc5o/KWor4kfZSt3BP8QV+77ZMKfI58= +github.com/tidwall/gjson v1.3.2/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= github.com/tidwall/gjson v1.6.8/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= +github.com/tidwall/gjson v1.7.1/go.mod h1:5/xDoumyyDNerp2U36lyolv46b3uF/9Bu6OfyQ9GImk= github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.0 h1:6aeJ0bzojgWLa82gDQHcx3S0Lr/O51I9bJ5nv6JFx5w= github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/grect v0.1.0/go.mod h1:sa5O42oP6jWfTShL9ka6Sgmg3TgIK649veZe05B7+J8= github.com/tidwall/grect v0.1.4/go.mod h1:9FBsaYRaR0Tcy4UwefBX/UDcDcDy9V5jUcxHzv2jd5Q= +github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/pretty v1.1.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/rtred v0.1.2/go.mod h1:hd69WNXQ5RP9vHd7dqekAz+RIdtfBogmglkZSRxCHFQ= +github.com/tidwall/sjson v1.0.4/go.mod h1:bURseu1nuBkFpIES5cz6zBtjmYeOQmEESshn7VpF15Y= +github.com/tidwall/sjson v1.1.5/go.mod h1:VuJzsZnTowhSxWdOgsAnb886i4AjEyTkk7tNtsL7EYE= github.com/tidwall/sjson v1.2.4 h1:cuiLzLnaMeBhRmEv00Lpk3tkYrcxpmbU81tAY4Dw0tc= github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= github.com/tidwall/tinyqueue v0.1.1/go.mod h1:O/QNHwrnjqr6IHItYrzoHAKYhBkLI67Q096fQP5zMYw= @@ -1708,8 +1866,13 @@ github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9r github.com/toqueteos/webbrowser v1.2.0/go.mod h1:XWoZq4cyp9WeUeak7w7LXRUQf1F1ATJMir8RTqb4ayM= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchtv/twirp v8.1.1+incompatible/go.mod h1:RRJoFSAmTEh2weEqWtpPE3vFK5YBhA6bqp2l1kfCC5A= +github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= +github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v1.5.0/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= @@ -1776,12 +1939,17 @@ github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPS github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/zenazn/goji v1.0.1/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= +go.elastic.co/apm v1.8.0/go.mod h1:tCw6CkOJgkWnzEthFN9HUP1uL3Gjc/Ur6m7gRPLaoH0= go.elastic.co/apm v1.15.0 h1:uPk2g/whK7c7XiZyz/YCUnAUBNPiyNeE3ARX3G6Gx7Q= go.elastic.co/apm v1.15.0/go.mod h1:dylGv2HKR0tiCV+wliJz1KHtDyuD8SPe69oV7VyK6WY= +go.elastic.co/apm/module/apmhttp v1.8.0/go.mod h1:9LPFlEON51/lRbnWDfqAWErihIiAFDUMfMV27YjoWQ8= go.elastic.co/apm/module/apmhttp v1.15.0 h1:Le/DhI0Cqpr9wG/NIGOkbz7+rOMqJrfE4MRG6q/+leU= go.elastic.co/apm/module/apmhttp v1.15.0/go.mod h1:NruY6Jq8ALLzWUVUQ7t4wIzn+onKoiP5woJJdTV7GMg= +go.elastic.co/apm/module/apmot v1.8.0/go.mod h1:Q5Xzabte8G/fkvDjr1jlDuOSUt9hkVWNZEHh6ZNaTjI= go.elastic.co/apm/module/apmot v1.15.0 h1:yqarZ4HCIb6dLAzEVSWdppAuRhfrCfm2Z6UL+ubai2A= go.elastic.co/apm/module/apmot v1.15.0/go.mod h1:BjFz2KOlnjXdnSo0p6nhDDaIEYYX8c6uVHwvkZiLqtQ= +go.elastic.co/fastjson v1.0.0/go.mod h1:PmeUOMMtLHQr9ZS9J9owrAVg0FkaZDRZJEFTTGHtchs= go.elastic.co/fastjson v1.1.0 h1:3MrGBWWVIxe/xvsbpghtkFoPciPhOCmjsR/HfwEeQR4= go.elastic.co/fastjson v1.1.0/go.mod h1:boNGISWMjQsUPy/t6yqt2/1Wx4YNPSe+mZjlyw9vKKI= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -1803,11 +1971,15 @@ go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.18.0 h1:uqBh0brileIvG6luvBjdxzoFL8lxDGuhxJWsvK3BveI= +go.opentelemetry.io/contrib v0.18.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.18.0/go.mod h1:iK1G0FgHurSJ/aYLg5LpnPI0pqdanM73S3dhyDp0Lk4= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.25.0/go.mod h1:0MPbX5HgESa5d3UZXbz8pmKoWVrCZwt1N6JmmY206IQ= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.32.0 h1:b4wYdYXQVQsRbA/ch5rrLK5WxlxKr1kZimHwUgKVb4s= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.32.0/go.mod h1:97B1n1oku3Ki3C5QcyYFRgm4xN4le52NNcB3d8ILHLw= @@ -1824,6 +1996,7 @@ go.opentelemetry.io/contrib/samplers/jaegerremote v0.0.0-20220314184135-32895002 go.opentelemetry.io/contrib/samplers/jaegerremote v0.2.0 h1:cCx0XYB81bbpBYun60UcEblI8r0ias16lN2lfNxM4Zc= go.opentelemetry.io/contrib/samplers/jaegerremote v0.2.0/go.mod h1:msYRukz0g638uAB+ZPcloG2G/ffP0mKQLFtA7Dv7abA= go.opentelemetry.io/otel v0.11.0/go.mod h1:G8UCk+KooF2HLkgo8RHX9epABH/aRGYET7gQOqBVdB0= +go.opentelemetry.io/otel v0.18.0/go.mod h1:PT5zQj4lTsR1YeARt8YNKcFb88/c2IKoSABK9mX0r78= go.opentelemetry.io/otel v1.0.1/go.mod h1:OPEOD4jIT2SlZPMmwT6FqZz2C0ZNdQqiWcoK6M0SNFU= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= @@ -1848,14 +2021,17 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.7.0/go.mod h1 go.opentelemetry.io/otel/exporters/zipkin v1.7.0 h1:X0FZj+kaIdLi29UiyrEGDhRTYsEXj9GdEW5Y39UQFEE= go.opentelemetry.io/otel/exporters/zipkin v1.7.0/go.mod h1:9YBXeOMFLQGwNEjsxMRiWPGoJX83usGMhbCmxUbNe5I= go.opentelemetry.io/otel/internal/metric v0.27.0/go.mod h1:n1CVxRqKqYZtqyTh9U/onvKapPGv7y/rpyOTI+LFNzw= +go.opentelemetry.io/otel/metric v0.18.0/go.mod h1:kEH2QtzAyBy3xDVQfGZKIcok4ZZFvd5xyKPfPcuK6pE= go.opentelemetry.io/otel/metric v0.27.0/go.mod h1:raXDJ7uP2/Jc0nVZWQjJtzoyssOYWu/+pjZqRzfvZ7g= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= go.opentelemetry.io/otel/metric v0.30.0/go.mod h1:/ShZ7+TS4dHzDFmfi1kSXMhMVubNoP0oIaBp70J6UXU= +go.opentelemetry.io/otel/oteltest v0.18.0/go.mod h1:NyierCU3/G8DLTva7KRzGii2fdxdR89zXKH1bNWY7Bo= go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= go.opentelemetry.io/otel/sdk v1.5.0/go.mod h1:CU4J1v+7iEljnm1G14QjdFWOXUyYLHVh0Lh+/BTYyFg= go.opentelemetry.io/otel/sdk v1.6.3/go.mod h1:A4iWF7HTXa+GWL/AaqESz28VuSBIcZ+0CV+IzJ5NMiQ= go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1B0= go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU= +go.opentelemetry.io/otel/trace v0.18.0/go.mod h1:FzdUu3BPwZSZebfQ1vl5/tAa8LyMLXSJN57AXIt/iDk= go.opentelemetry.io/otel/trace v1.0.1/go.mod h1:5g4i4fKLaX2BQpSBsxw8YYcgKpMMSW3x7ZTuYBr3sUk= go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE= go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= @@ -1870,6 +2046,7 @@ go.opentelemetry.io/proto/otlp v0.16.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -1885,6 +2062,7 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180830192347-182538f80094/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1912,7 +2090,10 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1938,6 +2119,7 @@ golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= @@ -2020,10 +2202,12 @@ golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191003171128-d98b1b443823/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200219183655-46282727080f/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -2100,6 +2284,7 @@ golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180831094639-fa5fdf94c789/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2147,6 +2332,7 @@ golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191105231009-c1f44814a5cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2156,6 +2342,7 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200121082415-34d275377bf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2285,17 +2472,21 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190613204242-ed0dc450797f/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624190245-7f2218787638/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190711191110-9a621aea19f8/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -2306,17 +2497,21 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191224055732-dd894d0a8a40/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200203215610-ab391d50b528/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200308013534-11ec41452d41/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -2359,10 +2554,13 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.6.2/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/netlib v0.0.0-20191229114700-bbb4dff026f8/go.mod h1:2IgXn/sJaRbePPBA1wRj8OE+QLvVaH0q8SK6TSTKlnk= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +gonum.org/v1/plot v0.0.0-20200111075622-4abb28f724d5/go.mod h1:+HbaZVpsa73UwN7kXGCECULRHovLRJjH+t5cFPgxErs= gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= gonum.org/v1/plot v0.10.0/go.mod h1:JWIHJ7U20drSQb/aDpTetJzfC1KlAPldJLpkSy88dvQ= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -2416,6 +2614,8 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190626174449-989357319d63/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190708153700-3bdd9d9f5532/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -2544,6 +2744,7 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/DataDog/dd-trace-go.v1 v1.27.0/go.mod h1:Sp1lku8WJMvNV0kjDI4Ni/T7J/U3BO5ct5kEaoVU8+I= gopkg.in/DataDog/dd-trace-go.v1 v1.38.0 h1:vm/mYIZCEp5j2MoKPmwM3t6EGthxpvVbCOm2hRl5uDc= gopkg.in/DataDog/dd-trace-go.v1 v1.38.0/go.mod h1:GBhK4yaMJ1h329ivtKAqRNe1EZ944UnZwtz5lh7CnJc= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= @@ -2565,9 +2766,11 @@ gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8 gopkg.in/go-playground/mold.v2 v2.2.0/go.mod h1:XMyyRsGtakkDPbxXbrA5VODo6bUXyvoDjLd5l3T0XoA= gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= +gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.55.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -2664,6 +2867,11 @@ k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ= +modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= +modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= +modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= +modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= +modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/internal/fosite_store.go b/internal/fosite_store.go index aa21bc06bc8..f820762bd9c 100644 --- a/internal/fosite_store.go +++ b/internal/fosite_store.go @@ -10,20 +10,20 @@ import ( func AddFositeExamples(r driver.Registry) { for _, c := range []client.Client{ { - OutfacingID: "my-client", - Secret: "foobar", - RedirectURIs: []string{"http://localhost:3846/callback"}, - ResponseTypes: []string{"id_token", "code", "token"}, - GrantTypes: []string{"implicit", "refresh_token", "authorization_code", "password", "client_credentials"}, - Scope: "fosite,openid,photos,offline", + LegacyClientID: "my-client", + Secret: "foobar", + RedirectURIs: []string{"http://localhost:3846/callback"}, + ResponseTypes: []string{"id_token", "code", "token"}, + GrantTypes: []string{"implicit", "refresh_token", "authorization_code", "password", "client_credentials"}, + Scope: "fosite,openid,photos,offline", }, { - OutfacingID: "encoded:client", - Secret: "encoded&password", - RedirectURIs: []string{"http://localhost:3846/callback"}, - ResponseTypes: []string{"id_token", "code", "token"}, - GrantTypes: []string{"implicit", "refresh_token", "authorization_code", "password", "client_credentials"}, - Scope: "fosite,openid,photos,offline", + LegacyClientID: "encoded:client", + Secret: "encoded&password", + RedirectURIs: []string{"http://localhost:3846/callback"}, + ResponseTypes: []string{"id_token", "code", "token"}, + GrantTypes: []string{"implicit", "refresh_token", "authorization_code", "password", "client_credentials"}, + Scope: "fosite,openid,photos,offline", }, } { // #nosec G601 diff --git a/internal/testhelpers/janitor_test_helper.go b/internal/testhelpers/janitor_test_helper.go index 1c96680d212..80530de5ff6 100644 --- a/internal/testhelpers/janitor_test_helper.go +++ b/internal/testhelpers/janitor_test_helper.go @@ -596,7 +596,7 @@ func getAccessRequests(uniqueName string, lifespan time.Duration) []*fosite.Requ { ID: fmt.Sprintf("%s_flush-access-1", uniqueName), RequestedAt: time.Now().Round(time.Second), - Client: &client.Client{OutfacingID: fmt.Sprintf("%s_flush-access-1", uniqueName)}, + Client: &client.Client{LegacyClientID: fmt.Sprintf("%s_flush-access-1", uniqueName)}, RequestedScope: fosite.Arguments{"fa", "ba"}, GrantedScope: fosite.Arguments{"fa", "ba"}, Form: url.Values{"foo": []string{"bar", "baz"}}, @@ -605,7 +605,7 @@ func getAccessRequests(uniqueName string, lifespan time.Duration) []*fosite.Requ { ID: fmt.Sprintf("%s_flush-access-2", uniqueName), RequestedAt: time.Now().Round(time.Second).Add(-(lifespan + time.Minute)), - Client: &client.Client{OutfacingID: fmt.Sprintf("%s_flush-access-2", uniqueName)}, + Client: &client.Client{LegacyClientID: fmt.Sprintf("%s_flush-access-2", uniqueName)}, RequestedScope: fosite.Arguments{"fa", "ba"}, GrantedScope: fosite.Arguments{"fa", "ba"}, Form: url.Values{"foo": []string{"bar", "baz"}}, @@ -614,7 +614,7 @@ func getAccessRequests(uniqueName string, lifespan time.Duration) []*fosite.Requ { ID: fmt.Sprintf("%s_flush-access-3", uniqueName), RequestedAt: time.Now().Round(time.Second).Add(-(lifespan + time.Hour)), - Client: &client.Client{OutfacingID: fmt.Sprintf("%s_flush-access-3", uniqueName)}, + Client: &client.Client{LegacyClientID: fmt.Sprintf("%s_flush-access-3", uniqueName)}, RequestedScope: fosite.Arguments{"fa", "ba"}, GrantedScope: fosite.Arguments{"fa", "ba"}, Form: url.Values{"foo": []string{"bar", "baz"}}, @@ -633,7 +633,7 @@ func getRefreshRequests(uniqueName string, lifespan time.Duration) []*fosite.Acc Request: fosite.Request{ RequestedAt: time.Now().Round(time.Second), ID: fmt.Sprintf("%s_flush-refresh-1", uniqueName), - Client: &client.Client{OutfacingID: fmt.Sprintf("%s_flush-refresh-1", uniqueName)}, + Client: &client.Client{LegacyClientID: fmt.Sprintf("%s_flush-refresh-1", uniqueName)}, RequestedScope: []string{"offline"}, GrantedScope: []string{"offline"}, Session: &oauth2.Session{DefaultSession: &openid.DefaultSession{Subject: "bar"}}, @@ -649,7 +649,7 @@ func getRefreshRequests(uniqueName string, lifespan time.Duration) []*fosite.Acc Request: fosite.Request{ RequestedAt: time.Now().Round(time.Second).Add(-(lifespan + time.Minute)), ID: fmt.Sprintf("%s_flush-refresh-2", uniqueName), - Client: &client.Client{OutfacingID: fmt.Sprintf("%s_flush-refresh-2", uniqueName)}, + Client: &client.Client{LegacyClientID: fmt.Sprintf("%s_flush-refresh-2", uniqueName)}, RequestedScope: []string{"offline"}, GrantedScope: []string{"offline"}, Session: &oauth2.Session{DefaultSession: &openid.DefaultSession{Subject: "bar"}}, @@ -665,7 +665,7 @@ func getRefreshRequests(uniqueName string, lifespan time.Duration) []*fosite.Acc Request: fosite.Request{ RequestedAt: time.Now().Round(time.Second).Add(-(lifespan + time.Hour)), ID: fmt.Sprintf("%s_flush-refresh-3", uniqueName), - Client: &client.Client{OutfacingID: fmt.Sprintf("%s_flush-refresh-3", uniqueName)}, + Client: &client.Client{LegacyClientID: fmt.Sprintf("%s_flush-refresh-3", uniqueName)}, RequestedScope: []string{"offline"}, GrantedScope: []string{"offline"}, Session: &oauth2.Session{DefaultSession: &openid.DefaultSession{Subject: "bar"}}, @@ -684,8 +684,8 @@ func genLoginRequests(uniqueName string, lifespan time.Duration) []*consent.Logi RequestedScope: []string{"foo", "bar"}, Subject: fmt.Sprintf("%s_flush-login-1", uniqueName), Client: &client.Client{ - OutfacingID: fmt.Sprintf("%s_flush-login-consent-1", uniqueName), - RedirectURIs: []string{"http://redirect"}, + LegacyClientID: fmt.Sprintf("%s_flush-login-consent-1", uniqueName), + RedirectURIs: []string{"http://redirect"}, }, RequestURL: "http://redirect", RequestedAt: time.Now().Round(time.Second), @@ -697,8 +697,8 @@ func genLoginRequests(uniqueName string, lifespan time.Duration) []*consent.Logi RequestedScope: []string{"foo", "bar"}, Subject: fmt.Sprintf("%s_flush-login-2", uniqueName), Client: &client.Client{ - OutfacingID: fmt.Sprintf("%s_flush-login-consent-2", uniqueName), - RedirectURIs: []string{"http://redirect"}, + LegacyClientID: fmt.Sprintf("%s_flush-login-consent-2", uniqueName), + RedirectURIs: []string{"http://redirect"}, }, RequestURL: "http://redirect", RequestedAt: time.Now().Round(time.Second).Add(-(lifespan + time.Minute)), @@ -710,8 +710,8 @@ func genLoginRequests(uniqueName string, lifespan time.Duration) []*consent.Logi RequestedScope: []string{"foo", "bar"}, Subject: fmt.Sprintf("%s_flush-login-3", uniqueName), Client: &client.Client{ - OutfacingID: fmt.Sprintf("%s_flush-login-consent-3", uniqueName), - RedirectURIs: []string{"http://redirect"}, + LegacyClientID: fmt.Sprintf("%s_flush-login-consent-3", uniqueName), + RedirectURIs: []string{"http://redirect"}, }, RequestURL: "http://redirect", RequestedAt: time.Now().Round(time.Second).Add(-(lifespan + time.Hour)), diff --git a/oauth2/fosite_store_helpers.go b/oauth2/fosite_store_helpers.go index 786ce22a745..37a68810b9c 100644 --- a/oauth2/fosite_store_helpers.go +++ b/oauth2/fosite_store_helpers.go @@ -96,7 +96,7 @@ type AssertionJWTReader interface { var defaultRequest = fosite.Request{ ID: "blank", RequestedAt: time.Now().UTC().Round(time.Second), - Client: &client.Client{OutfacingID: "foobar"}, + Client: &client.Client{LegacyClientID: "foobar"}, RequestedScope: fosite.Arguments{"fa", "ba"}, GrantedScope: fosite.Arguments{"fa", "ba"}, RequestedAudience: fosite.Arguments{"ad1", "ad2"}, @@ -110,7 +110,7 @@ var flushRequests = []*fosite.Request{ { ID: "flush-1", RequestedAt: time.Now().Round(time.Second), - Client: &client.Client{OutfacingID: "foobar"}, + Client: &client.Client{LegacyClientID: "foobar"}, RequestedScope: fosite.Arguments{"fa", "ba"}, GrantedScope: fosite.Arguments{"fa", "ba"}, Form: url.Values{"foo": []string{"bar", "baz"}}, @@ -119,7 +119,7 @@ var flushRequests = []*fosite.Request{ { ID: "flush-2", RequestedAt: time.Now().Round(time.Second).Add(-(lifespan + time.Minute)), - Client: &client.Client{OutfacingID: "foobar"}, + Client: &client.Client{LegacyClientID: "foobar"}, RequestedScope: fosite.Arguments{"fa", "ba"}, GrantedScope: fosite.Arguments{"fa", "ba"}, Form: url.Values{"foo": []string{"bar", "baz"}}, @@ -128,7 +128,7 @@ var flushRequests = []*fosite.Request{ { ID: "flush-3", RequestedAt: time.Now().Round(time.Second).Add(-(lifespan + time.Hour)), - Client: &client.Client{OutfacingID: "foobar"}, + Client: &client.Client{LegacyClientID: "foobar"}, RequestedScope: fosite.Arguments{"fa", "ba"}, GrantedScope: fosite.Arguments{"fa", "ba"}, Form: url.Values{"foo": []string{"bar", "baz"}}, @@ -137,7 +137,7 @@ var flushRequests = []*fosite.Request{ } func mockRequestForeignKey(t *testing.T, id string, x InternalRegistry, createClient bool) { - cl := &client.Client{OutfacingID: "foobar"} + cl := &client.Client{LegacyClientID: "foobar"} cr := &consent.ConsentRequest{ Client: cl, OpenIDConnectContext: new(consent.OpenIDConnectContext), @@ -202,7 +202,7 @@ func testHelperRequestIDMultiples(m InternalRegistry, _ string) func(t *testing. return func(t *testing.T) { requestId := uuid.New() mockRequestForeignKey(t, requestId, m, true) - cl := &client.Client{OutfacingID: "foobar"} + cl := &client.Client{LegacyClientID: "foobar"} fositeRequest := &fosite.Request{ ID: requestId, @@ -287,10 +287,10 @@ func testHelperRevokeRefreshToken(x InternalRegistry) func(t *testing.T) { mockRequestForeignKey(t, reqIdOne, x, false) mockRequestForeignKey(t, reqIdTwo, x, false) - err = m.CreateRefreshTokenSession(ctx, "1111", &fosite.Request{ID: reqIdOne, Client: &client.Client{OutfacingID: "foobar"}, RequestedAt: time.Now().UTC().Round(time.Second), Session: &Session{}}) + err = m.CreateRefreshTokenSession(ctx, "1111", &fosite.Request{ID: reqIdOne, Client: &client.Client{LegacyClientID: "foobar"}, RequestedAt: time.Now().UTC().Round(time.Second), Session: &Session{}}) require.NoError(t, err) - err = m.CreateRefreshTokenSession(ctx, "1122", &fosite.Request{ID: reqIdTwo, Client: &client.Client{OutfacingID: "foobar"}, RequestedAt: time.Now().UTC().Round(time.Second), Session: &Session{}}) + err = m.CreateRefreshTokenSession(ctx, "1122", &fosite.Request{ID: reqIdTwo, Client: &client.Client{LegacyClientID: "foobar"}, RequestedAt: time.Now().UTC().Round(time.Second), Session: &Session{}}) require.NoError(t, err) _, err = m.GetRefreshTokenSession(ctx, "1111", &Session{}) @@ -344,7 +344,7 @@ func testHelperCreateGetDeleteAuthorizeCodes(x InternalRegistry) func(t *testing func testHelperNilAccessToken(x InternalRegistry) func(t *testing.T) { return func(t *testing.T) { m := x.OAuth2Storage() - c := &client.Client{OutfacingID: "nil-request-client-id-123"} + c := &client.Client{LegacyClientID: "nil-request-client-id-123"} require.NoError(t, x.ClientManager().CreateClient(context.Background(), c)) err := m.CreateAccessTokenSession(context.TODO(), "nil-request-id", &fosite.Request{ ID: "", @@ -1072,7 +1072,7 @@ func createTestRequest(id string) *fosite.Request { return &fosite.Request{ ID: id, RequestedAt: time.Now().UTC().Round(time.Second), - Client: &client.Client{OutfacingID: "foobar"}, + Client: &client.Client{LegacyClientID: "foobar"}, RequestedScope: fosite.Arguments{"fa", "ba"}, GrantedScope: fosite.Arguments{"fa", "ba"}, RequestedAudience: fosite.Arguments{"ad1", "ad2"}, diff --git a/oauth2/fosite_store_test.go b/oauth2/fosite_store_test.go index 20d1addc1a0..45c550c7b9a 100644 --- a/oauth2/fosite_store_test.go +++ b/oauth2/fosite_store_test.go @@ -87,7 +87,7 @@ func TestManagers(t *testing.T) { t.Run(tc.name, func(t *testing.T) { setupRegistries(t) - require.NoError(t, registries["memory"].ClientManager().CreateClient(context.Background(), &client.Client{OutfacingID: "foobar"})) // this is a workaround because the client is not being created for memory store by test helpers. + require.NoError(t, registries["memory"].ClientManager().CreateClient(context.Background(), &client.Client{LegacyClientID: "foobar"})) // this is a workaround because the client is not being created for memory store by test helpers. for k, store := range registries { net := &networkx.Network{} diff --git a/oauth2/handler_test.go b/oauth2/handler_test.go index 5ce2bffc416..ec1270717b3 100644 --- a/oauth2/handler_test.go +++ b/oauth2/handler_test.go @@ -80,7 +80,7 @@ func TestHandlerDeleteHandler(t *testing.T) { deleteRequest := &fosite.Request{ ID: "del-1", RequestedAt: time.Now().Round(time.Second), - Client: &client.Client{OutfacingID: "foobar"}, + Client: &client.Client{LegacyClientID: "foobar"}, RequestedScope: fosite.Arguments{"fa", "ba"}, GrantedScope: fosite.Arguments{"fa", "ba"}, Form: url.Values{"foo": []string{"bar", "baz"}}, @@ -229,7 +229,7 @@ func TestUserinfo(t *testing.T) { return fosite.AccessToken, &fosite.AccessRequest{ Request: fosite.Request{ Client: &client.Client{ - OutfacingID: "foobar", + LegacyClientID: "foobar", }, Session: session, }, @@ -263,7 +263,7 @@ func TestUserinfo(t *testing.T) { return fosite.AccessToken, &fosite.AccessRequest{ Request: fosite.Request{ Client: &client.Client{ - OutfacingID: "foobar", + LegacyClientID: "foobar", }, Session: session, }, @@ -298,7 +298,7 @@ func TestUserinfo(t *testing.T) { return fosite.AccessToken, &fosite.AccessRequest{ Request: fosite.Request{ Client: &client.Client{ - OutfacingID: "foobar", + LegacyClientID: "foobar", UserinfoSignedResponseAlg: "none", }, Session: session, @@ -360,7 +360,7 @@ func TestUserinfo(t *testing.T) { return fosite.AccessToken, &fosite.AccessRequest{ Request: fosite.Request{ Client: &client.Client{ - OutfacingID: "foobar-client", + LegacyClientID: "foobar-client", UserinfoSignedResponseAlg: "RS256", }, Session: session, diff --git a/oauth2/oauth2_auth_code_test.go b/oauth2/oauth2_auth_code_test.go index 1af5b4f7be2..492d060d161 100644 --- a/oauth2/oauth2_auth_code_test.go +++ b/oauth2/oauth2_auth_code_test.go @@ -91,7 +91,6 @@ func TestAuthCodeWithDefaultStrategy(t *testing.T) { newOAuth2Client := func(t *testing.T, cb string) (*hc.Client, *oauth2.Config) { secret := uuid.New() c := &hc.Client{ - OutfacingID: uuid.New(), Secret: secret, RedirectURIs: []string{cb}, ResponseTypes: []string{"id_token", "code", "token"}, @@ -101,7 +100,7 @@ func TestAuthCodeWithDefaultStrategy(t *testing.T) { } require.NoError(t, reg.ClientManager().CreateClient(context.TODO(), c)) return c, &oauth2.Config{ - ClientID: c.OutfacingID, + ClientID: c.GetID(), ClientSecret: secret, Endpoint: oauth2.Endpoint{ AuthURL: reg.Config().OAuth2AuthURL(ctx).String(), @@ -615,12 +614,12 @@ func TestAuthCodeWithMockStrategy(t *testing.T) { var mutex sync.Mutex require.NoError(t, reg.ClientManager().CreateClient(context.TODO(), &hc.Client{ - OutfacingID: "app-client", - Secret: "secret", - RedirectURIs: []string{ts.URL + "/callback"}, - ResponseTypes: []string{"id_token", "code", "token"}, - GrantTypes: []string{"implicit", "refresh_token", "authorization_code", "password", "client_credentials"}, - Scope: "hydra.* offline openid", + LegacyClientID: "app-client", + Secret: "secret", + RedirectURIs: []string{ts.URL + "/callback"}, + ResponseTypes: []string{"id_token", "code", "token"}, + GrantTypes: []string{"implicit", "refresh_token", "authorization_code", "password", "client_credentials"}, + Scope: "hydra.* offline openid", })) oauthConfig := &oauth2.Config{ diff --git a/oauth2/oauth2_client_credentials_test.go b/oauth2/oauth2_client_credentials_test.go index 654e540b0ff..440f4785f4a 100644 --- a/oauth2/oauth2_client_credentials_test.go +++ b/oauth2/oauth2_client_credentials_test.go @@ -53,7 +53,6 @@ func TestClientCredentials(t *testing.T) { var newClient = func(t *testing.T) (*hc.Client, clientcredentials.Config) { secret := uuid.New().String() c := &hc.Client{ - OutfacingID: uuid.New().String(), Secret: secret, RedirectURIs: []string{public.URL + "/callback"}, ResponseTypes: []string{"token"}, @@ -63,7 +62,7 @@ func TestClientCredentials(t *testing.T) { } require.NoError(t, reg.ClientManager().CreateClient(ctx, c)) return c, clientcredentials.Config{ - ClientID: c.OutfacingID, + ClientID: c.GetID(), ClientSecret: secret, TokenURL: reg.Config().OAuth2TokenURL(ctx).String(), Scopes: strings.Split(c.Scope, " "), @@ -87,11 +86,11 @@ func TestClientCredentials(t *testing.T) { } var inspectToken = func(t *testing.T, token *goauth2.Token, cl *hc.Client, conf clientcredentials.Config, strategy string) { - introspection := testhelpers.IntrospectToken(t, &goauth2.Config{ClientID: cl.OutfacingID, ClientSecret: conf.ClientSecret}, token, admin) + introspection := testhelpers.IntrospectToken(t, &goauth2.Config{ClientID: cl.GetID(), ClientSecret: conf.ClientSecret}, token, admin) check := func(res gjson.Result) { - assert.EqualValues(t, cl.OutfacingID, res.Get("client_id").String(), "%s", res.Raw) - assert.EqualValues(t, cl.OutfacingID, res.Get("sub").String(), "%s", res.Raw) + assert.EqualValues(t, cl.GetID(), res.Get("client_id").String(), "%s", res.Raw) + assert.EqualValues(t, cl.GetID(), res.Get("sub").String(), "%s", res.Raw) assert.EqualValues(t, reg.Config().IssuerURL(ctx).String(), res.Get("iss").String(), "%s", res.Raw) assert.EqualValues(t, res.Get("nbf").Int(), res.Get("iat").Int(), "%s", res.Raw) diff --git a/oauth2/oauth2_jwt_bearer_test.go b/oauth2/oauth2_jwt_bearer_test.go index 6084c99dc31..4f7e18e3d04 100644 --- a/oauth2/oauth2_jwt_bearer_test.go +++ b/oauth2/oauth2_jwt_bearer_test.go @@ -61,16 +61,15 @@ func TestJWTBearer(t *testing.T) { secret := uuid.New().String() client := &hc.Client{ - OutfacingID: uuid.New().String(), - Secret: secret, - GrantTypes: []string{"client_credentials", "urn:ietf:params:oauth:grant-type:jwt-bearer"}, - Scope: "offline_access", + Secret: secret, + GrantTypes: []string{"client_credentials", "urn:ietf:params:oauth:grant-type:jwt-bearer"}, + Scope: "offline_access", } require.NoError(t, reg.ClientManager().CreateClient(ctx, client)) newConf := func(client *hc.Client) *clientcredentials.Config { return &clientcredentials.Config{ - ClientID: client.OutfacingID, + ClientID: client.GetID(), ClientSecret: secret, TokenURL: reg.Config().OAuth2TokenURL(ctx).String(), Scopes: strings.Split(client.Scope, " "), @@ -84,10 +83,10 @@ func TestJWTBearer(t *testing.T) { } var inspectToken = func(t *testing.T, token *goauth2.Token, cl *hc.Client, strategy string, grant trust.Grant) { - introspection := testhelpers.IntrospectToken(t, &goauth2.Config{ClientID: cl.OutfacingID, ClientSecret: cl.Secret}, token, admin) + introspection := testhelpers.IntrospectToken(t, &goauth2.Config{ClientID: cl.GetID(), ClientSecret: cl.Secret}, token, admin) check := func(res gjson.Result) { - assert.EqualValues(t, cl.OutfacingID, res.Get("client_id").String(), "%s", res.Raw) + assert.EqualValues(t, cl.GetID(), res.Get("client_id").String(), "%s", res.Raw) assert.EqualValues(t, grant.Subject, res.Get("sub").String(), "%s", res.Raw) assert.EqualValues(t, reg.Config().IssuerURL(ctx).String(), res.Get("iss").String(), "%s", res.Raw) @@ -134,10 +133,9 @@ func TestJWTBearer(t *testing.T) { t.Run("case=unable to request grant if not set", func(t *testing.T) { client := &hc.Client{ - OutfacingID: uuid.New().String(), - Secret: secret, - GrantTypes: []string{"client_credentials"}, - Scope: "offline_access", + Secret: secret, + GrantTypes: []string{"client_credentials"}, + Scope: "offline_access", } require.NoError(t, reg.ClientManager().CreateClient(ctx, client)) diff --git a/oauth2/oauth2_refresh_token_test.go b/oauth2/oauth2_refresh_token_test.go index 290aec367c6..3ad95667e21 100644 --- a/oauth2/oauth2_refresh_token_test.go +++ b/oauth2/oauth2_refresh_token_test.go @@ -11,7 +11,8 @@ import ( "testing" "time" - "github.com/pborman/uuid" + "github.com/gofrs/uuid" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -48,7 +49,7 @@ func TestCreateRefreshTokenSessionStress(t *testing.T) { token := "234c678fed33c1d2025537ae464a1ebf7d23fc4a" tokenSignature := "4c7c7e8b3a77ad0c3ec846a21653c48b45dbfa31" testClient := hc.Client{ - OutfacingID: uuid.New(), + ID: uuid.Must(uuid.NewV4()), Secret: "secret", ResponseTypes: []string{"id_token", "code", "token"}, GrantTypes: []string{"implicit", "refresh_token", "authorization_code", "password", "client_credentials"}, @@ -62,9 +63,9 @@ func TestCreateRefreshTokenSessionStress(t *testing.T) { }, Request: fosite.Request{ RequestedAt: time.Now(), - ID: uuid.New(), + ID: uuid.Must(uuid.NewV4()).String(), Client: &hc.Client{ - OutfacingID: testClient.OutfacingID, + ID: uuid.FromStringOrNil(testClient.GetID()), }, RequestedScope: []string{"offline"}, GrantedScope: []string{"offline"}, diff --git a/package-lock.json b/package-lock.json index 0883b0ca377..fa059c41dd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "ory-prettier-styles": "1.1.2", "prettier": "2.5.1", "standard": "^12.0.1", + "uuid": "^8.3.2", "wait-on": "^3.2.0" } }, @@ -107,15 +108,6 @@ "node": ">=0.8" } }, - "node_modules/@cypress/request/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@cypress/xvfb": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", @@ -512,14 +504,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" }, - "node_modules/@openapitools/openapi-generator-cli/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@types/node": { "version": "14.17.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.5.tgz", @@ -4250,6 +4234,16 @@ "throttleit": "^1.0.0" } }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4880,12 +4874,11 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "node_modules/uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true, + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "bin": { - "uuid": "bin/uuid" + "uuid": "dist/bin/uuid" } }, "node_modules/validate-npm-package-license": { @@ -5184,12 +5177,6 @@ "psl": "^1.1.28", "punycode": "^2.1.1" } - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true } } }, @@ -5463,11 +5450,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" } } }, @@ -8350,6 +8332,14 @@ "tough-cookie": "~2.4.3", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } } }, "request-progress": { @@ -8864,10 +8854,9 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, "validate-npm-package-license": { "version": "3.0.4", diff --git a/package.json b/package.json index c76ad8d27e3..44af8d5ef34 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "ory-prettier-styles": "1.1.2", "prettier": "2.5.1", "standard": "^12.0.1", + "uuid": "^8.3.2", "wait-on": "^3.2.0" } } diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0001.json b/persistence/sql/migratest/fixtures/hydra_client/client-0001.json index 49ed7357bdb..56c24e0a7b0 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0001.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0001.json @@ -18,11 +18,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "", + "LegacyClientID": "client-0001", "LogoURI": "http://logo/0001", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0001", - "OutfacingID": "client-0001", "Owner": "owner-0001", "PKDeprecated": 1, "PolicyURI": "http://policy/0001", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0002.json b/persistence/sql/migratest/fixtures/hydra_client/client-0002.json index 22121dd3056..e3767cd49b5 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0002.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0002.json @@ -18,11 +18,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "", + "LegacyClientID": "client-0002", "LogoURI": "http://logo/0002", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0002", - "OutfacingID": "client-0002", "Owner": "owner-0002", "PKDeprecated": 2, "PolicyURI": "http://policy/0002", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0003.json b/persistence/sql/migratest/fixtures/hydra_client/client-0003.json index b4c13bc773b..2f34a6d4be1 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0003.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0003.json @@ -18,11 +18,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "", + "LegacyClientID": "client-0003", "LogoURI": "http://logo/0003", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0003", - "OutfacingID": "client-0003", "Owner": "owner-0003", "PKDeprecated": 3, "PolicyURI": "http://policy/0003", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0004.json b/persistence/sql/migratest/fixtures/hydra_client/client-0004.json index accb9c7952e..6dcb7c743a1 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0004.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0004.json @@ -18,11 +18,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/0004", + "LegacyClientID": "client-0004", "LogoURI": "http://logo/0004", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0004", - "OutfacingID": "client-0004", "Owner": "owner-0004", "PKDeprecated": 4, "PolicyURI": "http://policy/0004", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0005.json b/persistence/sql/migratest/fixtures/hydra_client/client-0005.json index b9241c109dd..d6264e9d7d4 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0005.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0005.json @@ -18,11 +18,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/0005", + "LegacyClientID": "client-0005", "LogoURI": "http://logo/0005", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0005", - "OutfacingID": "client-0005", "Owner": "owner-0005", "PKDeprecated": 5, "PolicyURI": "http://policy/0005", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0006.json b/persistence/sql/migratest/fixtures/hydra_client/client-0006.json index 42fcb603d61..71ab2927760 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0006.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0006.json @@ -18,11 +18,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/0006", + "LegacyClientID": "client-0006", "LogoURI": "http://logo/0006", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0006", - "OutfacingID": "client-0006", "Owner": "owner-0006", "PKDeprecated": 6, "PolicyURI": "http://policy/0006", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0007.json b/persistence/sql/migratest/fixtures/hydra_client/client-0007.json index 73f1bca9ce5..00cbe762080 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0007.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0007.json @@ -18,11 +18,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/0007", + "LegacyClientID": "client-0007", "LogoURI": "http://logo/0007", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0007", - "OutfacingID": "client-0007", "Owner": "owner-0007", "PKDeprecated": 7, "PolicyURI": "http://policy/0007", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0008.json b/persistence/sql/migratest/fixtures/hydra_client/client-0008.json index 50c819b856b..83e7b295887 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0008.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0008.json @@ -20,11 +20,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/0008", + "LegacyClientID": "client-0008", "LogoURI": "http://logo/0008", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0008", - "OutfacingID": "client-0008", "Owner": "owner-0008", "PKDeprecated": 8, "PolicyURI": "http://policy/0008", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0009.json b/persistence/sql/migratest/fixtures/hydra_client/client-0009.json index b6c51a6da10..25c487aeb8c 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0009.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0009.json @@ -20,11 +20,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/0009", + "LegacyClientID": "client-0009", "LogoURI": "http://logo/0009", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0009", - "OutfacingID": "client-0009", "Owner": "owner-0009", "PKDeprecated": 9, "PolicyURI": "http://policy/0009", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0010.json b/persistence/sql/migratest/fixtures/hydra_client/client-0010.json index 90f0c996156..87b85bac270 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0010.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0010.json @@ -20,11 +20,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/0010", + "LegacyClientID": "client-0010", "LogoURI": "http://logo/0010", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0010", - "OutfacingID": "client-0010", "Owner": "owner-0010", "PKDeprecated": 10, "PolicyURI": "http://policy/0010", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0011.json b/persistence/sql/migratest/fixtures/hydra_client/client-0011.json index cb303202df1..4aa2bac9a0c 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0011.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0011.json @@ -22,11 +22,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/0011", + "LegacyClientID": "client-0011", "LogoURI": "http://logo/0011", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0011", - "OutfacingID": "client-0011", "Owner": "owner-0011", "PKDeprecated": 11, "PolicyURI": "http://policy/0011", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0012.json b/persistence/sql/migratest/fixtures/hydra_client/client-0012.json index 4e71c52208f..08c99990b45 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0012.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0012.json @@ -22,11 +22,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/0012", + "LegacyClientID": "client-0012", "LogoURI": "http://logo/0012", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0012", - "OutfacingID": "client-0012", "Owner": "owner-0012", "PKDeprecated": 12, "PolicyURI": "http://policy/0012", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0013.json b/persistence/sql/migratest/fixtures/hydra_client/client-0013.json index f962f785e59..d12b8863f50 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0013.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0013.json @@ -22,11 +22,11 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/0013", + "LegacyClientID": "client-0013", "LogoURI": "http://logo/0013", "Metadata": {}, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0013", - "OutfacingID": "client-0013", "Owner": "owner-0013", "PKDeprecated": 13, "PolicyURI": "http://policy/0013", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-0014.json b/persistence/sql/migratest/fixtures/hydra_client/client-0014.json index 16a43056922..dd75f2fb85f 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-0014.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-0014.json @@ -22,13 +22,13 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/0014", + "LegacyClientID": "client-0014", "LogoURI": "http://logo/0014", "Metadata": { "migration": "0014" }, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 0014", - "OutfacingID": "client-0014", "Owner": "owner-0014", "PKDeprecated": 14, "PolicyURI": "http://policy/0014", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-20.json b/persistence/sql/migratest/fixtures/hydra_client/client-20.json index 7e7c4c69f7f..9eb518ff1f8 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-20.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-20.json @@ -22,13 +22,13 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/20", + "LegacyClientID": "client-20", "LogoURI": "http://logo/20", "Metadata": { "migration": "20" }, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 20", - "OutfacingID": "client-20", "Owner": "owner-20", "PKDeprecated": 0, "PolicyURI": "http://policy/20", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-2005.json b/persistence/sql/migratest/fixtures/hydra_client/client-2005.json index a7186683f0f..bf7042df9e5 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-2005.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-2005.json @@ -22,13 +22,13 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/2005", + "LegacyClientID": "client-2005", "LogoURI": "http://logo/2005", "Metadata": { "migration": "2005" }, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 2005", - "OutfacingID": "client-2005", "Owner": "owner-2005", "PKDeprecated": 2005, "PolicyURI": "http://policy/2005", diff --git a/persistence/sql/migratest/fixtures/hydra_client/client-21.json b/persistence/sql/migratest/fixtures/hydra_client/client-21.json index 238a5add1ed..6b61afebfae 100644 --- a/persistence/sql/migratest/fixtures/hydra_client/client-21.json +++ b/persistence/sql/migratest/fixtures/hydra_client/client-21.json @@ -26,13 +26,13 @@ "JSONWebKeySet": null }, "JSONWebKeysURI": "http://jwks/21", + "LegacyClientID": "client-21", "LogoURI": "http://logo/21", "Metadata": { "migration": "21" }, "NID": "00000000-0000-0000-0000-000000000000", "Name": "Client 21", - "OutfacingID": "client-21", "Owner": "owner-21", "PKDeprecated": 0, "PolicyURI": "http://policy/21", diff --git a/persistence/sql/migratest/migration_test.go b/persistence/sql/migratest/migration_test.go index 563ffc6892e..efaf6cb4d24 100644 --- a/persistence/sql/migratest/migration_test.go +++ b/persistence/sql/migratest/migration_test.go @@ -118,7 +118,7 @@ func TestMigrations(t *testing.T) { testhelpersuuid.AssertUUID(t, &c.NID) c.ID = uuid.Nil c.NID = uuid.Nil - CompareWithFixture(t, structs.Map(c), "hydra_client", c.OutfacingID) + CompareWithFixture(t, structs.Map(c), "hydra_client", c.LegacyClientID) } }) diff --git a/persistence/sql/persister_client.go b/persistence/sql/persister_client.go index 094d5ee7349..07a13ebcfd7 100644 --- a/persistence/sql/persister_client.go +++ b/persistence/sql/persister_client.go @@ -3,9 +3,10 @@ package sql import ( "context" - "github.com/gobuffalo/pop/v6" "github.com/gofrs/uuid" + "github.com/gobuffalo/pop/v6" + "github.com/ory/x/errorsx" "github.com/ory/fosite" @@ -87,7 +88,12 @@ func (p *Persister) CreateClient(ctx context.Context, c *client.Client) error { } c.Secret = string(h) - c.ID = uuid.Must(uuid.NewV4()) + if c.ID == uuid.Nil { + c.ID = uuid.Must(uuid.NewV4()) + } + if c.LegacyClientID == "" { + c.LegacyClientID = c.ID.String() + } return sqlcon.HandleError(p.CreateWithNetwork(ctx, c)) } diff --git a/persistence/sql/persister_nid_test.go b/persistence/sql/persister_nid_test.go index c55fd31083a..a86ea39bd03 100644 --- a/persistence/sql/persister_nid_test.go +++ b/persistence/sql/persister_nid_test.go @@ -6,6 +6,8 @@ import ( "testing" "time" + "github.com/ory/x/uuidx" + "github.com/ory/x/assertx" "github.com/gofrs/uuid" @@ -120,7 +122,7 @@ func (s *PersisterTestSuite) TestAddKeySetGetKeySetDeleteKeySet() { t := s.T() ks := newKeySet("test-ks", "test") for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ksID := "key-set" r.Persister().AddKeySet(s.t1, ksID, ks) actual, err := r.Persister().GetKeySet(s.t2, ksID) @@ -143,8 +145,8 @@ func (s *PersisterTestSuite) TestAddKeySetGetKeySetDeleteKeySet() { func (s *PersisterTestSuite) TestAuthenticate() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id", Secret: "secret"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id", Secret: "secret"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) actual, err := r.Persister().Authenticate(s.t2, "client-id", []byte("secret")) @@ -161,7 +163,7 @@ func (s *PersisterTestSuite) TestAuthenticate() { func (s *PersisterTestSuite) TestClientAssertionJWTValid() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { jti := oauth2.NewBlacklistedJTI(uuid.Must(uuid.NewV4()).String(), time.Now().Add(24*time.Hour)) require.NoError(t, r.Persister().SetClientAssertionJWT(s.t1, jti.JTI, jti.Expiry)) @@ -210,7 +212,7 @@ func (s *PersisterTestSuite) TestCreateSession() { func (s *PersisterTestSuite) TestCountClients() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { count, err := r.Persister().CountClients(s.t1) require.NoError(t, err) require.Equal(t, 0, count) @@ -235,7 +237,7 @@ func (s *PersisterTestSuite) TestCountClients() { func (s *PersisterTestSuite) TestCountGrants() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { count, err := r.Persister().CountGrants(s.t1) require.NoError(t, err) require.Equal(t, 0, count) @@ -264,7 +266,7 @@ func (s *PersisterTestSuite) TestCountGrants() { func (s *PersisterTestSuite) TestCountSubjectsGrantedConsentRequests() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sub := uuid.Must(uuid.NewV4()).String() count, err := r.Persister().CountSubjectsGrantedConsentRequests(s.t1, sub) require.NoError(t, err) @@ -276,9 +278,9 @@ func (s *PersisterTestSuite) TestCountSubjectsGrantedConsentRequests() { sessionID := uuid.Must(uuid.NewV4()).String() require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) - client := &client.Client{OutfacingID: "client-id"} + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) - f := newFlow(s.t1NID, client.OutfacingID, sub, sqlxx.NullString(sessionID)) + f := newFlow(s.t1NID, client.LegacyClientID, sub, sqlxx.NullString(sessionID)) f.ConsentSkip = false f.ConsentError = &consent.RequestDeniedError{} f.State = flow.FlowStateConsentUnused @@ -298,13 +300,15 @@ func (s *PersisterTestSuite) TestCountSubjectsGrantedConsentRequests() { func (s *PersisterTestSuite) TestCreateAccessTokenSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} - require.NoError(t, r.Persister().CreateClient(s.t1, client)) - require.NoError(t, r.Persister().CreateClient(s.t2, client)) + t.Run(k, func(t *testing.T) { + c1 := &client.Client{LegacyClientID: "client-id"} + require.NoError(t, r.Persister().CreateClient(s.t1, c1)) + c2 := &client.Client{LegacyClientID: "client-id"} + require.NoError(t, r.Persister().CreateClient(s.t2, c2)) sig := uuid.Must(uuid.NewV4()).String() fr := fosite.NewRequest() - fr.Client = &fosite.DefaultClient{ID: client.OutfacingID} + + fr.Client = &fosite.DefaultClient{ID: c1.LegacyClientID} require.NoError(t, r.Persister().CreateAccessTokenSession(s.t1, sig, fr)) actual := persistencesql.OAuth2RequestSQL{Table: "access"} require.NoError(t, r.Persister().Connection(context.Background()).Find(&actual, sig)) @@ -316,13 +320,14 @@ func (s *PersisterTestSuite) TestCreateAccessTokenSession() { func (s *PersisterTestSuite) TestCreateAuthorizeCodeSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} - require.NoError(t, r.Persister().CreateClient(s.t1, client)) - require.NoError(t, r.Persister().CreateClient(s.t2, client)) + t.Run(k, func(t *testing.T) { + c1 := &client.Client{LegacyClientID: "client-id"} + require.NoError(t, r.Persister().CreateClient(s.t1, c1)) + c2 := &client.Client{LegacyClientID: "client-id"} + require.NoError(t, r.Persister().CreateClient(s.t2, c2)) sig := uuid.Must(uuid.NewV4()).String() fr := fosite.NewRequest() - fr.Client = &fosite.DefaultClient{ID: client.OutfacingID} + fr.Client = &fosite.DefaultClient{ID: c1.LegacyClientID} require.NoError(t, r.Persister().CreateAuthorizeCodeSession(s.t1, sig, fr)) actual := persistencesql.OAuth2RequestSQL{Table: "code"} require.NoError(t, r.Persister().Connection(context.Background()).Find(&actual, sig)) @@ -334,8 +339,8 @@ func (s *PersisterTestSuite) TestCreateAuthorizeCodeSession() { func (s *PersisterTestSuite) TestCreateClient() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - expected := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + expected := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, expected)) actual := client.Client{} require.NoError(t, r.Persister().Connection(context.Background()).Find(&actual, expected.ID)) @@ -347,10 +352,10 @@ func (s *PersisterTestSuite) TestCreateClient() { func (s *PersisterTestSuite) TestCreateConsentRequest() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sessionID := uuid.Must(uuid.NewV4()).String() - client := &client.Client{OutfacingID: "client-id"} - f := newFlow(s.t1NID, client.OutfacingID, "sub", sqlxx.NullString(sessionID)) + client := &client.Client{LegacyClientID: "client-id"} + f := newFlow(s.t1NID, client.LegacyClientID, "sub", sqlxx.NullString(sessionID)) require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) require.NoError(t, r.Persister().CreateClient(s.t1, client)) require.NoError(t, r.Persister().Connection(context.Background()).Create(f)) @@ -374,12 +379,12 @@ func (s *PersisterTestSuite) TestCreateConsentRequest() { func (s *PersisterTestSuite) TestCreateForcedObfuscatedLoginSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} - session := &consent.ForcedObfuscatedLoginSession{ClientID: client.OutfacingID} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} + session := &consent.ForcedObfuscatedLoginSession{ClientID: client.LegacyClientID} require.NoError(t, r.Persister().CreateClient(s.t1, client)) require.NoError(t, r.Persister().CreateForcedObfuscatedLoginSession(s.t1, session)) - actual, err := r.Persister().GetForcedObfuscatedLoginSession(s.t1, client.OutfacingID, "") + actual, err := r.Persister().GetForcedObfuscatedLoginSession(s.t1, client.LegacyClientID, "") require.NoError(t, err) require.Equal(t, s.t1NID, actual.NID) }) @@ -389,7 +394,7 @@ func (s *PersisterTestSuite) TestCreateForcedObfuscatedLoginSession() { func (s *PersisterTestSuite) TestCreateGrant() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ks := newKeySet("ks-id", "use") grant := trust.Grant{ ID: uuid.Must(uuid.NewV4()).String(), @@ -408,9 +413,9 @@ func (s *PersisterTestSuite) TestCreateGrant() { func (s *PersisterTestSuite) TestCreateLoginRequest() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} - lr := consent.LoginRequest{ID: "lr-id", ClientID: client.OutfacingID, RequestedAt: time.Now()} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} + lr := consent.LoginRequest{ID: "lr-id", ClientID: client.LegacyClientID, RequestedAt: time.Now()} require.NoError(t, r.Persister().CreateClient(s.t1, client)) require.NoError(t, r.ConsentManager().CreateLoginRequest(s.t1, &lr)) @@ -424,7 +429,7 @@ func (s *PersisterTestSuite) TestCreateLoginRequest() { func (s *PersisterTestSuite) TestCreateLoginSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ls := consent.LoginSession{ID: uuid.Must(uuid.NewV4()).String(), Remember: true} require.NoError(t, r.Persister().CreateLoginSession(s.t1, &ls)) actual, err := r.Persister().GetRememberedLoginSession(s.t1, ls.ID) @@ -437,12 +442,12 @@ func (s *PersisterTestSuite) TestCreateLoginSession() { func (s *PersisterTestSuite) TestCreateLogoutRequest() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} lr := consent.LogoutRequest{ // TODO there is not FK for SessionID so we don't need it here; TODO make sure the missing FK is intentional ID: uuid.Must(uuid.NewV4()).String(), - ClientID: sql.NullString{Valid: true, String: client.OutfacingID}, + ClientID: sql.NullString{Valid: true, String: client.LegacyClientID}, } require.NoError(t, r.Persister().CreateClient(s.t1, client)) @@ -457,8 +462,8 @@ func (s *PersisterTestSuite) TestCreateLogoutRequest() { func (s *PersisterTestSuite) TestCreateOpenIDConnectSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) request := fosite.NewRequest() @@ -477,8 +482,8 @@ func (s *PersisterTestSuite) TestCreateOpenIDConnectSession() { func (s *PersisterTestSuite) TestCreatePKCERequestSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) request := fosite.NewRequest() @@ -498,8 +503,8 @@ func (s *PersisterTestSuite) TestCreatePKCERequestSession() { func (s *PersisterTestSuite) TestCreateRefreshTokenSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) request := fosite.NewRequest() @@ -518,8 +523,8 @@ func (s *PersisterTestSuite) TestCreateRefreshTokenSession() { func (s *PersisterTestSuite) TestCreateWithNetwork() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - expected := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + expected := &client.Client{LegacyClientID: "client-id"} store, ok := r.OAuth2Storage().(*persistencesql.Persister) if !ok { t.Fatal("type assertion failed") @@ -527,7 +532,7 @@ func (s *PersisterTestSuite) TestCreateWithNetwork() { store.CreateWithNetwork(s.t1, expected) actual := &client.Client{} - require.NoError(t, r.Persister().Connection(context.Background()).Where("id = ?", expected.OutfacingID).First(actual)) + require.NoError(t, r.Persister().Connection(context.Background()).Where("id = ?", expected.LegacyClientID).First(actual)) require.Equal(t, s.t1NID, actual.NID) }) } @@ -536,12 +541,12 @@ func (s *PersisterTestSuite) TestCreateWithNetwork() { func (s *PersisterTestSuite) DeleteAccessTokenSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) sig := uuid.Must(uuid.NewV4()).String() fr := fosite.NewRequest() - fr.Client = &fosite.DefaultClient{ID: client.OutfacingID} + fr.Client = &fosite.DefaultClient{ID: client.LegacyClientID} require.NoError(t, r.Persister().CreateAccessTokenSession(s.t1, sig, fr)) require.NoError(t, r.Persister().DeleteAccessTokenSession(s.t2, sig)) @@ -558,20 +563,20 @@ func (s *PersisterTestSuite) DeleteAccessTokenSession() { func (s *PersisterTestSuite) TestDeleteAccessTokens() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) sig := uuid.Must(uuid.NewV4()).String() fr := fosite.NewRequest() - fr.Client = &fosite.DefaultClient{ID: client.OutfacingID} + fr.Client = &fosite.DefaultClient{ID: client.LegacyClientID} require.NoError(t, r.Persister().CreateAccessTokenSession(s.t1, sig, fr)) - require.NoError(t, r.Persister().DeleteAccessTokens(s.t2, client.OutfacingID)) + require.NoError(t, r.Persister().DeleteAccessTokens(s.t2, client.LegacyClientID)) actual := persistencesql.OAuth2RequestSQL{Table: "access"} require.NoError(t, r.Persister().Connection(context.Background()).Find(&actual, sig)) require.Equal(t, s.t1NID, actual.NID) - require.NoError(t, r.Persister().DeleteAccessTokens(s.t1, client.OutfacingID)) + require.NoError(t, r.Persister().DeleteAccessTokens(s.t1, client.LegacyClientID)) require.Error(t, r.Persister().Connection(context.Background()).Find(&actual, sig)) }) } @@ -580,13 +585,13 @@ func (s *PersisterTestSuite) TestDeleteAccessTokens() { func (s *PersisterTestSuite) TestDeleteClient() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - c := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + c := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, c)) actual := client.Client{} - require.Error(t, r.Persister().DeleteClient(s.t2, c.OutfacingID)) + require.Error(t, r.Persister().DeleteClient(s.t2, c.LegacyClientID)) require.NoError(t, r.Persister().Connection(context.Background()).Find(&actual, c.ID)) - require.NoError(t, r.Persister().DeleteClient(s.t1, c.OutfacingID)) + require.NoError(t, r.Persister().DeleteClient(s.t1, c.LegacyClientID)) require.Error(t, r.Persister().Connection(context.Background()).Find(&actual, c.ID)) }) } @@ -595,7 +600,7 @@ func (s *PersisterTestSuite) TestDeleteClient() { func (s *PersisterTestSuite) TestDeleteGrant() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ks := newKeySet("ks-id", "use") grant := trust.Grant{ ID: uuid.Must(uuid.NewV4()).String(), @@ -617,7 +622,7 @@ func (s *PersisterTestSuite) TestDeleteGrant() { func (s *PersisterTestSuite) TestDeleteLoginSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ls := consent.LoginSession{ID: uuid.Must(uuid.NewV4()).String(), Remember: true} require.NoError(t, r.Persister().CreateLoginSession(s.t1, &ls)) @@ -635,8 +640,8 @@ func (s *PersisterTestSuite) TestDeleteLoginSession() { func (s *PersisterTestSuite) TestDeleteOpenIDConnectSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) request := fosite.NewRequest() @@ -658,8 +663,8 @@ func (s *PersisterTestSuite) TestDeleteOpenIDConnectSession() { func (s *PersisterTestSuite) TestDeletePKCERequestSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) request := fosite.NewRequest() @@ -681,8 +686,8 @@ func (s *PersisterTestSuite) TestDeletePKCERequestSession() { func (s *PersisterTestSuite) TestDeleteRefreshTokenSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) request := fosite.NewRequest() @@ -704,7 +709,7 @@ func (s *PersisterTestSuite) TestDeleteRefreshTokenSession() { func (s *PersisterTestSuite) TestDetermineNetwork() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { store, ok := r.OAuth2Storage().(*persistencesql.Persister) if !ok { t.Fatal("type assertion failed") @@ -722,10 +727,10 @@ func (s *PersisterTestSuite) TestDetermineNetwork() { func (s *PersisterTestSuite) TestFindGrantedAndRememberedConsentRequests() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sessionID := uuid.Must(uuid.NewV4()).String() - client := &client.Client{OutfacingID: "client-id"} - f := newFlow(s.t1NID, client.OutfacingID, "sub", sqlxx.NullString(sessionID)) + client := &client.Client{LegacyClientID: "client-id"} + f := newFlow(s.t1NID, client.LegacyClientID, "sub", sqlxx.NullString(sessionID)) require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) require.NoError(t, r.Persister().CreateClient(s.t1, client)) require.NoError(t, r.Persister().Connection(context.Background()).Create(f)) @@ -747,11 +752,11 @@ func (s *PersisterTestSuite) TestFindGrantedAndRememberedConsentRequests() { _, err := r.Persister().HandleConsentRequest(s.t1, hcr) require.NoError(t, err) - actual, err := r.Persister().FindGrantedAndRememberedConsentRequests(s.t2, client.OutfacingID, f.Subject) + actual, err := r.Persister().FindGrantedAndRememberedConsentRequests(s.t2, client.LegacyClientID, f.Subject) require.Error(t, err) require.Equal(t, 0, len(actual)) - actual, err = r.Persister().FindGrantedAndRememberedConsentRequests(s.t1, client.OutfacingID, f.Subject) + actual, err = r.Persister().FindGrantedAndRememberedConsentRequests(s.t1, client.LegacyClientID, f.Subject) require.NoError(t, err) require.Equal(t, 1, len(actual)) }) @@ -761,10 +766,10 @@ func (s *PersisterTestSuite) TestFindGrantedAndRememberedConsentRequests() { func (s *PersisterTestSuite) TestFindSubjectsGrantedConsentRequests() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sessionID := uuid.Must(uuid.NewV4()).String() - client := &client.Client{OutfacingID: "client-id"} - f := newFlow(s.t1NID, client.OutfacingID, "sub", sqlxx.NullString(sessionID)) + client := &client.Client{LegacyClientID: "client-id"} + f := newFlow(s.t1NID, client.LegacyClientID, "sub", sqlxx.NullString(sessionID)) require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) require.NoError(t, r.Persister().CreateClient(s.t1, client)) require.NoError(t, r.Persister().Connection(context.Background()).Create(f)) @@ -800,13 +805,13 @@ func (s *PersisterTestSuite) TestFindSubjectsGrantedConsentRequests() { func (s *PersisterTestSuite) TestFlushInactiveAccessTokens() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) sig := uuid.Must(uuid.NewV4()).String() fr := fosite.NewRequest() fr.RequestedAt = time.Now().UTC().Add(-24 * time.Hour) - fr.Client = &fosite.DefaultClient{ID: client.OutfacingID} + fr.Client = &fosite.DefaultClient{ID: client.LegacyClientID} require.NoError(t, r.Persister().CreateAccessTokenSession(s.t1, sig, fr)) actual := persistencesql.OAuth2RequestSQL{Table: "access"} @@ -822,7 +827,7 @@ func (s *PersisterTestSuite) TestFlushInactiveAccessTokens() { func (s *PersisterTestSuite) TestGenerateAndPersistKeySet() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { store, ok := r.OAuth2Storage().(*persistencesql.Persister) if !ok { t.Fatal("type assertion failed") @@ -841,7 +846,7 @@ func (s *PersisterTestSuite) TestGenerateAndPersistKeySet() { func (s *PersisterTestSuite) TestFlushInactiveGrants() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ks := newKeySet("ks-id", "use") grant := trust.Grant{ ID: uuid.Must(uuid.NewV4()).String(), @@ -863,10 +868,10 @@ func (s *PersisterTestSuite) TestFlushInactiveGrants() { func (s *PersisterTestSuite) TestFlushInactiveLoginConsentRequests() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sessionID := uuid.Must(uuid.NewV4()).String() - client := &client.Client{OutfacingID: "client-id"} - f := newFlow(s.t1NID, client.OutfacingID, "sub", sqlxx.NullString(sessionID)) + client := &client.Client{LegacyClientID: "client-id"} + f := newFlow(s.t1NID, client.LegacyClientID, "sub", sqlxx.NullString(sessionID)) f.RequestedAt = time.Now().Add(-24 * time.Hour) require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) require.NoError(t, r.Persister().CreateClient(s.t1, client)) @@ -885,8 +890,8 @@ func (s *PersisterTestSuite) TestFlushInactiveLoginConsentRequests() { func (s *PersisterTestSuite) TestFlushInactiveRefreshTokens() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} request := fosite.NewRequest() request.RequestedAt = time.Now().Add(-240 * 365 * time.Hour) request.Client = &fosite.DefaultClient{ID: "client-id"} @@ -908,12 +913,12 @@ func (s *PersisterTestSuite) TestFlushInactiveRefreshTokens() { func (s *PersisterTestSuite) TestGetAccessTokenSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) sig := uuid.Must(uuid.NewV4()).String() fr := fosite.NewRequest() - fr.Client = &fosite.DefaultClient{ID: client.OutfacingID} + fr.Client = &fosite.DefaultClient{ID: client.LegacyClientID} require.NoError(t, r.Persister().CreateAccessTokenSession(s.t1, sig, fr)) actual, err := r.Persister().GetAccessTokenSession(s.t2, sig, &fosite.DefaultSession{}) @@ -929,12 +934,12 @@ func (s *PersisterTestSuite) TestGetAccessTokenSession() { func (s *PersisterTestSuite) TestGetAuthorizeCodeSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) sig := uuid.Must(uuid.NewV4()).String() fr := fosite.NewRequest() - fr.Client = &fosite.DefaultClient{ID: client.OutfacingID} + fr.Client = &fosite.DefaultClient{ID: client.LegacyClientID} require.NoError(t, r.Persister().CreateAuthorizeCodeSession(s.t1, sig, fr)) actual, err := r.Persister().GetAuthorizeCodeSession(s.t2, sig, &fosite.DefaultSession{}) @@ -950,16 +955,16 @@ func (s *PersisterTestSuite) TestGetAuthorizeCodeSession() { func (s *PersisterTestSuite) TestGetClient() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - expected := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + expected := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, expected)) - actual, err := r.Persister().GetClient(s.t2, expected.OutfacingID) + actual, err := r.Persister().GetClient(s.t2, expected.LegacyClientID) require.Error(t, err) - require.Equal(t, "", actual.GetID()) - actual, err = r.Persister().GetClient(s.t1, expected.OutfacingID) + require.Equal(t, uuid.Nil.String(), actual.GetID()) + actual, err = r.Persister().GetClient(s.t1, expected.LegacyClientID) require.NoError(t, err) - require.Equal(t, expected.OutfacingID, actual.GetID()) + require.Equal(t, expected.LegacyClientID, actual.GetID()) }) } } @@ -967,7 +972,7 @@ func (s *PersisterTestSuite) TestGetClient() { func (s *PersisterTestSuite) TestGetClientAssertionJWT() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { store, ok := r.OAuth2Storage().(oauth2.AssertionJWTReader) if !ok { t.Fatal("type assertion failed") @@ -986,8 +991,8 @@ func (s *PersisterTestSuite) TestGetClientAssertionJWT() { func (s *PersisterTestSuite) TestGetClients() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - c := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + c := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, c)) actual, err := r.Persister().GetClients(s.t2, client.Filter{Offset: 0, Limit: 100}) @@ -1003,16 +1008,16 @@ func (s *PersisterTestSuite) TestGetClients() { func (s *PersisterTestSuite) TestGetConcreteClient() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - expected := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + expected := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, expected)) - actual, err := r.Persister().GetConcreteClient(s.t2, expected.OutfacingID) + actual, err := r.Persister().GetConcreteClient(s.t2, expected.LegacyClientID) require.Error(t, err) - require.Equal(t, "", actual.GetID()) - actual, err = r.Persister().GetConcreteClient(s.t1, expected.OutfacingID) + require.Equal(t, uuid.Nil.String(), actual.GetID()) + actual, err = r.Persister().GetConcreteClient(s.t1, expected.LegacyClientID) require.NoError(t, err) - require.Equal(t, expected.OutfacingID, actual.GetID()) + require.Equal(t, expected.LegacyClientID, actual.GetID()) }) } } @@ -1020,7 +1025,7 @@ func (s *PersisterTestSuite) TestGetConcreteClient() { func (s *PersisterTestSuite) TestGetConcreteGrant() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ks := newKeySet("ks-id", "use") grant := trust.Grant{ ID: uuid.Must(uuid.NewV4()).String(), @@ -1044,10 +1049,10 @@ func (s *PersisterTestSuite) TestGetConcreteGrant() { func (s *PersisterTestSuite) TestGetConsentRequest() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sessionID := uuid.Must(uuid.NewV4()).String() - client := &client.Client{OutfacingID: "client-id"} - f := newFlow(s.t1NID, client.OutfacingID, "sub", sqlxx.NullString(sessionID)) + client := &client.Client{LegacyClientID: "client-id"} + f := newFlow(s.t1NID, client.LegacyClientID, "sub", sqlxx.NullString(sessionID)) require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) require.NoError(t, r.Persister().CreateClient(s.t1, client)) require.NoError(t, r.Persister().Connection(context.Background()).Create(f)) @@ -1075,10 +1080,10 @@ func (s *PersisterTestSuite) TestGetConsentRequest() { func (s *PersisterTestSuite) TestGetFlow() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sessionID := uuid.Must(uuid.NewV4()).String() - client := &client.Client{OutfacingID: "client-id"} - f := newFlow(s.t1NID, client.OutfacingID, "sub", sqlxx.NullString(sessionID)) + client := &client.Client{LegacyClientID: "client-id"} + f := newFlow(s.t1NID, client.LegacyClientID, "sub", sqlxx.NullString(sessionID)) require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) require.NoError(t, r.Persister().CreateClient(s.t1, client)) require.NoError(t, r.Persister().Connection(context.Background()).Create(f)) @@ -1100,10 +1105,10 @@ func (s *PersisterTestSuite) TestGetFlow() { func (s *PersisterTestSuite) TestGetFlowByConsentChallenge() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sessionID := uuid.Must(uuid.NewV4()).String() - client := &client.Client{OutfacingID: "client-id"} - f := newFlow(s.t1NID, client.OutfacingID, "sub", sqlxx.NullString(sessionID)) + client := &client.Client{LegacyClientID: "client-id"} + f := newFlow(s.t1NID, client.LegacyClientID, "sub", sqlxx.NullString(sessionID)) require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) require.NoError(t, r.Persister().CreateClient(s.t1, client)) require.NoError(t, r.Persister().Connection(context.Background()).Create(f)) @@ -1125,17 +1130,17 @@ func (s *PersisterTestSuite) TestGetFlowByConsentChallenge() { func (s *PersisterTestSuite) TestGetForcedObfuscatedLoginSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} - session := &consent.ForcedObfuscatedLoginSession{ClientID: client.OutfacingID} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} + session := &consent.ForcedObfuscatedLoginSession{ClientID: client.LegacyClientID} require.NoError(t, r.Persister().CreateClient(s.t1, client)) require.NoError(t, r.Persister().CreateForcedObfuscatedLoginSession(s.t1, session)) - actual, err := r.Persister().GetForcedObfuscatedLoginSession(s.t2, client.OutfacingID, "") + actual, err := r.Persister().GetForcedObfuscatedLoginSession(s.t2, client.LegacyClientID, "") require.Error(t, err) require.Nil(t, actual) - actual, err = r.Persister().GetForcedObfuscatedLoginSession(s.t1, client.OutfacingID, "") + actual, err = r.Persister().GetForcedObfuscatedLoginSession(s.t1, client.LegacyClientID, "") require.NoError(t, err) require.NotNil(t, actual) }) @@ -1145,7 +1150,7 @@ func (s *PersisterTestSuite) TestGetForcedObfuscatedLoginSession() { func (s *PersisterTestSuite) TestGetGrants() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ks := newKeySet("ks-id", "use") grant := trust.Grant{ ID: uuid.Must(uuid.NewV4()).String(), @@ -1169,9 +1174,9 @@ func (s *PersisterTestSuite) TestGetGrants() { func (s *PersisterTestSuite) TestGetLoginRequest() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} - lr := consent.LoginRequest{ID: "lr-id", ClientID: client.OutfacingID, RequestedAt: time.Now()} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} + lr := consent.LoginRequest{ID: "lr-id", ClientID: client.LegacyClientID, RequestedAt: time.Now()} require.NoError(t, r.Persister().CreateClient(s.t1, client)) require.NoError(t, r.ConsentManager().CreateLoginRequest(s.t1, &lr)) @@ -1193,11 +1198,11 @@ func (s *PersisterTestSuite) TestGetLoginRequest() { func (s *PersisterTestSuite) TestGetLogoutRequest() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} lr := consent.LogoutRequest{ ID: uuid.Must(uuid.NewV4()).String(), - ClientID: sql.NullString{Valid: true, String: client.OutfacingID}, + ClientID: sql.NullString{Valid: true, String: client.LegacyClientID}, } require.NoError(t, r.Persister().CreateClient(s.t1, client)) @@ -1217,8 +1222,8 @@ func (s *PersisterTestSuite) TestGetLogoutRequest() { func (s *PersisterTestSuite) TestGetOpenIDConnectSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} request := fosite.NewRequest() request.SetID("request-id") request.Client = &fosite.DefaultClient{ID: "client-id"} @@ -1240,8 +1245,8 @@ func (s *PersisterTestSuite) TestGetOpenIDConnectSession() { func (s *PersisterTestSuite) TestGetPKCERequestSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} request := fosite.NewRequest() request.SetID("request-id") request.Client = &fosite.DefaultClient{ID: "client-id"} @@ -1263,7 +1268,7 @@ func (s *PersisterTestSuite) TestGetPKCERequestSession() { func (s *PersisterTestSuite) TestGetPublicKey() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ks := newKeySet("ks-id", "use") grant := trust.Grant{ ID: uuid.Must(uuid.NewV4()).String(), @@ -1287,7 +1292,7 @@ func (s *PersisterTestSuite) TestGetPublicKey() { func (s *PersisterTestSuite) TestGetPublicKeyScopes() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ks := newKeySet("ks-id", "use") grant := trust.Grant{ ID: uuid.Must(uuid.NewV4()).String(), @@ -1312,7 +1317,7 @@ func (s *PersisterTestSuite) TestGetPublicKeyScopes() { func (s *PersisterTestSuite) TestGetPublicKeys() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ks := newKeySet("ks-id", "use") grant := trust.Grant{ ID: uuid.Must(uuid.NewV4()).String(), @@ -1336,8 +1341,8 @@ func (s *PersisterTestSuite) TestGetPublicKeys() { func (s *PersisterTestSuite) TestGetRefreshTokenSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} request := fosite.NewRequest() request.SetID("request-id") request.Client = &fosite.DefaultClient{ID: "client-id"} @@ -1359,7 +1364,7 @@ func (s *PersisterTestSuite) TestGetRefreshTokenSession() { func (s *PersisterTestSuite) TestGetRememberedLoginSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { ls := consent.LoginSession{ID: uuid.Must(uuid.NewV4()).String(), Remember: true} require.NoError(t, r.Persister().CreateLoginSession(s.t1, &ls)) @@ -1377,13 +1382,14 @@ func (s *PersisterTestSuite) TestGetRememberedLoginSession() { func (s *PersisterTestSuite) TestHandleConsentRequest() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sessionID := uuid.Must(uuid.NewV4()).String() - client := &client.Client{OutfacingID: "client-id"} - f := newFlow(s.t1NID, client.OutfacingID, "sub", sqlxx.NullString(sessionID)) + c1 := &client.Client{LegacyClientID: uuidx.NewV4().String()} + f := newFlow(s.t1NID, c1.LegacyClientID, "sub", sqlxx.NullString(sessionID)) require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) - require.NoError(t, r.Persister().CreateClient(s.t1, client)) - require.NoError(t, r.Persister().CreateClient(s.t2, client)) + require.NoError(t, r.Persister().CreateClient(s.t1, c1)) + c1.ID = uuid.Nil + require.NoError(t, r.Persister().CreateClient(s.t2, c1)) require.NoError(t, r.Persister().Connection(context.Background()).Create(f)) req := &consent.ConsentRequest{ @@ -1404,14 +1410,14 @@ func (s *PersisterTestSuite) TestHandleConsentRequest() { actualCR, err := r.Persister().HandleConsentRequest(s.t2, hcr) require.Error(t, err) require.Nil(t, actualCR) - actual, err := r.Persister().FindGrantedAndRememberedConsentRequests(s.t1, client.OutfacingID, f.Subject) + actual, err := r.Persister().FindGrantedAndRememberedConsentRequests(s.t1, c1.LegacyClientID, f.Subject) require.Error(t, err) require.Equal(t, 0, len(actual)) actualCR, err = r.Persister().HandleConsentRequest(s.t1, hcr) require.NoError(t, err) require.NotNil(t, actualCR) - actual, err = r.Persister().FindGrantedAndRememberedConsentRequests(s.t1, client.OutfacingID, f.Subject) + actual, err = r.Persister().FindGrantedAndRememberedConsentRequests(s.t1, c1.LegacyClientID, f.Subject) require.NoError(t, err) require.Equal(t, 1, len(actual)) }) @@ -1421,13 +1427,14 @@ func (s *PersisterTestSuite) TestHandleConsentRequest() { func (s *PersisterTestSuite) TestInvalidateAuthorizeCodeSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: uuidx.NewV4().String()} require.NoError(t, r.Persister().CreateClient(s.t1, client)) + client.ID = uuid.Nil require.NoError(t, r.Persister().CreateClient(s.t2, client)) sig := uuid.Must(uuid.NewV4()).String() fr := fosite.NewRequest() - fr.Client = &fosite.DefaultClient{ID: client.OutfacingID} + fr.Client = &fosite.DefaultClient{ID: client.LegacyClientID} require.NoError(t, r.Persister().CreateAuthorizeCodeSession(s.t1, sig, fr)) require.NoError(t, r.Persister().InvalidateAuthorizeCodeSession(s.t2, sig)) @@ -1446,7 +1453,7 @@ func (s *PersisterTestSuite) TestInvalidateAuthorizeCodeSession() { func (s *PersisterTestSuite) TestIsJWTUsed() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { jti := oauth2.NewBlacklistedJTI(uuid.Must(uuid.NewV4()).String(), time.Now().Add(24*time.Hour)) require.NoError(t, r.Persister().SetClientAssertionJWT(s.t1, jti.JTI, jti.Expiry)) @@ -1464,24 +1471,25 @@ func (s *PersisterTestSuite) TestIsJWTUsed() { func (s *PersisterTestSuite) TestListUserAuthenticatedClientsWithBackChannelLogout() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - c1 := &client.Client{OutfacingID: "client-1", BackChannelLogoutURI: "not-null"} - c2 := &client.Client{OutfacingID: "client-2", BackChannelLogoutURI: "not-null"} + t.Run(k, func(t *testing.T) { + c1 := &client.Client{LegacyClientID: "client-1", BackChannelLogoutURI: "not-null"} + c2 := &client.Client{LegacyClientID: "client-2", BackChannelLogoutURI: "not-null"} require.NoError(t, r.Persister().CreateClient(s.t1, c1)) + c1.ID = uuid.Nil require.NoError(t, r.Persister().CreateClient(s.t2, c1)) require.NoError(t, r.Persister().CreateClient(s.t2, c2)) - t1f1 := newFlow(s.t1NID, c1.OutfacingID, "sub", sqlxx.NullString(uuid.Must(uuid.NewV4()).String())) + t1f1 := newFlow(s.t1NID, c1.LegacyClientID, "sub", sqlxx.NullString(uuid.Must(uuid.NewV4()).String())) t1f1.ConsentChallengeID = "t1f1-consent-challenge" t1f1.LoginVerifier = "t1f1-login-verifier" t1f1.ConsentVerifier = "t1f1-consent-verifier" - t2f1 := newFlow(s.t2NID, c1.OutfacingID, "sub", t1f1.SessionID) + t2f1 := newFlow(s.t2NID, c1.LegacyClientID, "sub", t1f1.SessionID) t2f1.ConsentChallengeID = "t2f1-consent-challenge" t2f1.LoginVerifier = "t2f1-login-verifier" t2f1.ConsentVerifier = "t2f1-consent-verifier" - t2f2 := newFlow(s.t2NID, c2.OutfacingID, "sub", t1f1.SessionID) + t2f2 := newFlow(s.t2NID, c2.LegacyClientID, "sub", t1f1.SessionID) t2f2.ConsentChallengeID = "t2f2-consent-challenge" t2f2.LoginVerifier = "t2f2-login-verifier" t2f2.ConsentVerifier = "t2f2-consent-verifier" @@ -1517,24 +1525,25 @@ func (s *PersisterTestSuite) TestListUserAuthenticatedClientsWithBackChannelLogo func (s *PersisterTestSuite) TestListUserAuthenticatedClientsWithFrontChannelLogout() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - c1 := &client.Client{OutfacingID: "client-1", FrontChannelLogoutURI: "not-null"} - c2 := &client.Client{OutfacingID: "client-2", FrontChannelLogoutURI: "not-null"} + t.Run(k, func(t *testing.T) { + c1 := &client.Client{LegacyClientID: "client-1", FrontChannelLogoutURI: "not-null"} + c2 := &client.Client{LegacyClientID: "client-2", FrontChannelLogoutURI: "not-null"} require.NoError(t, r.Persister().CreateClient(s.t1, c1)) + c1.ID = uuid.Nil require.NoError(t, r.Persister().CreateClient(s.t2, c1)) require.NoError(t, r.Persister().CreateClient(s.t2, c2)) - t1f1 := newFlow(s.t1NID, c1.OutfacingID, "sub", sqlxx.NullString(uuid.Must(uuid.NewV4()).String())) + t1f1 := newFlow(s.t1NID, c1.LegacyClientID, "sub", sqlxx.NullString(uuid.Must(uuid.NewV4()).String())) t1f1.ConsentChallengeID = "t1f1-consent-challenge" t1f1.LoginVerifier = "t1f1-login-verifier" t1f1.ConsentVerifier = "t1f1-consent-verifier" - t2f1 := newFlow(s.t2NID, c1.OutfacingID, "sub", t1f1.SessionID) + t2f1 := newFlow(s.t2NID, c1.LegacyClientID, "sub", t1f1.SessionID) t2f1.ConsentChallengeID = "t2f1-consent-challenge" t2f1.LoginVerifier = "t2f1-login-verifier" t2f1.ConsentVerifier = "t2f1-consent-verifier" - t2f2 := newFlow(s.t2NID, c2.OutfacingID, "sub", t1f1.SessionID) + t2f2 := newFlow(s.t2NID, c2.LegacyClientID, "sub", t1f1.SessionID) t2f2.ConsentChallengeID = "t2f2-consent-challenge" t2f2.LoginVerifier = "t2f2-login-verifier" t2f2.ConsentVerifier = "t2f2-consent-verifier" @@ -1570,7 +1579,7 @@ func (s *PersisterTestSuite) TestListUserAuthenticatedClientsWithFrontChannelLog func (s *PersisterTestSuite) TestMarkJWTUsedForTime() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { r.Persister().SetClientAssertionJWT(s.t1, "a", time.Now().Add(-24*time.Hour)) r.Persister().SetClientAssertionJWT(s.t2, "a", time.Now().Add(-24*time.Hour)) r.Persister().SetClientAssertionJWT(s.t2, "b", time.Now().Add(-24*time.Hour)) @@ -1595,8 +1604,8 @@ func (s *PersisterTestSuite) TestMarkJWTUsedForTime() { func (s *PersisterTestSuite) TestQueryWithNetwork() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - r.Persister().CreateClient(s.t1, &client.Client{OutfacingID: "client-1", FrontChannelLogoutURI: "not-null"}) + t.Run(k, func(t *testing.T) { + r.Persister().CreateClient(s.t1, &client.Client{LegacyClientID: "client-1", FrontChannelLogoutURI: "not-null"}) store, ok := r.Persister().(*persistencesql.Persister) if !ok { @@ -1615,7 +1624,7 @@ func (s *PersisterTestSuite) TestQueryWithNetwork() { func (s *PersisterTestSuite) TestRejectLogoutRequest() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { lr := newLogoutRequest() require.NoError(t, r.ConsentManager().CreateLogoutRequest(s.t1, lr)) @@ -1635,12 +1644,12 @@ func (s *PersisterTestSuite) TestRejectLogoutRequest() { func (s *PersisterTestSuite) TestRevokeAccessToken() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) sig := uuid.Must(uuid.NewV4()).String() fr := fosite.NewRequest() - fr.Client = &fosite.DefaultClient{ID: client.OutfacingID} + fr.Client = &fosite.DefaultClient{ID: client.LegacyClientID} require.NoError(t, r.Persister().CreateAccessTokenSession(s.t1, sig, fr)) require.NoError(t, r.Persister().RevokeAccessToken(s.t2, fr.ID)) @@ -1657,8 +1666,8 @@ func (s *PersisterTestSuite) TestRevokeAccessToken() { func (s *PersisterTestSuite) TestRevokeRefreshToken() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) request := fosite.NewRequest() @@ -1682,8 +1691,8 @@ func (s *PersisterTestSuite) TestRevokeRefreshToken() { func (s *PersisterTestSuite) TestRevokeRefreshTokenMaybeGracePeriod() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - client := &client.Client{OutfacingID: "client-id"} + t.Run(k, func(t *testing.T) { + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) request := fosite.NewRequest() @@ -1712,10 +1721,10 @@ func (s *PersisterTestSuite) TestRevokeRefreshTokenMaybeGracePeriod() { func (s *PersisterTestSuite) TestRevokeSubjectClientConsentSession() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sessionID := uuid.Must(uuid.NewV4()).String() - client := &client.Client{OutfacingID: "client-id"} - f := newFlow(s.t1NID, client.OutfacingID, "sub", sqlxx.NullString(sessionID)) + client := &client.Client{LegacyClientID: "client-id"} + f := newFlow(s.t1NID, client.LegacyClientID, "sub", sqlxx.NullString(sessionID)) f.RequestedAt = time.Now().Add(-24 * time.Hour) require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) require.NoError(t, r.Persister().CreateClient(s.t1, client)) @@ -1723,9 +1732,9 @@ func (s *PersisterTestSuite) TestRevokeSubjectClientConsentSession() { actual := flow.Flow{} - require.Error(t, r.Persister().RevokeSubjectClientConsentSession(s.t2, "sub", client.OutfacingID)) + require.Error(t, r.Persister().RevokeSubjectClientConsentSession(s.t2, "sub", client.LegacyClientID)) require.NoError(t, r.Persister().Connection(context.Background()).Find(&actual, f.ID)) - require.NoError(t, r.Persister().RevokeSubjectClientConsentSession(s.t1, "sub", client.OutfacingID)) + require.NoError(t, r.Persister().RevokeSubjectClientConsentSession(s.t1, "sub", client.LegacyClientID)) require.Error(t, r.Persister().Connection(context.Background()).Find(&actual, f.ID)) }) } @@ -1734,7 +1743,7 @@ func (s *PersisterTestSuite) TestRevokeSubjectClientConsentSession() { func (s *PersisterTestSuite) TestSetClientAssertionJWT() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { jti := oauth2.NewBlacklistedJTI(uuid.Must(uuid.NewV4()).String(), time.Now().Add(24*time.Hour)) require.NoError(t, r.Persister().SetClientAssertionJWT(s.t1, jti.JTI, jti.Expiry)) @@ -1748,7 +1757,7 @@ func (s *PersisterTestSuite) TestSetClientAssertionJWT() { func (s *PersisterTestSuite) TestSetClientAssertionJWTRaw() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { store, ok := r.Persister().(*persistencesql.Persister) if !ok { t.Fatal("type assertion failed") @@ -1767,9 +1776,9 @@ func (s *PersisterTestSuite) TestSetClientAssertionJWTRaw() { func (s *PersisterTestSuite) TestUpdateClient() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - t1c1 := &client.Client{OutfacingID: "client-id", Name: "original", Secret: "original-secret"} - t2c1 := &client.Client{OutfacingID: "client-id", Name: "original", Secret: "original-secret"} + t.Run(k, func(t *testing.T) { + t1c1 := &client.Client{LegacyClientID: "client-id", Name: "original", Secret: "original-secret"} + t2c1 := &client.Client{LegacyClientID: "client-id", Name: "original", Secret: "original-secret"} require.NoError(t, r.Persister().CreateClient(s.t1, t1c1)) require.NoError(t, r.Persister().CreateClient(s.t2, t2c1)) expectedHash := t1c1.Secret @@ -1856,9 +1865,9 @@ func (s *PersisterTestSuite) TestUpdateKeySet() { func (s *PersisterTestSuite) TestUpdateWithNetwork() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { - t1c1 := &client.Client{OutfacingID: "client-id", Name: "original", Secret: "original-secret"} - t2c1 := &client.Client{OutfacingID: "client-id", Name: "original", Secret: "original-secret", Owner: "erase-me"} + t.Run(k, func(t *testing.T) { + t1c1 := &client.Client{LegacyClientID: "client-id", Name: "original", Secret: "original-secret"} + t2c1 := &client.Client{LegacyClientID: "client-id", Name: "original", Secret: "original-secret", Owner: "erase-me"} require.NoError(t, r.Persister().CreateClient(s.t1, t1c1)) require.NoError(t, r.Persister().CreateClient(s.t2, t2c1)) @@ -1867,7 +1876,7 @@ func (s *PersisterTestSuite) TestUpdateWithNetwork() { t.Fatal("type assertion failed") } - count, err := store.UpdateWithNetwork(s.t1, &client.Client{ID: t1c1.ID, OutfacingID: "client-id", Name: "updated", Secret: "original-secret"}) + count, err := store.UpdateWithNetwork(s.t1, &client.Client{ID: t1c1.ID, LegacyClientID: "client-id", Name: "updated", Secret: "original-secret"}) require.NoError(t, err) require.Equal(t, int64(1), count) actualt1, err := store.GetConcreteClient(s.t1, "client-id") @@ -1885,13 +1894,13 @@ func (s *PersisterTestSuite) TestUpdateWithNetwork() { func (s *PersisterTestSuite) TestVerifyAndInvalidateConsentRequest() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sub := uuid.Must(uuid.NewV4()).String() sessionID := uuid.Must(uuid.NewV4()).String() require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) - client := &client.Client{OutfacingID: "client-id"} + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) - f := newFlow(s.t1NID, client.OutfacingID, sub, sqlxx.NullString(sessionID)) + f := newFlow(s.t1NID, client.LegacyClientID, sub, sqlxx.NullString(sessionID)) f.ConsentSkip = false f.GrantedScope = sqlxx.StringSliceJSONFormat{} f.ConsentRemember = false @@ -1922,13 +1931,13 @@ func (s *PersisterTestSuite) TestVerifyAndInvalidateConsentRequest() { func (s *PersisterTestSuite) TestVerifyAndInvalidateLoginRequest() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { sub := uuid.Must(uuid.NewV4()).String() sessionID := uuid.Must(uuid.NewV4()).String() require.NoError(t, r.Persister().CreateLoginSession(s.t1, &consent.LoginSession{ID: sessionID})) - client := &client.Client{OutfacingID: "client-id"} + client := &client.Client{LegacyClientID: "client-id"} require.NoError(t, r.Persister().CreateClient(s.t1, client)) - f := newFlow(s.t1NID, client.OutfacingID, sub, sqlxx.NullString(sessionID)) + f := newFlow(s.t1NID, client.LegacyClientID, sub, sqlxx.NullString(sessionID)) f.State = flow.FlowStateLoginUnused require.NoError(t, r.Persister().Connection(context.Background()).Create(f)) @@ -1950,7 +1959,7 @@ func (s *PersisterTestSuite) TestVerifyAndInvalidateLoginRequest() { func (s *PersisterTestSuite) TestVerifyAndInvalidateLogoutRequest() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { lr := newLogoutRequest() lr.Verifier = uuid.Must(uuid.NewV4()).String() lr.Accepted = true @@ -1979,7 +1988,7 @@ func (s *PersisterTestSuite) TestVerifyAndInvalidateLogoutRequest() { func (s *PersisterTestSuite) TestWithFallbackNetworkID() { t := s.T() for k, r := range s.registries { - t.Run(k, func(*testing.T) { + t.Run(k, func(t *testing.T) { r.WithContextualizer(&contextx.Default{}) store, ok := r.Persister().(*persistencesql.Persister) if !ok { diff --git a/x/oauth2cors/cors_test.go b/x/oauth2cors/cors_test.go index 3d9e1119ad3..b47b2d7b61d 100644 --- a/x/oauth2cors/cors_test.go +++ b/x/oauth2cors/cors_test.go @@ -78,7 +78,7 @@ func TestOAuth2AwareCORSMiddleware(t *testing.T) { r.Config().MustSet(context.Background(), "serve.public.cors.allowed_origins", []string{"http://not-test-domain.com"}) // Ignore unique violations - _ = r.ClientManager().CreateClient(context.Background(), &client.Client{OutfacingID: "foo-2", Secret: "bar", AllowedCORSOrigins: []string{"http://not-foobar.com"}}) + _ = r.ClientManager().CreateClient(context.Background(), &client.Client{LegacyClientID: "foo-2", Secret: "bar", AllowedCORSOrigins: []string{"http://not-foobar.com"}}) }, code: http.StatusNotImplemented, header: http.Header{"Origin": {"http://foobar.com"}, "Authorization": {fmt.Sprintf("Basic %s", x.BasicAuth("foo-2", "bar"))}}, @@ -90,7 +90,7 @@ func TestOAuth2AwareCORSMiddleware(t *testing.T) { r.Config().MustSet(context.Background(), "serve.public.cors.enabled", true) // Ignore unique violations - _ = r.ClientManager().CreateClient(context.Background(), &client.Client{OutfacingID: "foo-3", Secret: "bar", AllowedCORSOrigins: []string{"http://foobar.com"}}) + _ = r.ClientManager().CreateClient(context.Background(), &client.Client{LegacyClientID: "foo-3", Secret: "bar", AllowedCORSOrigins: []string{"http://foobar.com"}}) }, code: http.StatusNotImplemented, header: http.Header{"Origin": {"http://foobar.com"}, "Authorization": {fmt.Sprintf("Basic %s", x.BasicAuth("foo-3", "bar"))}}, @@ -103,7 +103,7 @@ func TestOAuth2AwareCORSMiddleware(t *testing.T) { r.Config().MustSet(context.Background(), "serve.public.cors.allowed_origins", []string{}) // Ignore unique violations - _ = r.ClientManager().CreateClient(context.Background(), &client.Client{OutfacingID: "foo-3", Secret: "bar", AllowedCORSOrigins: []string{"http://foobar.com"}}) + _ = r.ClientManager().CreateClient(context.Background(), &client.Client{LegacyClientID: "foo-3", Secret: "bar", AllowedCORSOrigins: []string{"http://foobar.com"}}) }, code: http.StatusNotImplemented, header: http.Header{"Origin": {"http://foobar.com"}, "Authorization": {fmt.Sprintf("Basic %s", x.BasicAuth("foo-3", "bar"))}}, @@ -116,7 +116,7 @@ func TestOAuth2AwareCORSMiddleware(t *testing.T) { r.Config().MustSet(context.Background(), "serve.public.cors.allowed_origins", []string{}) // Ignore unique violations - _ = r.ClientManager().CreateClient(context.Background(), &client.Client{OutfacingID: "foo-4", Secret: "bar", AllowedCORSOrigins: []string{"http://*.foobar.com"}}) + _ = r.ClientManager().CreateClient(context.Background(), &client.Client{LegacyClientID: "foo-4", Secret: "bar", AllowedCORSOrigins: []string{"http://*.foobar.com"}}) }, code: http.StatusNotImplemented, header: http.Header{"Origin": {"http://foo.foobar.com"}, "Authorization": {fmt.Sprintf("Basic %s", x.BasicAuth("foo-4", "bar"))}}, @@ -129,7 +129,7 @@ func TestOAuth2AwareCORSMiddleware(t *testing.T) { r.Config().MustSet(context.Background(), "serve.public.cors.allowed_origins", []string{"*"}) // Ignore unique violations - _ = r.ClientManager().CreateClient(context.Background(), &client.Client{OutfacingID: "foo-5", Secret: "bar", AllowedCORSOrigins: []string{"http://barbar.com"}}) + _ = r.ClientManager().CreateClient(context.Background(), &client.Client{LegacyClientID: "foo-5", Secret: "bar", AllowedCORSOrigins: []string{"http://barbar.com"}}) }, code: http.StatusNotImplemented, header: http.Header{"Origin": {"*"}, "Authorization": {fmt.Sprintf("Basic %s", x.BasicAuth("foo-5", "bar"))}}, @@ -142,7 +142,7 @@ func TestOAuth2AwareCORSMiddleware(t *testing.T) { r.Config().MustSet(context.Background(), "serve.public.cors.allowed_origins", []string{"http://*.foobar.com"}) // Ignore unique violations - _ = r.ClientManager().CreateClient(context.Background(), &client.Client{OutfacingID: "foo-6", Secret: "bar", AllowedCORSOrigins: []string{"http://barbar.com"}}) + _ = r.ClientManager().CreateClient(context.Background(), &client.Client{LegacyClientID: "foo-6", Secret: "bar", AllowedCORSOrigins: []string{"http://barbar.com"}}) }, code: http.StatusNotImplemented, header: http.Header{"Origin": {"http://foo.foobar.com"}, "Authorization": {fmt.Sprintf("Basic %s", x.BasicAuth("foo-6", "bar"))}}, @@ -155,7 +155,7 @@ func TestOAuth2AwareCORSMiddleware(t *testing.T) { r.Config().MustSet(context.Background(), "serve.public.cors.allowed_origins", []string{"http://not-test-domain.com"}) // Ignore unique violations - _ = r.ClientManager().CreateClient(context.Background(), &client.Client{OutfacingID: "foo-7", Secret: "bar", AllowedCORSOrigins: []string{"*"}}) + _ = r.ClientManager().CreateClient(context.Background(), &client.Client{LegacyClientID: "foo-7", Secret: "bar", AllowedCORSOrigins: []string{"*"}}) }, code: http.StatusNotImplemented, header: http.Header{"Origin": {"http://foobar.com"}, "Authorization": {fmt.Sprintf("Basic %s", x.BasicAuth("foo-7", "bar"))}}, @@ -179,7 +179,7 @@ func TestOAuth2AwareCORSMiddleware(t *testing.T) { sess := oauth2.NewSession("foo-9") sess.SetExpiresAt(fosite.AccessToken, time.Now().Add(time.Hour)) ar := fosite.NewAccessRequest(sess) - cl := &client.Client{OutfacingID: "foo-9", Secret: "bar", AllowedCORSOrigins: []string{"http://foobar.com"}} + cl := &client.Client{LegacyClientID: "foo-9", Secret: "bar", AllowedCORSOrigins: []string{"http://foobar.com"}} ar.Client = cl // Ignore unique violations @@ -196,7 +196,7 @@ func TestOAuth2AwareCORSMiddleware(t *testing.T) { r.Config().MustSet(context.Background(), "serve.public.cors.enabled", true) // Ignore unique violations - _ = r.ClientManager().CreateClient(context.Background(), &client.Client{OutfacingID: "foo-11", Secret: "bar", AllowedCORSOrigins: []string{"*"}}) + _ = r.ClientManager().CreateClient(context.Background(), &client.Client{LegacyClientID: "foo-11", Secret: "bar", AllowedCORSOrigins: []string{"*"}}) r.Config().MustSet(context.Background(), "serve.public.cors.enabled", true) r.Config().MustSet(context.Background(), "serve.public.cors.allowed_origins", []string{"http://*", "https://*"}) }, @@ -211,7 +211,7 @@ func TestOAuth2AwareCORSMiddleware(t *testing.T) { r.Config().MustSet(context.Background(), "serve.public.cors.allowed_origins", []string{"http://**.example.com"}) // Ignore unique violations - _ = r.ClientManager().CreateClient(context.Background(), &client.Client{OutfacingID: "foo-12", Secret: "bar", AllowedCORSOrigins: []string{"http://myapp.example.biz"}}) + _ = r.ClientManager().CreateClient(context.Background(), &client.Client{LegacyClientID: "foo-12", Secret: "bar", AllowedCORSOrigins: []string{"http://myapp.example.biz"}}) }, code: http.StatusNotImplemented, header: http.Header{"Origin": {"http://myapp.example.biz"}, "Authorization": {fmt.Sprintf("Basic %s", x.BasicAuth("foo-12", "bar"))}}, @@ -224,7 +224,7 @@ func TestOAuth2AwareCORSMiddleware(t *testing.T) { r.Config().MustSet(context.Background(), "serve.public.cors.allowed_origins", []string{"http://**.example.com"}) // Ignore unique violations - _ = r.ClientManager().CreateClient(context.Background(), &client.Client{OutfacingID: "foo-13", Secret: "bar", AllowedCORSOrigins: []string{"http://myapp.example.biz"}}) + _ = r.ClientManager().CreateClient(context.Background(), &client.Client{LegacyClientID: "foo-13", Secret: "bar", AllowedCORSOrigins: []string{"http://myapp.example.biz"}}) }, code: http.StatusNotImplemented, header: http.Header{"Origin": {"http://client-app.example.com"}, "Authorization": {fmt.Sprintf("Basic %s", x.BasicAuth("foo-13", "bar"))}},