vaultwarden/migrations/postgresql
Mathijs van Veluw d297e274a3
Several SSO Fixes (#7163)
* Ensure SSO token is only usable on the same client

This commit adds an extra check via cookies to ensure the same browser/client is used to request and provide the SSO token.
Previously it would be able to provide a custom link which attackers could use to steal data.
While an attacker would still need the Master Password to be able to decrypt or execute specific actions, they were able to fetch encrypted data.

Solved with some help of Claude Code.

Signed-off-by: BlackDex <black.dex@gmail.com>

* Check email-verified on SSO login/create

This commit prevents possible account takeover via SSO which doesn't check/validate or provide validated status of the email.
It was checked at other locations, but was skipped here.

Signed-off-by: BlackDex <black.dex@gmail.com>

* Prevent data disclosure via SSO endpoints

This commit prevents some data disclosure and user enumeration by only returning the fake SSO identifier.
Since we do not check the identifier anywhere useful, returning the fake one is just fine.

During an invite to an org, that link contains the correct UUID and will be used for the master password requirements.
For anything else, server admins should set the `SSO_MASTER_PASSWORD_POLICY` env variable.

Signed-off-by: BlackDex <black.dex@gmail.com>

* Adjust admin layout to fix issues when SSO is enabled

Signed-off-by: BlackDex <black.dex@gmail.com>

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2026-04-29 22:25:36 +02:00
..
2019-09-12-100000_create_tables Adds support for PostgreSQL which resolves #87 and is mentioned in #246. 2019-09-12 16:12:22 -04:00
2019-09-16-150000_fix_attachments Added a migration that fixes #1 which caused attachments to be broken 2019-09-16 19:52:00 -04:00
2019-10-10-083032_add_column_to_twofactor
2019-11-17-011009_add_email_verification
2020-03-13-205045_add_policy_table
2020-04-09-235005_add_cipher_delete_date Initial support for soft deletes 2020-04-17 22:35:27 +02:00
2020-07-01-214531_add_hide_passwords Add support for hiding passwords in a collection 2020-07-02 21:51:20 -07:00
2020-08-02-025025_add_favorites_table
2020-11-30-224000_add_user_enabled
2020-12-09-173101_add_stamp_exception
2021-03-11-190243_add_sends
2021-03-15-163412_rename_send_key
2021-04-30-233251_add_reprompt Add support for password reprompt 2021-05-11 20:09:57 -07:00
2021-05-11-205202_add_hide_email
2021-07-01-203140_add_password_reset_keys
2021-08-30-193501_create_emergency_access [PATCH] Some fixes to the Emergency Access PR 2021-09-17 01:25:47 +02:00
2021-10-24-164321_add_2fa_incomplete
2022-01-17-234911_add_api_key
2022-03-02-210038_update_devices_primary_key
2022-07-27-110000_add_group_support group support 2022-10-20 15:31:53 +02:00
2022-10-18-170602_add_events
2023-01-06-151600_add_reset_password_support
2023-01-11-205851_add_avatar_color
2023-01-31-222222_add_argon2
2023-02-18-125735_push_uuid_table
2023-06-02-200424_create_organization_api_key
2023-06-17-200424_create_auth_requests_table Implement login-with-device 2023-08-13 17:54:18 +02:00
2023-06-28-133700_add_collection_external_id
2023-09-01-170620_update_auth_request_table Fix Login With Device without MasterPassword 2023-09-01 21:03:50 +02:00
2023-09-02-212336_move_user_external_id Fix External ID not set during DC Sync 2023-10-21 13:54:48 +02:00
2023-09-10-133000_add_sso SSO using OpenID Connect (#3899) 2025-08-08 23:22:22 +02:00
2023-09-14-133000_add_users_organizations_invited_by_email SSO using OpenID Connect (#3899) 2025-08-08 23:22:22 +02:00
2023-10-21-221242_add_cipher_key Implement cipher key encryption (#3990) 2023-10-23 00:18:14 +02:00
2024-01-12-210182_change_attachment_size Improve file limit handling (#4242) 2024-01-27 02:43:26 +01:00
2024-02-14-135953_change_time_stamp_data_type Change timestamp data type. (#4355) 2024-03-17 22:04:37 +01:00
2024-02-14-170000_add_state_to_sso_nonce SSO using OpenID Connect (#3899) 2025-08-08 23:22:22 +02:00
2024-02-26-170000_add_pkce_to_sso_nonce SSO using OpenID Connect (#3899) 2025-08-08 23:22:22 +02:00
2024-03-06-170000_add_sso_users SSO using OpenID Connect (#3899) 2025-08-08 23:22:22 +02:00
2024-03-13-170000_sso_users_cascade SSO using OpenID Connect (#3899) 2025-08-08 23:22:22 +02:00
2024-06-05-131359_add_2fa_duo_store Add support for MFA with Duo's Universal Prompt (#4637) 2024-07-24 16:50:35 +02:00
2024-09-04-091351_use_device_type_for_mails Fix Device Type column for 2FA migration (#4971) 2024-09-20 12:06:06 +02:00
2025-01-09-172300_add_manage Add manage role for collections and groups (#5386) 2025-01-21 23:33:41 +01:00
2025-08-20-120000_sso_nonce_to_auth Improve sso auth flow (#6205) 2025-12-06 22:20:04 +01:00
2026-04-25-120000_sso_auth_binding Several SSO Fixes (#7163) 2026-04-29 22:25:36 +02:00