1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2025-01-31 10:08:56 +01:00
Commit-Graph

2829 Commits

Autor SHA1 Nachricht Datum
Timshel
175d488d6c Log password change event on SSO account creation 2025-01-28 21:52:38 +01:00
Timshel
246072c198 Merge remote-tracking branch 'dani/main' into sso-support 2025-01-28 21:52:27 +01:00
Stefan Melmuk
a3dccee243
add and use new event types (#5482)
* add additional event_types

* use correct event_type when leaving an org

* use correct event type when deleting a user

* also correctly log auth requests

* add correct membership info to event log
2025-01-28 11:25:53 +01:00
Mathijs van Veluw
c0ebe0d982
Fix passwordRevisionDate format (#5477) 2025-01-27 20:16:59 +01:00
Win‮8201‭Linux‬
1b46c80389
Make sure the icons are displayed correctly in desktop clients (#5469) 2025-01-27 18:29:24 +01:00
Stefan Melmuk
2c549984c0
let invited members access OrgMemberHeaders (#5461) 2025-01-27 18:27:11 +01:00
Stefan Melmuk
ecab7a50ea
hide already approved (or declined) devices (#5467) 2025-01-27 18:21:22 +01:00
Timshel
004aae9daa Release v1.33.0
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEPFu8Fz2BGGz/3nKpWMgKKqbHZeEFAmeU088ACgkQWMgKKqbH
 ZeGBdQ//WuDOcJQKf67OGV6LJvxVhcHFq5QnG9FoBN3OH+dJoImbr9pxIMwFbjp5
 15BKiOVnnIYU0n6Su2iC6eZ3ch/ygOmay2z3QOPgOPTU/mziaox031OQ3ToRil5S
 Vdn1WXyUd+73qzWSAOfUfsMawmtRgHz3pNq1JUJT8NGvdY0L2D6bq65j4pcGc5UE
 QCCd5/sMNhBPUT5sSr8l6uiLU/6ls1ktt2oV4kISeiEjLgDvbJIqX6gnhdhquJui
 mqgiw3n8lU++ug0cyj4/0oBRhGzHjAApxnxdl/y0Nz/vUPQNkzwfp2NTC0eDJhEX
 +bQFMojpsh5duOsCppOy/I6y2jvc8i9YH1JSuRh2P4HjtbRJej6O2RU3xKv7s/SP
 EoDf0Uc7GnGjjRzLH3VS4epJ4DVEnOSFXETMbkDMjoYctaxYmfS/67Yksw9sJ6Fb
 QJJDcikp3OmstqU2nLAcb033tALOfDJ6znG6SngJP5jhhHgJqnq51puGUbXdS69a
 /ELMljrm2q6eWu3F5G56hGxQGoNzFlkBpnAP0DyHTAMposE9GBKATrIbljBYTFEw
 Y/gTwhK5JiQgFanSSqwB4K1o2RK3JI1r8BMAxnAnzv4QXH32uSyBWkF0udumWpGj
 KZcmjQ+5MSNaCsRMRjHn3qTYhAD+Lla51SzC3YPvH4I38OHqZVQ=
 =VrFy
 -----END PGP SIGNATURE-----

Merge tag '1.33.0' into sso-support

Release v1.33.0
2025-01-27 13:31:28 +01:00
Stefan Melmuk
2903a3a13a
only validate SMTP_FROM if necessary (#5442) 2025-01-25 05:46:43 +01:00
Mathijs van Veluw
952992c85b
Org fixes (#5438)
* Security fixes for admin and sendmail

Because the Vaultwarden Admin Backend endpoints did not validated the Content-Type during a request, it was possible to update settings via CSRF. But, this was only possible if there was no `ADMIN_TOKEN` set at all. To make sure these environments are also safe I added the needed content-type checks at the functions.
This could cause some users who have scripts which uses cURL for example to adjust there commands to provide the correct headers.

By using a crafted favicon and having access to the Admin Backend an attacker could run custom commands on the host/container where Vaultwarden is running on. The main issue here is that we allowed the sendmail binary name/path to be changed. To mitigate this we removed this configuration item and only then `sendmail` binary as a name can be used.
This could cause some issues where the `sendmail` binary is not in the `$PATH` and thus not able to be started. In these cases the admins should make sure `$PATH` is set correctly or create a custom shell script or symlink at a location which is in the `$PATH`.

Added an extra security header and adjusted the CSP to be more strict by setting `default-src` to `none` and added the needed missing specific policies.

Also created a general email validation function which does some more checking to catch invalid email address not found by the email_address crate.

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

* Fix security issue with organizationId validation

Because of a invalid check/validation of the OrganizationId which most of the time is located in the path but sometimes provided as a URL Parameter, the parameter overruled the path ID during the Guard checks.
This resulted in someone being able to execute commands as an Admin or Owner of the OrganizationId fetched from the parameter, but the API endpoints then used the OrganizationId located in the path instead.

This commit fixes the extraction of the OrganizationId in the Guard and also added some extra validations of this OrgId in several functions.

Also added an extra `OrgMemberHeaders` which can be used to only allow access to organization endpoints which should only be accessible by members of that org.

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

* Update server version in config endpoint

Updated the server version reported to the clients to `2025.1.0`.
This should make Vaultwarden future proof for the newer clients released by Bitwarden.

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

* Fix and adjust build workflow

The build workflow had an issue with some `if` checks.
For one they had two `$` signs, and it is not recommended to use `always()` since canceling a workflow does not cancel those calls.
Using `!cancelled()` is the preferred way.

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

* Update crates

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

* Allow sendmail to be configurable

This reverts a previous change which removed the sendmail to be configurable.
We now set the config to be read-only, and omit all read-only values from being stored during a save action from the admin interface.

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

* Add more org_id checks

Added more org_id checks at all functions which use the org_id in there path.

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

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-01-25 01:32:09 +01:00
Timshel
6ee5580b03 Merge remote-tracking branch 'dani/main' into sso-support 2025-01-24 17:30:31 +01:00
Stefan Melmuk
c0be36a17f
update web-vault to v2025.1.1 and add /api/devices (#5422)
* add /api/devices endpoints

* load pending device requests

* order pending authrequests by creation date

* update web-vault to v2025.1.1
2025-01-23 12:30:55 +01:00
Mathijs van Veluw
d1dee04615
Add manage role for collections and groups (#5386)
* Add manage role for collections and groups

This commit will add the manage role/column to collections and groups.
We need this to allow users part of a collection either directly or via groups to be able to delete ciphers.
Without this, they are only able to either edit or view them when using new clients, since these check the manage role.

Still trying to keep it compatible with previous versions and able to revert to an older Vaultwarden version and the `access_all` feature of the older installations.
In a future version we should really check and fix these rights and create some kind of migration step to also remove the `access_all` feature and convert that to a `manage` option.
But this commit at least creates the base for this already.

This should resolve #5367

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

* Fix an issue with access_all

If owners or admins do not have the `access_all` flag set, in case they do not want to see all collection on the password manager view, they didn't see any collections at all anymore.

This should fix that they are still able to view all the collections and have access to it.

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

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-01-21 23:33:41 +01:00
Stefan Melmuk
ef2695de0c
improve admin invite (#5403)
* check for admin invite

* refactor the invitation logic

* cleanup check for undefined token

* prevent wrong user from accepting invitation
2025-01-20 20:21:44 +01:00
Timshel
ae1c17aacf Prevent accepting another user invitation 2025-01-17 19:43:25 +01:00
Timshel
0b556b21b0 Review fixes 2025-01-16 19:58:52 +01:00
Timshel
6f9b88e572 Allow set-password only if account is unitialized 2025-01-16 18:14:06 +01:00
Timshel
da8be29de0 Membership::confirm_user_invitations fix and tests 2025-01-16 17:32:19 +01:00
Timshel
3ec4b0c476 Merge remote-tracking branch 'dani/main' into sso-support 2025-01-15 16:53:56 +01:00
Daniel
29f2b433f0
Simplify container image attestation (#5387) 2025-01-13 19:16:10 +01:00
Timshel
795328bb9f Merge remote-tracking branch 'dani/main' into sso-support 2025-01-13 15:26:44 +01:00
Mathijs van Veluw
07f80346b4
Fix version detection on bake (#5382) 2025-01-11 11:54:38 +01:00
Mathijs van Veluw
4f68eafa3e
Add Attestations for containers and artifacts (#5378)
* Add Attestations for containers and artifacts

This commit will add attestation actions to sign the containers and binaries which can be verified via the gh cli.
https://cli.github.com/manual/gh_attestation_verify

The binaries from both Alpine and Debian based images are extracted and attested so that you can verify the binaries of all the containers.

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

* Adjust attest to use globbing

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

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-01-10 21:32:38 +01:00
Integral
327d369188
refactor: replace static with const for global constants (#5260)
Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
2025-01-10 21:06:38 +01:00
Mathijs van Veluw
ca7483df85
Fix an issue with login with device (#5379)
During the refactoring done in #5320 there has a buggy slipped through which changed a uuid.
This commit fixes this, and also made some vars pass by reference.

Fixes #5377

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-01-10 20:37:23 +01:00
Helmut K. C. Tessarek
16b6d2a71e
build: raise msrv (1.83.0) rust toolchain (1.84.0) (#5374)
* build: raise msrv (1.83.0) rust toolchain (1.84.0)

* build: also update docker images
2025-01-10 20:34:48 +01:00
Timshel
16c230e570 Add wrapper type OIDCCode OIDCState OIDCIdentifier 2025-01-10 18:07:53 +01:00
Timshel
2f4d2daec6 Remove OrganizationId guard from get_master_password_policy 2025-01-10 18:07:53 +01:00
Timshel
6129214538 Merge remote-tracking branch 'dani/main' into sso-support 2025-01-10 16:38:58 +01:00
Timshel
f353933b53 Review fixes 2025-01-10 14:53:41 +01:00
Stefan Melmuk
871a3f214a
rename membership and adopt newtype pattern (#5320)
* rename membership

rename UserOrganization to Membership to clarify the relation
and prevent confusion whether something refers to a member(ship) or user

* use newtype pattern

* implement custom derive macro IdFromParam

* add UuidFromParam macro for UUIDs

* add macros to Docker build

Co-authored-by: dfunkt <dfunkt@users.noreply.github.com>

---------

Co-authored-by: dfunkt <dfunkt@users.noreply.github.com>
2025-01-09 18:37:23 +01:00
Timshel
a5ce1c3c6b Add verifiedDate to organizations::get_org_domain_sso_details 2025-01-09 17:01:28 +01:00
Timshel
ce5368f7d1 Disable signups if SSO_ONLY is activated 2025-01-09 17:01:28 +01:00
Timshel
44045a865b api::Accounts::verify_password add the policy even if it's ignored 2025-01-09 17:01:28 +01:00
Timshel
bee619ff52 Split SsoUser::find_by_identifier_or_email 2025-01-09 17:01:28 +01:00
Timshel
0e8a462eb0 Remove unused UserOrganization.invited_by_email 2025-01-09 17:01:28 +01:00
Timshel
b9e257b469 Review fixes 2025-01-09 17:01:28 +01:00
Timshel
3617be0098 Prevent disabled User from SSO login 2025-01-09 17:01:28 +01:00
Timshel
a85bdb2558 Base64 encode state before sending it to providers 2025-01-09 17:01:28 +01:00
Timshel
a9cc0e5b4a Toggle SSO button in scss 2025-01-09 17:01:28 +01:00
Timshel
8dfaee61df add SSO_ALLOW_UNKNOWN_EMAIL_VERIFICATION 2025-01-09 17:01:28 +01:00
Timshel
fb5b56803a Ensure result order when searching for sso_user 2025-01-09 17:01:28 +01:00
Timshel
d6af686152 Activate PKCE by default 2025-01-09 17:01:28 +01:00
Timshel
927968d251 Add playwright tests 2025-01-09 17:01:28 +01:00
Timshel
524d65e772 Stop rolling device token 2025-01-09 17:01:28 +01:00
Timshel
fefa55cad4 Improvements and error handling 2025-01-09 17:01:28 +01:00
Felix Eckhofer
671f7a1d31 Add SSO functionality using OpenID Connect
Co-authored-by: Pablo Ovelleiro Corral <mail@pablo.tools>
Co-authored-by: Stuart Heap <sheap13@gmail.com>
Co-authored-by: Alex Moore <skiepp@my-dockerfarm.cloud>
Co-authored-by: Brian Munro <brian.alexander.munro@gmail.com>
Co-authored-by: Jacques B. <timshel@github.com>
2025-01-09 17:01:28 +01:00
Mathijs van Veluw
10d12676cf
Allow building with Rust v1.84.0 or newer (#5371) 2025-01-09 12:33:02 +01:00
Mathijs van Veluw
dec3a9603a
Update crates and web-vault to v2025.1.0 (#5368)
- Updated the web-vault to use v2025.1.0 (pre-release)
- Updated crates

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-01-08 18:14:08 +01:00
Mathijs van Veluw
86aaf27659
Prevent new users/members to be stored in db when invite fails (#5350)
* Prevent new users/members when invite fails

Currently when a (new) user gets invited as a member to an org, and SMTP is enabled, but sending the invite fails, the user is still created.
They will only not have received a mail, and admins/owners need to re-invite the member again.
Since the dialog window still keeps on-top when this fails, it kinda invites to click try again, but that will fail in mentioning the user is already a member.

To prevent this weird flow, this commit will delete the user, invite and member if sending the mail failed.
This allows the inviter to try again if there was a temporary hiccup for example, or contact the server admin and does not leave stray users/members around.

Fixes #5349

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

* Adjust deleting records

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

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-01-08 18:13:45 +01:00