mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-13 18:35:42 -05:00
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/1955
Author: @Sheap
Created: 9/1/2021
Status: ❌ Closed
Base:
main← Head:sso-for-pr📝 Commits (10+)
2e90782add required fields to schema/org form4674464working sso login284d215policy enforcement - multiple devicesd0d476fcleanupd0d261asafe handling of RawStrs05a4a6ccomment updates7f97e7fadd web-vault-sso.patch635a485remove changes for local development47d5320trivial PR feedback - missing files from web-vault patch4d39197use migrations properly, avoid panics📊 Changes
21 files changed (+1509 additions, -18 deletions)
View changed files
📝
.dockerignore(+1 -1)📝
Cargo.lock(+183 -8)📝
Cargo.toml(+1 -0)➕
migrations/mysql/2021-09-16-133000_add_sso/down.sql(+2 -0)➕
migrations/mysql/2021-09-16-133000_add_sso/up.sql(+18 -0)📝
migrations/postgresql/2019-09-12-100000_create_tables/up.sql(+1 -1)➕
migrations/postgresql/2021-09-16-133000_add_sso/down.sql(+2 -0)➕
migrations/postgresql/2021-09-16-133000_add_sso/up.sql(+18 -0)➕
migrations/sqlite/2021-09-16-133000_add_sso/down.sql(+2 -0)➕
migrations/sqlite/2021-09-16-133000_add_sso/up.sql(+18 -0)📝
src/api/core/organizations.rs(+56 -1)📝
src/api/identity.rs(+238 -2)📝
src/db/models/mod.rs(+4 -0)📝
src/db/models/org_policy.rs(+1 -1)📝
src/db/models/organization.rs(+14 -4)➕
src/db/models/sso_config.rs(+104 -0)➕
src/db/models/sso_nonce.rs(+71 -0)📝
src/db/schemas/mysql/schema.rs(+23 -0)📝
src/db/schemas/postgresql/schema.rs(+23 -0)📝
src/db/schemas/sqlite/schema.rs(+23 -0)...and 1 more files
📄 Description
This branch adds the minimal required changes to allow OIDC SSO (at least with keycloak. There are many options/features of the process which I did not address, which may rule out other providers).
This is so far my biggest contact point with rust in a web server, as well as in implementing OIDC, so I wouldn't be surprised if there were places where I strayed from the path. But I have tested it, and at least it works. I'd welcome any feedback here. My greatest concern is that I'm currently ignoring the nonce. I believe it should be checked against, but I'm not sure where would be a sensible place to store it between generating it alongside the auth url, and consuming it when exchanging the code for an access token.
Note: There are associated changes required to the webvault here - I wasn't sure how I should link them, so to keep things simple for now, I've simply included a .patch file in this repo.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.