1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-06-22 11:12:50 +00:00
Commit graph

342 commits

Author SHA1 Message Date
Timshel
a79d6682d4 Merge remote-tracking branch 'dani/main' into sso-support 2025-06-02 18:48:42 +02:00
Mathijs van Veluw
51a1d641c5
Some small admin updates (#5909)
- Some tweaks on the diagnostics layout
- Always show the latest web-vault version also when running in a container
  Users can override the web-vault folder and forget
- Also updated to the latest crates.

Kinda fixes #5908

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-05-30 16:56:29 +02:00
Chase Douglas
90f7e5ff80
Abstract persistent files through Apache OpenDAL (#5626)
* Abstract file access through Apache OpenDAL

* Add AWS S3 support via OpenDAL for data files

* PR improvements

* Additional PR improvements

* Config setting comments for local/remote data locations
2025-05-29 21:40:58 +02:00
Timshel
a89249b817 Release v1.34.1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEubehCDcydr88BAb5/Ip9FMPNVDoFAmg02z4ACgkQ/Ip9FMPN
 VDoMvA/9GKOgrCDQUS1MaMtxvnpG4shy8lokPcvRNWc1X2fRl4j9jMmIgbmaTA7O
 OZVCbqEVGnyEw0cFGKMg9161G+AIBOfmbkdJ+VGOTjhTItB1IG8mW0b17HiEKoSM
 ixpF7M9YDZMd5BGNzALPIb2v2ig6i59oOOHIPUrGaRv6yQacOZ16ahqK9qohTxsv
 fLwyLVPDc/8RX9dwMbLOspGtCeoF58uTjefqQGn7mbc9AyeVftEKWlyDrYWXXXce
 zZx9xXjVZwmOEB7HxoMZ7onhxzUArDcruK7jIrIM7K6i7e+stjssc/2/X0ajCj4i
 7od7/4entHGoz6PAoldoAZ3eO8Y1tL22kfwqAPDbr78q0w+NkVQ1K9RC5qMMLmqC
 GpHtFfZjiIYFu+suOX+XQVacSXfbDpknm1av5oXNLQVlE91AQZ0ln/s6oEMVZqZY
 aPZWgBZsjJ80mayyuT3CLsRXaqPSY9J60RKMW12wUyzLXW8dD2n6biZa7bRXo52O
 87q8QODM8prJWlQjmn+qzlBSRPdaDbbxczDpjcK12h6izmQfpFv4YUWEdOcJeMAw
 m7MNLkI63AbF1GGHvZHFCKrWb9CFl4n14VWf8qD/PFW3AuytntLTZNbGwCuV1puU
 55EMwOjqFqBjQcBM9NdUd/KUbWMJFdJQDfhyufbd7tmers3EGZU=
 =gIvx
 -----END PGP SIGNATURE-----

Merge tag '1.34.1' into sso-support

Release v1.34.1
2025-05-28 17:34:26 +02:00
Mathijs van Veluw
ef7835d1b0
Sync with Upstream (#5798)
* WIP Sync with Upstream

WIP on syncing API Responses with upstream.
This to prevent issues with new clients, and find possible current issues like members, collections, groups etc..

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

* More API Response fixes

- Some 2fa checks
- Some org checks
- Reconfigured the experimental flags and noted which are deprecated
  Also removed some hard-coded defaults.
- Updated crates

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

* Add avatar color to emergency access api

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

* Fix spelling and some crate updates

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

* Use PushId and always generate the PushId

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

* Fix clippy lints

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

* Fix several Push issues and API's

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

* Check if push_uuid is empty and generate when needed

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

* Updated some comments and removed old export format

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

* cargo update

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

* Fix bulk edit Fixes #5737

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

* Send an email when an account exists already

When you want to change your email address into an account which already exists, upstream sends an email to the existing account.
Lets do the same.

Kinda fixes #5630

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

* Update 2fa removal/revoke email

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

* Allow col managers to import

This commit adds functionality to allow users with manage access to a collection, or managers with all access to import into an organization.

Fixes #5592

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

* Filter deprected flags and only return active flags

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

* Fix grammer

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

* Rename Small to Compact

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

* Rebase with upstream and fix conflicts

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

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-05-26 21:00:59 +02:00
Mathijs van Veluw
73f2441d1a
Update Rust, Crates and Web-Vault (#5860)
- Updated web-vault to v2025.5.0
- Updated Rust to v1.87.0
- Updated all the crates
- Replaced yubico with yubico_ng
- Fixed several new (nightly) clippy lints

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-05-16 18:49:43 +02:00
Timshel
3696fbe601 Merge remote-tracking branch 'dani/main' into sso-support 2025-04-10 11:16:55 +02:00
Mathijs van Veluw
66cf179bca
Updates and general fixes (#5762)
Updated all the crates to the latest version.
We can unpin mimalloc, since the musl issues have been fixed
Also fix a RUSTSEC https://osv.dev/vulnerability/RUSTSEC-2025-0023 for tokio

Fixed some clippy lints reported by nightly.

Ensure lints and are also run on the macro crate.
This resulted in some lints being triggered, which I fixed.

Updated some GHA uses.

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-04-09 21:21:10 +02:00
Timshel
ebbb351be9 Merge remote-tracking branch 'dani/main' into sso-support 2025-04-09 15:08:08 +02:00
Mathijs van Veluw
025bb90f8f
Fix debian docker building (#5752)
In previous attempts to get mysqlclient-sys to build and work I added some extra build variables.
These are not needed if you configure pkg-config correctly.
The same goes for OpenSSL btw.

This PR configures the pkg-config in the right way and allows the crates to build using the right lib paths automatically.
Because of this change also the lib/include paths were not needed anymore for some architectures, except for i386.

Also updated crates again.

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-04-05 17:58:32 +02:00
Daniel
bbbd2f6d15
Update Rust to 1.86.0 (#5744)
- also raise MSRV to 1.84.0

- fix `Dockerfile` template
- remove no longed needed `-vvv` argument for `cargo build`
2025-04-04 18:04:36 +02:00
Mathijs van Veluw
8a0cb1137e
Fix mysqlclient-sys building (#5743)
Because of some issues with mysqlclient we need to use buildtime bindgen.
This also needed some extra environment variables to point the bindgen to the correct files and correct version.

Also update some other crates.

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-04-04 16:37:57 +02:00
Mathijs van Veluw
3a1f1bae00
Update deps and web-vault (#5742)
- Updated crates
  Pinned mimalloc, since it has issues with musl
- Updated web-vault to v2025.3.1
- Updated bootstrap

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-04-04 12:18:09 +02:00
Timshel
2c8027b0d2 Merge remote-tracking branch 'dani/main' into sso-support 2025-03-24 17:50:26 +01:00
Mathijs van Veluw
8dfe805954
Update Rust, Crates and other deps (#5709)
- Updated Rust to v1.85.1
- Updated crates and fixed breaking changes
- Updated datatables js
- Updated GitHub Actions

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-03-19 17:39:53 +01:00
Mathijs van Veluw
07b869b3ef
Some fixes for the new web-vault and updates (#5703)
- Added a new org policy
- Some new lint fixes
- Crate updates
  Switched to `pastey`, since `paste` is unmaintained.

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-03-17 23:02:02 +01:00
Timshel
c680cfe6c9 Merge remote-tracking branch 'dani/main' into sso-support 2025-03-17 17:54:26 +01:00
Timshel
1dae6093c9
Use subtle to replace deprecated ring::constant_time::verify_slices_are_equal (#5680) 2025-03-15 19:33:17 +01:00
Timshel
6df71d95d4 Merge remote-tracking branch 'dani/main' into sso-support 2025-03-07 15:21:05 +01:00
Daniel
6edceb5f7a
Update Rust to 1.85.0 (#5634)
- also update the crates
2025-02-24 12:12:34 +01:00
Timshel
1feda56198 Merge remote-tracking branch 'dani/main' into sso-support 2025-02-17 16:24:09 +01:00
Mathijs van Veluw
3baffeee9a
Fix db issues with Option<> values and upd crates (#5594)
Some tables were lacking an option to convert Option<> to NULL.
This commit will fix that.

Also updated the crates to the latest version available.
2025-02-14 17:58:57 +01:00
Daniel
d5c353427d
Update crates & fix CVE-2025-25188 (#5576) 2025-02-12 10:21:12 +01:00
Timshel
d6051b1cdb Upgrade openidconnect to 4.0.0 2025-02-05 19:24:16 +01:00
Timshel
a0662bb0db Merge remote-tracking branch 'dani/main' into sso-support 2025-02-04 18:06:37 +01:00
Timshel
f3a88060e0 Release v1.33.1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEPFu8Fz2BGGz/3nKpWMgKKqbHZeEFAmegu7wACgkQWMgKKqbH
 ZeGjHA/+OgVQoEGvbK+t9serPsqX+Xya2zcP30AW0QV4NRwicx5GtP7Culth5JwN
 Nmecohat8MQ8JT3vcZht9NS/ctsqQqwU+1pCGG4TpPZTd6xhdDTwEdG0FVI2O65G
 8m2xIuXD3wPg2Hiw/DgXFQ++itMU6gXhFWPzvKofnXmtpmH0FjTn8CUGozNLinhC
 WQTy056LsCviud2bVxvAyGR1NUfGagMR3ScEQ6xp3WgexzmFJhYvFntGBOSvCYJF
 PbTfz/9KvdVfTVuTPuLMiNA7jiZfriTaGg+Jr8LCb5VvnLn+T94jfVMAeIoveQTg
 JMOUo21N0qbvPXxfNBBr9RFH0e92ajjUGLXaNuArC71eQzjlWGyxMf3pRFzOmsSv
 4TG0hEcTjo/SCDLibYjUkYFmLHUIvKPWMmaelFhFt26dCrbrJIj2+JEccOQLfPMV
 uDatyImrw9jG1t113l/xSYcIYGr9gUaJ6S/bVuUgUgbTJApiB+Wxe5wyFSco+XfT
 bDOIFHy+YYCSScSo0szsfbL/w5Qvs/ydVDWCfnTa0IlFlSgLjLXziyssGR7K7P2j
 YPWQ4bS6ZY8eao3nrt+PhnJTJBm2aPZPEKUpgpnTmjSbCGe4Ege/cZot/3IzMcCw
 P5L9JqlMhdPQjVH/EU05vKnVxtHOfxZ4XgZCDL9HtqQT28Cm9eE=
 =1t7B
 -----END PGP SIGNATURE-----

Merge tag '1.33.1' into sso-support

Release v1.33.1
2025-02-04 17:35:25 +01:00
Daniel
d2b36642a6
Update crates & fix CVE-2025-24898 (#5538) 2025-02-04 01:01:06 +01:00
Daniel
1109293992
Update Rust to 1.84.1 (#5508)
- also update the crates
- add necessary modifications for `rand` upgrade
- `small_rng` is enabled by default now
2025-02-01 13:16:32 +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
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
795328bb9f Merge remote-tracking branch 'dani/main' into sso-support 2025-01-13 15:26:44 +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
6129214538 Merge remote-tracking branch 'dani/main' into sso-support 2025-01-10 16:38:58 +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
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
b1481c7c1a
Update crates and GHA (#5346)
- Updated crates to the latest version
- Updated GitHub Actions to the latest version

Signed-off-by: BlackDex <black.dex@gmail.com>
2025-01-04 19:02:15 +01:00
Mathijs van Veluw
a523c82f5f
Use updated fern instead of patch (#5298)
Signed-off-by: BlackDex <black.dex@gmail.com>
2024-12-15 23:13:29 +01:00
Daniel
620ad92331
Update crates (#5268)
- fixes CVE-2024-12224
2024-12-10 17:59:28 +01:00
Mathijs van Veluw
71b3d3c818
Update Rust and crates (#5248)
* Update Rust and crates

- Updated Rust to v1.83.0
- Updated MSRV to v1.82.0 (Needed for html5gum crate)
- Updated icon fetching code to match new html5gum version
- Updated workflows
- Enabled edition 2024 clippy lints
  Nightly reports some clippy hints, but that would be too much to change in this PR i think.

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

* Some additional updates

- Patch fern to allow syslog-7 feature
- Fixed diesel logger which was broken because of the sqlite backup feature
  Refactored the sqlite backup because of this
- Added a build workflow test to include the query_logger feature

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

* Also patch yubico-rs and latest updates

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

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2024-12-05 22:10:59 +01:00
Mathijs van Veluw
294b429436
Add dynamic CSS support (#4940)
* Add dynamic CSS support

Together with https://github.com/dani-garcia/bw_web_builds/pull/180 this PR will add support for dynamic CSS changes.

For example, we could hide the register link if signups are not allowed.
In the future show or hide the SSO button depending on if it is enabled or not.

There also is a special `user.vaultwarden.scss` file so that users can add custom CSS without the need to modify the default (static) changes.
This will prevent future changes from not being applied and still have the custom user changes to be added.

Also added a special redirect when someone goes directly to `/index.html` as that might cause issues with loading other scripts and files.

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

* Add versions and fallback to built-in

- Add both Vaultwarden and web-vault versions to the css_options.
- Fallback to the inner templates if rendering or compiling the scss fails.
  This ensures the basics are always working even if someone breaks the templates.

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

* Fix fallback code to actually work

The fallback now works by using an alternative `reg!` macro.
This adds an extra template register which prefixes the template with `fallback_`.

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

* Updated the wiki link in the user template

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2024-11-11 20:14:04 +01:00
BlackDex
20d9e885bf
Update crates and fix several issues
Signed-off-by: BlackDex <black.dex@gmail.com>
2024-11-10 23:56:19 +01:00
Mathijs van Veluw
33bae5fbe9
Update crates and fix Mail issue (#5125)
- Updated all the crates
  Including in this update is an update from lettre, which solves an issue with some specific SMTP mail providers.
2024-10-24 19:13:20 +02:00
Daniel
b7c254eb30
Update Rust to 1.82.0 (#5099)
- raise MSRV to 1.80.0
- also update the crates
2024-10-18 20:34:31 +02:00
Mathijs van Veluw
e3541763fd
Updates and collection management fixes (#5072)
* Fix collections not editable by managers

Since a newer version of the web-vault we use manager were not able to create sub collections anymore.
This was because of some missing details in the response of some json objects.

This commit fixes this by using the `to_json_details` instead of the `to_json`

Fixes #5066
Fixes #5044

* Update crates and GitHub Actions

- Updated all the crates
- Updated all the GHA dependencies
- Configured the trivy workflow to only run on the main repo and not on forks
  Also selected a random new scheduled date so it will not run at the same time as all other forks.
  The two changes should help running this scan every day without failing, and also prevent the same for new or updated forks.
2024-10-11 18:42:40 +02:00
Mathijs van Veluw
f0efec7c96
Fix compiling for Windows targets (#5053)
The `unix::signal` was also included during Windows compilations.
This of course will not work. Fix this by only including it for `unix` targets.

Also changed all other conditional compilation options to use `cfg(unix)` instead of `cfg(not(windows))`.
The latter may also include `wasm` for example, or any other future target family.
This way we will only match `unix`

Fixes #5052
2024-10-06 13:49:00 +02:00
Mathijs van Veluw
040e2a7bb0
Add extra linting (#4977)
* Add extra linting

Added extra linting for some code styles.
Also added the Rust Edition 2024 lints.

Closes #4974

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

* Adjusted according to comments

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

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2024-09-23 20:25:32 +02:00
Mathijs van Veluw
de01111082
Fix Device Type column for 2FA migration (#4971) 2024-09-20 12:06:06 +02:00