From 10713cc703457cb6f4a1b38482c836e54a0cb224 Mon Sep 17 00:00:00 2001 From: hackerman <3372410+aeneasr@users.noreply.github.com> Date: Wed, 5 Jul 2023 19:23:49 +0200 Subject: [PATCH] fix: increase size for request url (#3366) --- .../cccccccc-dda4-4700-9e42-35731f2af911.json | 17 +++++ .../68fb4010-84a9-4d1e-9f92-2705978ee891.json | 14 ++++ .../ef18b06e-4700-4021-9949-ef783cd86be1.json | 13 ++++ .../19ede218-928c-4e02-ab49-b76e12b34f32.json | 64 +++++++++++++++++++ .../7be6c72c-c868-4b61-a1f0-1130603665d1.json | 13 ++++ .../81f74e5d-1fa5-4e1b-a9bf-e95119260471.json | 13 ++++ .../testdata/20230705000000_testdata.sql | 64 +++++++++++++++++++ ...cookie_flow_request_url.cockroach.down.sql | 5 ++ ...000000001_cookie_flow_request_url.down.sql | 11 ++++ ...001_cookie_flow_request_url.mysql.down.sql | 11 ++++ ...00001_cookie_flow_request_url.mysql.up.sql | 5 ++ ...01_cookie_flow_request_url.sqlite.down.sql | 42 ++++++++++++ ...0001_cookie_flow_request_url.sqlite.up.sql | 27 ++++++++ ...00000000001_cookie_flow_request_url.up.sql | 5 ++ ...cookie_flow_request_url.cockroach.down.sql | 5 ++ ...000000002_cookie_flow_request_url.down.sql | 1 + 16 files changed, 310 insertions(+) create mode 100644 persistence/sql/migratest/fixtures/login_flow/cccccccc-dda4-4700-9e42-35731f2af911.json create mode 100644 persistence/sql/migratest/fixtures/recovery_flow/68fb4010-84a9-4d1e-9f92-2705978ee891.json create mode 100644 persistence/sql/migratest/fixtures/registration_flow/ef18b06e-4700-4021-9949-ef783cd86be1.json create mode 100644 persistence/sql/migratest/fixtures/settings_flow/19ede218-928c-4e02-ab49-b76e12b34f32.json create mode 100644 persistence/sql/migratest/fixtures/verification_flow/7be6c72c-c868-4b61-a1f0-1130603665d1.json create mode 100644 persistence/sql/migratest/fixtures/verification_flow/81f74e5d-1fa5-4e1b-a9bf-e95119260471.json create mode 100644 persistence/sql/migratest/testdata/20230705000000_testdata.sql create mode 100644 persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.cockroach.down.sql create mode 100644 persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.down.sql create mode 100644 persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.mysql.down.sql create mode 100644 persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.mysql.up.sql create mode 100644 persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.sqlite.down.sql create mode 100644 persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.sqlite.up.sql create mode 100644 persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.up.sql create mode 100644 persistence/sql/migrations/sql/20230705000000000002_cookie_flow_request_url.cockroach.down.sql create mode 100644 persistence/sql/migrations/sql/20230705000000000002_cookie_flow_request_url.down.sql diff --git a/persistence/sql/migratest/fixtures/login_flow/cccccccc-dda4-4700-9e42-35731f2af911.json b/persistence/sql/migratest/fixtures/login_flow/cccccccc-dda4-4700-9e42-35731f2af911.json new file mode 100644 index 000000000000..b3f93459b975 --- /dev/null +++ b/persistence/sql/migratest/fixtures/login_flow/cccccccc-dda4-4700-9e42-35731f2af911.json @@ -0,0 +1,17 @@ +{ + "id": "cccccccc-dda4-4700-9e42-35731f2af911", + "oauth2_login_challenge": "challenge data", + "type": "api", + "expires_at": "2013-10-07T08:23:19Z", + "issued_at": "2013-10-07T08:23:19Z", + "request_url": "http://kratos:4433/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login", + "ui": { + "action": "", + "method": "", + "nodes": null + }, + "created_at": "2013-10-07T08:23:19Z", + "updated_at": "2013-10-07T08:23:19Z", + "refresh": false, + "requested_aal": "aal1" +} diff --git a/persistence/sql/migratest/fixtures/recovery_flow/68fb4010-84a9-4d1e-9f92-2705978ee891.json b/persistence/sql/migratest/fixtures/recovery_flow/68fb4010-84a9-4d1e-9f92-2705978ee891.json new file mode 100644 index 000000000000..c6aa555b844e --- /dev/null +++ b/persistence/sql/migratest/fixtures/recovery_flow/68fb4010-84a9-4d1e-9f92-2705978ee891.json @@ -0,0 +1,14 @@ +{ + "id": "68fb4010-84a9-4d1e-9f92-2705978ee891", + "type": "api", + "expires_at": "2013-10-07T08:23:19Z", + "issued_at": "2013-10-07T08:23:19Z", + "request_url": "http://kratos:4433/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery", + "active": "link", + "ui": { + "action": "", + "method": "", + "nodes": null + }, + "state": "choose_method" +} diff --git a/persistence/sql/migratest/fixtures/registration_flow/ef18b06e-4700-4021-9949-ef783cd86be1.json b/persistence/sql/migratest/fixtures/registration_flow/ef18b06e-4700-4021-9949-ef783cd86be1.json new file mode 100644 index 000000000000..8947653d90e7 --- /dev/null +++ b/persistence/sql/migratest/fixtures/registration_flow/ef18b06e-4700-4021-9949-ef783cd86be1.json @@ -0,0 +1,13 @@ +{ + "id": "ef18b06e-4700-4021-9949-ef783cd86be1", + "type": "browser", + "expires_at": "2013-10-07T08:23:19Z", + "issued_at": "2013-10-07T08:23:19Z", + "request_url": "http://kratos:4433/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge=", + "active": "password", + "ui": { + "action": "", + "method": "", + "nodes": null + } +} diff --git a/persistence/sql/migratest/fixtures/settings_flow/19ede218-928c-4e02-ab49-b76e12b34f32.json b/persistence/sql/migratest/fixtures/settings_flow/19ede218-928c-4e02-ab49-b76e12b34f32.json new file mode 100644 index 000000000000..4c42c9c07cd4 --- /dev/null +++ b/persistence/sql/migratest/fixtures/settings_flow/19ede218-928c-4e02-ab49-b76e12b34f32.json @@ -0,0 +1,64 @@ +{ + "id": "19ede218-928c-4e02-ab49-b76e12b34f32", + "type": "browser", + "expires_at": "2013-10-07T08:23:19Z", + "issued_at": "2013-10-07T08:23:19Z", + "request_url": "http://kratos:4433/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings", + "active": "profile", + "ui": { + "action": "", + "method": "", + "nodes": null + }, + "identity": { + "id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e", + "schema_id": "default", + "schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA", + "state": "active", + "traits": { + "email": "foobar@ory.sh" + }, + "verifiable_addresses": [ + { + "id": "b2d59320-8564-4400-a39f-a22a497a23f1", + "value": "foobar+without-code@ory.sh", + "verified": false, + "via": "email", + "status": "pending", + "created_at": "2013-10-07T08:23:19Z", + "updated_at": "2013-10-07T08:23:19Z" + }, + { + "id": "c2427b6d-312b-46d9-9285-536db7ae11fd", + "value": "foobar@ory.sh", + "verified": false, + "via": "email", + "status": "pending", + "created_at": "2013-10-07T08:23:19Z", + "updated_at": "2013-10-07T08:23:19Z" + }, + { + "id": "d4718a67-aec2-418d-8173-6ebc7bde3b86", + "value": "foobar+11345642c6c0@ory.sh", + "verified": false, + "via": "email", + "status": "pending", + "created_at": "2013-10-07T08:23:19Z", + "updated_at": "2013-10-07T08:23:19Z" + } + ], + "recovery_addresses": [ + { + "id": "b8293f1c-010f-45d9-b809-f3fc5365ba80", + "value": "foobar@ory.sh", + "via": "email", + "created_at": "2013-10-07T08:23:19Z", + "updated_at": "2013-10-07T08:23:19Z" + } + ], + "metadata_public": null, + "created_at": "2013-10-07T08:23:19Z", + "updated_at": "2013-10-07T08:23:19Z" + }, + "state": "show_form" +} diff --git a/persistence/sql/migratest/fixtures/verification_flow/7be6c72c-c868-4b61-a1f0-1130603665d1.json b/persistence/sql/migratest/fixtures/verification_flow/7be6c72c-c868-4b61-a1f0-1130603665d1.json new file mode 100644 index 000000000000..6aac4a8a3a10 --- /dev/null +++ b/persistence/sql/migratest/fixtures/verification_flow/7be6c72c-c868-4b61-a1f0-1130603665d1.json @@ -0,0 +1,13 @@ +{ + "id": "7be6c72c-c868-4b61-a1f0-1130603665d1", + "type": "api", + "expires_at": "2013-10-07T08:23:19Z", + "issued_at": "2013-10-07T08:23:19Z", + "request_url": "http://kratos:4433/self-service/browser/flows/verification/email", + "ui": { + "action": "", + "method": "", + "nodes": null + }, + "state": "show_form" +} diff --git a/persistence/sql/migratest/fixtures/verification_flow/81f74e5d-1fa5-4e1b-a9bf-e95119260471.json b/persistence/sql/migratest/fixtures/verification_flow/81f74e5d-1fa5-4e1b-a9bf-e95119260471.json new file mode 100644 index 000000000000..d7ce014ff974 --- /dev/null +++ b/persistence/sql/migratest/fixtures/verification_flow/81f74e5d-1fa5-4e1b-a9bf-e95119260471.json @@ -0,0 +1,13 @@ +{ + "id": "81f74e5d-1fa5-4e1b-a9bf-e95119260471", + "type": "api", + "expires_at": "2022-11-03T08:23:19Z", + "issued_at": "2022-11-03T08:23:19Z", + "request_url": "http://kratos:4433/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email", + "ui": { + "action": "", + "method": "", + "nodes": null + }, + "state": "show_form" +} diff --git a/persistence/sql/migratest/testdata/20230705000000_testdata.sql b/persistence/sql/migratest/testdata/20230705000000_testdata.sql new file mode 100644 index 000000000000..69ffa56b67f8 --- /dev/null +++ b/persistence/sql/migratest/testdata/20230705000000_testdata.sql @@ -0,0 +1,64 @@ +INSERT INTO selfservice_login_flows (id, nid, request_url, issued_at, expires_at, active_method, csrf_token, created_at, + updated_at, forced, type, ui, internal_context, oauth2_login_challenge_data) +VALUES ('cccccccc-dda4-4700-9e42-35731f2af911', + '884f556e-eb3a-4b9f-bee3-11345642c6c0', + 'http://kratos:4433/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login/self-service/browser/flows/login', + '2013-10-07 08:23:19', '2013-10-07 08:23:19', '', + 'fpeVSZ9ZH7YvUkhXsOVEIssxbfauh5lcoQSYxTcN0XkMneg1L42h+HtvisjlNjBF4ElcD2jApCHoJYq2u9sVWg==', + '2013-10-07 08:23:19', '2013-10-07 08:23:19', false, 'api', '{}', '{"foo":"bar"}', 'challenge data'); + +INSERT INTO selfservice_verification_flows (id, + nid, + request_url, + issued_at, + expires_at, + csrf_token, + created_at, + updated_at, + type, + ui, + submit_count) +VALUES ('81f74e5d-1fa5-4e1b-a9bf-e95119260471', + '884f556e-eb3a-4b9f-bee3-11345642c6c0', + 'http://kratos:4433/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email/self-service/browser/flows/verification/email', + '2022-11-03 08:23:19', + '2022-11-03 08:23:19', + '8xoIMa1+UkDqTt+tIHmIEHztQkk0AWk2PJhWWYDmB6dSE+RtJinnxtwH5lNNCnYyQuCF2ugy7rWjCgiwYPJNOw==', + '2022-11-03 08:23:19', + '2022-11-03 08:23:19', + 'api', + '{}', + 0); + + +INSERT INTO selfservice_registration_flows (id, nid, request_url, issued_at, expires_at, active_method, csrf_token, + created_at, updated_at, type, ui, internal_context, oauth2_login_challenge) +VALUES ('ef18b06e-4700-4021-9949-ef783cd86be1', '884f556e-eb3a-4b9f-bee3-11345642c6c0', + 'http://kratos:4433/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge/self-service/browser/flows/registration?login_challenge=', + '2013-10-07 08:23:19', '2013-10-07 08:23:19', + 'password', 'vYYuhWXBfXKzBC+BlnbDmXfBKsUWY6SU/v04gHF9GYzPjFP51RXDPOc57R7Dpbf+XLkbPNAkmem33Crz/avdrw==', + '2013-10-07 08:23:19', '2013-10-07 08:23:19', 'browser', '{}', '{"foo":"bar"}', + '3caddfd5-9903-4bce-83ff-cae36f42dff7'); + +INSERT INTO selfservice_settings_flows (id, nid, request_url, issued_at, expires_at, state, identity_id, created_at, + updated_at, active_method, ui,internal_context) +VALUES ('19ede218-928c-4e02-ab49-b76e12b34f32', '884f556e-eb3a-4b9f-bee3-11345642c6c0', + 'http://kratos:4433/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings/self-service/browser/flows/settings', + '2013-10-07 08:23:19', '2013-10-07 08:23:19', 'show_form', 'a251ebc2-880c-4f76-a8f3-38e6940eab0e', + '2013-10-07 08:23:19', '2013-10-07 08:23:19', 'profile', '{}', '{}'); + +INSERT INTO selfservice_verification_flows (id, nid, request_url, issued_at, expires_at, csrf_token, created_at, + updated_at, type, ui) +VALUES ('7be6c72c-c868-4b61-a1f0-1130603665d1', '884f556e-eb3a-4b9f-bee3-11345642c6c0', + 'http://kratos:4433/self-service/browser/flows/verification/email', '2013-10-07 08:23:19', + '2013-10-07 08:23:19', + '8xoIMa1+UkDqTt+tIHmIEHztQkk0AWk2PJhWWYDmB6dSE+RtJinnxtwH5lNNCnYyQuCF2ugy7rWjCgiwYPJNOw==', + '2013-10-07 08:23:19', '2013-10-07 08:23:19', 'api', '{}'); + +INSERT INTO selfservice_recovery_flows (id, nid, request_url, issued_at, expires_at, active_method, csrf_token, state, + recovered_identity_id, created_at, updated_at, type, ui) +VALUES ('68fb4010-84a9-4d1e-9f92-2705978ee891', '884f556e-eb3a-4b9f-bee3-11345642c6c0', + 'http://kratos:4433/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery/self-service/browser/flows/recovery', + '2013-10-07 08:23:19', '2013-10-07 08:23:19', 'link', + 'vYYuhWXBfXKzBC+BlnbDmXfBKsUWY6SU/v04gHF9GYzPjFP51RXDPOc57R7Dpbf+XLkbPNAkmem33Crz/avdrw==', 'choose_method', + 'a251ebc2-880c-4f76-a8f3-38e6940eab0e', '2013-10-07 08:23:19', '2013-10-07 08:23:19', 'api', '{}'); diff --git a/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.cockroach.down.sql b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.cockroach.down.sql new file mode 100644 index 000000000000..34e58af5b64b --- /dev/null +++ b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.cockroach.down.sql @@ -0,0 +1,5 @@ +UPDATE selfservice_login_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_recovery_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_registration_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_settings_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_verification_flows SET request_url = substr(request_url, 1, 1024); diff --git a/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.down.sql b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.down.sql new file mode 100644 index 000000000000..75a516d8561a --- /dev/null +++ b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.down.sql @@ -0,0 +1,11 @@ +UPDATE selfservice_login_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_recovery_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_registration_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_settings_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_verification_flows SET request_url = substr(request_url, 1, 1024); + +ALTER TABLE selfservice_login_flows ALTER COLUMN request_url TYPE VARCHAR(1024); +ALTER TABLE selfservice_recovery_flows ALTER COLUMN request_url TYPE VARCHAR(1024); +ALTER TABLE selfservice_registration_flows ALTER COLUMN request_url TYPE VARCHAR(1024); +ALTER TABLE selfservice_settings_flows ALTER COLUMN request_url TYPE VARCHAR(1024); +ALTER TABLE selfservice_verification_flows ALTER COLUMN request_url TYPE VARCHAR(1024); diff --git a/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.mysql.down.sql b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.mysql.down.sql new file mode 100644 index 000000000000..cc09770d27a8 --- /dev/null +++ b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.mysql.down.sql @@ -0,0 +1,11 @@ +UPDATE selfservice_login_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_recovery_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_registration_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_settings_flows SET request_url = substr(request_url, 1, 1024); +UPDATE selfservice_verification_flows SET request_url = substr(request_url, 1, 1024); + +ALTER TABLE selfservice_login_flows MODIFY request_url VARCHAR(1024); +ALTER TABLE selfservice_recovery_flows MODIFY request_url VARCHAR(1024); +ALTER TABLE selfservice_registration_flows MODIFY request_url VARCHAR(1024); +ALTER TABLE selfservice_settings_flows MODIFY request_url VARCHAR(1024); +ALTER TABLE selfservice_verification_flows MODIFY request_url VARCHAR(1024); diff --git a/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.mysql.up.sql b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.mysql.up.sql new file mode 100644 index 000000000000..ca77f87e8d62 --- /dev/null +++ b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.mysql.up.sql @@ -0,0 +1,5 @@ +ALTER TABLE selfservice_login_flows MODIFY request_url TEXT; +ALTER TABLE selfservice_recovery_flows MODIFY request_url TEXT; +ALTER TABLE selfservice_registration_flows MODIFY request_url TEXT; +ALTER TABLE selfservice_settings_flows MODIFY request_url TEXT; +ALTER TABLE selfservice_verification_flows MODIFY request_url TEXT; diff --git a/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.sqlite.down.sql b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.sqlite.down.sql new file mode 100644 index 000000000000..a667b2b5cf52 --- /dev/null +++ b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.sqlite.down.sql @@ -0,0 +1,42 @@ +ALTER TABLE selfservice_login_flows + ADD COLUMN request_url_new VARCHAR(1024) NOT NULL DEFAULT ''; +ALTER TABLE selfservice_recovery_flows + ADD COLUMN request_url_new VARCHAR(1024) NOT NULL DEFAULT ''; +ALTER TABLE selfservice_registration_flows + ADD COLUMN request_url_new VARCHAR(1024) NOT NULL DEFAULT ''; +ALTER TABLE selfservice_settings_flows + ADD COLUMN request_url_new VARCHAR(1024) NOT NULL DEFAULT ''; +ALTER TABLE selfservice_verification_flows + ADD COLUMN request_url_new VARCHAR(1024) NOT NULL DEFAULT ''; + +UPDATE selfservice_login_flows +SET request_url_new = substr(request_url, 1, 1024); +UPDATE selfservice_recovery_flows +SET request_url_new = substr(request_url, 1, 1024); +UPDATE selfservice_registration_flows +SET request_url_new = substr(request_url, 1, 1024); +UPDATE selfservice_settings_flows +SET request_url_new = substr(request_url, 1, 1024); +UPDATE selfservice_verification_flows +SET request_url_new = substr(request_url, 1, 1024); + +ALTER TABLE selfservice_login_flows + DROP COLUMN request_url; +ALTER TABLE selfservice_login_flows RENAME COLUMN request_url_new TO request_url; + +ALTER TABLE selfservice_recovery_flows + DROP COLUMN request_url; +ALTER TABLE selfservice_recovery_flows RENAME COLUMN request_url_new TO request_url; + +ALTER TABLE selfservice_registration_flows + DROP COLUMN request_url; +ALTER TABLE selfservice_registration_flows RENAME COLUMN request_url_new TO request_url; + +ALTER TABLE selfservice_settings_flows + DROP COLUMN request_url; +ALTER TABLE selfservice_settings_flows RENAME COLUMN request_url_new TO request_url; + +ALTER TABLE selfservice_verification_flows + DROP COLUMN request_url; +ALTER TABLE selfservice_verification_flows RENAME COLUMN request_url_new TO request_url; + diff --git a/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.sqlite.up.sql b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.sqlite.up.sql new file mode 100644 index 000000000000..89d6581c3770 --- /dev/null +++ b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.sqlite.up.sql @@ -0,0 +1,27 @@ +ALTER TABLE selfservice_login_flows ADD COLUMN request_url_new TEXT NOT NULL DEFAULT ''; +ALTER TABLE selfservice_recovery_flows ADD COLUMN request_url_new TEXT NOT NULL DEFAULT ''; +ALTER TABLE selfservice_registration_flows ADD COLUMN request_url_new TEXT NOT NULL DEFAULT ''; +ALTER TABLE selfservice_settings_flows ADD COLUMN request_url_new TEXT NOT NULL DEFAULT ''; +ALTER TABLE selfservice_verification_flows ADD COLUMN request_url_new TEXT NOT NULL DEFAULT ''; + +UPDATE selfservice_login_flows SET request_url_new = request_url; +UPDATE selfservice_recovery_flows SET request_url_new = request_url; +UPDATE selfservice_registration_flows SET request_url_new = request_url; +UPDATE selfservice_settings_flows SET request_url_new = request_url; +UPDATE selfservice_verification_flows SET request_url_new = request_url; + +ALTER TABLE selfservice_login_flows DROP COLUMN request_url; +ALTER TABLE selfservice_login_flows RENAME COLUMN request_url_new TO request_url; + +ALTER TABLE selfservice_recovery_flows DROP COLUMN request_url; +ALTER TABLE selfservice_recovery_flows RENAME COLUMN request_url_new TO request_url; + +ALTER TABLE selfservice_registration_flows DROP COLUMN request_url; +ALTER TABLE selfservice_registration_flows RENAME COLUMN request_url_new TO request_url; + +ALTER TABLE selfservice_settings_flows DROP COLUMN request_url; +ALTER TABLE selfservice_settings_flows RENAME COLUMN request_url_new TO request_url; + +ALTER TABLE selfservice_verification_flows DROP COLUMN request_url; +ALTER TABLE selfservice_verification_flows RENAME COLUMN request_url_new TO request_url; + diff --git a/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.up.sql b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.up.sql new file mode 100644 index 000000000000..64a8dd83190f --- /dev/null +++ b/persistence/sql/migrations/sql/20230705000000000001_cookie_flow_request_url.up.sql @@ -0,0 +1,5 @@ +ALTER TABLE selfservice_login_flows ALTER COLUMN request_url TYPE TEXT; +ALTER TABLE selfservice_recovery_flows ALTER COLUMN request_url TYPE TEXT; +ALTER TABLE selfservice_registration_flows ALTER COLUMN request_url TYPE TEXT; +ALTER TABLE selfservice_settings_flows ALTER COLUMN request_url TYPE TEXT; +ALTER TABLE selfservice_verification_flows ALTER COLUMN request_url TYPE TEXT; diff --git a/persistence/sql/migrations/sql/20230705000000000002_cookie_flow_request_url.cockroach.down.sql b/persistence/sql/migrations/sql/20230705000000000002_cookie_flow_request_url.cockroach.down.sql new file mode 100644 index 000000000000..af709521a07a --- /dev/null +++ b/persistence/sql/migrations/sql/20230705000000000002_cookie_flow_request_url.cockroach.down.sql @@ -0,0 +1,5 @@ +ALTER TABLE selfservice_login_flows ALTER COLUMN request_url TYPE VARCHAR(1024); +ALTER TABLE selfservice_recovery_flows ALTER COLUMN request_url TYPE VARCHAR(1024); +ALTER TABLE selfservice_registration_flows ALTER COLUMN request_url TYPE VARCHAR(1024); +ALTER TABLE selfservice_settings_flows ALTER COLUMN request_url TYPE VARCHAR(1024); +ALTER TABLE selfservice_verification_flows ALTER COLUMN request_url TYPE VARCHAR(1024); diff --git a/persistence/sql/migrations/sql/20230705000000000002_cookie_flow_request_url.down.sql b/persistence/sql/migrations/sql/20230705000000000002_cookie_flow_request_url.down.sql new file mode 100644 index 000000000000..14e0ab5aae32 --- /dev/null +++ b/persistence/sql/migrations/sql/20230705000000000002_cookie_flow_request_url.down.sql @@ -0,0 +1 @@ +-- nothing to do