mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-16 20:01:22 -05:00
[PR #3154] [CLOSED] Sso Support based off existing PR's #6875
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/3154
Author: @bmunro-peralex
Created: 1/19/2023
Status: ❌ Closed
Base:
main← Head:sso-support📝 Commits (1)
f59b11aAdd SSO functionality using OpenID Connect📊 Changes
31 files changed (+1225 additions, -59 deletions)
View changed files
📝
.env.template(+11 -0)📝
Cargo.lock(+498 -4)📝
Cargo.toml(+3 -0)➕
migrations/mysql/2023-02-01-133000_add_sso/down.sql(+1 -0)➕
migrations/mysql/2023-02-01-133000_add_sso/up.sql(+3 -0)➕
migrations/postgresql/2023-02-01-133000_add_sso/down.sql(+1 -0)➕
migrations/postgresql/2023-02-01-133000_add_sso/up.sql(+3 -0)➕
migrations/sqlite/2023-02-01-133000_add_sso/down.sql(+1 -0)➕
migrations/sqlite/2023-02-01-133000_add_sso/up.sql(+3 -0)📝
src/api/core/accounts.rs(+71 -2)📝
src/api/core/organizations.rs(+37 -0)📝
src/api/core/two_factor/authenticator.rs(+2 -7)📝
src/api/core/two_factor/duo.rs(+2 -6)📝
src/api/core/two_factor/email.rs(+3 -9)📝
src/api/core/two_factor/mod.rs(+16 -8)📝
src/api/core/two_factor/webauthn.rs(+2 -6)📝
src/api/core/two_factor/yubikey.rs(+2 -6)📝
src/api/identity.rs(+346 -6)📝
src/auth.rs(+23 -0)📝
src/config.rs(+29 -0)...and 11 more files
📄 Description
Based off previous work by @pinpox and @m4w0lf
https://github.com/dani-garcia/vaultwarden/pull/2787
https://github.com/dani-garcia/vaultwarden/pull/2449
All config is now done in the environment variables, removed all unneeded calls.
Bitwarden removed the identify payload from the client so the first organization is always used when using a domain_hint
Currently Working:
Not Working:
The above has a workaround that can be enabled to accept all invites on login
How to test:
Add the following environment variables and have at least one organization created in your instance
`
SSO_ENABLED: "true"
SSO_CLIENT_ID: "111111111111111111111111111111111"
SSO_CLIENT_SECRET: "222222222222222222222222222222222222222222222"
SSO_AUTHORITY: "https://auth.example.com"
//Optional
SSO_ACCEPTALL_INVITES: "true"
`
The callback url currently is always:
Replace example.com with your vaultwarden domain.
https://example.com/identity/connect/oidc-signin
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.