-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mobile push device filter to non-null push uuid #3578
Add mobile push device filter to non-null push uuid #3578
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually made a function filtring push devices, you'll want to use this
Thanks for the catch tho
This probably also needs to be done for the |
Ah, nice. I'll look into using that function. |
@quexten , if you check my comments on the other PR, it might be better to merge the two and move the |
Thank you both for the helpful suggestions. Updated the PR to have send_to_push_relay take a Vec, and updated all of the calls to send_to_push_relay to be wrapped in a spawned task. Furthermore, as per @GeekCornerGH's suggestion I used the find_push_device_by_user where possible, so that the SQL query does not even return those devices. On my local system, there is now no noticeable difference in the time the PUT request takes (4-5 ms total whether it's enabled or not) with the full ~100 old devices from my database. |
@quexten Could you rebase your PR on the current main branch please :) |
f471870
to
f8c006e
Compare
Done. |
Ah actually, seems like I need to do some more changes. |
Well, there are some clippy changes needed. But i just tested it quickly, and it doesn't seem to update all the devices for me for some reason. |
Yeah, was working on that at the moment.
Okay, I will do some testing, good catch. |
I am using the v2023.5.0 version of the app on Android. And it looks like it doesn't send the device id's anymore. I have not tested the v2023.4.0 again yet. But that might be a thing |
Do you mean the android app itself does not send the ids to the server, whereas before it did? Does that also mean it does not currently work with the vaultwarden main branch for you? |
@quexten @GeekCornerGH Instead of pushing to all those items, it in fact should be one, BUT, all the data in the payload should contain the information of the client creating the change. You only need to check if there are devices which have a push token for that user, if that is the case, then call the Bitwarden push server with the data from the cipher and the data from the acting_device. I probably need to check some other stuff, like organizations for example. This also explains why it worked for me in the beginning, because i probably had multiple devices with different device id's and push_tokens already and the code back then didn't in time matched one of the devices i was using. Because there wasn't a match for the specific Android device, the clients processed the request. The clients skip a call to refresh if they see there own device id in the call, and that is what probably is the clue here. |
So, deviceId and identifier should both be the UUID of the acting device? In that case why are there even different push uuids saved in the DB? As far as I can tell, if we use the acting UUID in the push notification, we would then only use the push UUID's in the registration, though I haven't studied the protocol closely. I'll try this later today. |
Well it was an oversight i think. We still need to store them for user/device specific actions maybe like logout and the push token storage. |
My best bet would be that Bitwarden is using uuids as a way to uniquely identify any device, instead of searching per mail then per identifier (as they call them) |
That is what i think to, and we still need it during register |
@quexten , did you tested multiple devices? And what where you results? |
I tested with 2 mobile devices, in one case with making the changes in my web extension, in one case on one of the mobile devices, and they did get updated correctly (for editing, deleting, adding a cipher). I recommend to test the newest commit to see if your case is also resolved. |
Ok, I did some more testing. While these latest changes seem to be in line with what Bitwarden it self sends out, it still doesn't work with multiple devices for me. But, if i test this on a Self-Hosted or even on there SaaS system, that doesn't even work. When i force a logout, it seems to only reach one device. But since i think these current changes are better in line into upstream, and we are not spamming the Push server with these changes, that would be better. If someone has other thoughts, please let me know. |
When I look at the current code in this PR, it calls Also, if this doesn't work with bw's self-hosted option, shouldn't there already be an issue open for this? Update: Shouldn't this:
be rather something like:
Additionally, shouldn't the function be called |
Weird, for me it still consistently works with both mobile devices, with the android one being 2-3 seconds slower than the iOS device which is nearly instant. I tested modifying ciphers and de-authorizing sessions. Is the behavior for you inconsistent, i.e does the device the changes reach change?
That was what was initially implemented, yes, but as @BlackDex points out ( #3578 (comment) ), that does not appear to be what the official server is doing? It seems it is just one push notification with the acting device, and the push server itself then sends the message to all? devices of the user. (I have not looked closely at the official server implementation yet). I should probably look into changing
|
My question was more technical in the sens of the workings. But this it would be much better if it would just return a bool, or int, by using a
We determined that this was not the case, and that was reverted because of that.
As mentioned above, it should probably be renamed, or maybe a new function should be created. But, what i wanted to establish here is that this is just the way it seems to work. At least for me currently for Vaultwarden, Self-Hosted and Bitwarden Hosted instances. If that is the case, then I'm generally ok with the workings of this PR. And then i can review it as is with some of the above mentioned items :) |
It seems the function is required by the de-auth functionality in admin.rs so I have just renamed it to mention devices in plural. Additionally I added a database query to just check whether there are any push devices for a user with a boolean return value. Deploying to my test server now to see if everything works as it should. |
Okay, it seems to work on the latest build, however I also encountered an issue with not syncing. After a forced deauth, I signed my devices back in, but no changes were pushed because they did not have a push token / uuid anymore. The de-auth had cleared their push tokens in the database (as it should) but no re-registration happened. When I completely cleared the app-data and signed back in, the registration happened again and push worked again. I suspect (but have not yet investigated) there is a problem somewhere in re-registration. Maybe just dropping all device entries for the user on a forced de-auth would be enough? Would this cause any other issues?
There is this line in the deauth-function, but for some reason for me the table still contains my devices after a de-auth... |
It did removed all devices for me. But, as mentioned, it looks like it's a strange issue with the push server. It might even be our registration or something. But it's hard to debug. |
Ok, well aside from this weird issue, I'm happy with the state of the PR, so feel free to review when you find the time :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some small items to address i think.
Also, i noticed that all the payload
keys are starting with a capital letter.
I'm not seeing that in the calls and code from Bitwarden it self.
Maybe best that we change those to lowercase also?
FYI I have tested on bitwarden.com and sends are also not syncing there. I have created an upstream bug report in case they are not aware (there was no other issue tracking this). |
Changed them to lower-case now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it all looks good.
Just one item which needs to be removed.
And, if possible if you can squash this PR that would be best i think.
Probably best way would be to run this i think.
# First reset to the beginning
git reset --soft HEAD~13
# Remove the bw_web_builds folder
rm -rf bw_web_builds
# Check if all is ok and do a force push by using a + sign infront of your branch-name
git push origin +my_branch_name
a8e3dc7
to
5b7d739
Compare
Sorry for the confusion, I think it should be correctly reset now? |
Looks ok indeed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's good, didn't tried yet, but changes seems alright
@BlackDex ok, so let me try to summarize the architecture for push notifications
Is this the current workflow? If so, what do I have to do to get the devices registered after I upgrade to the code that includes this PR? De-auth all devices? logout/login? |
During login at the device.
The server sends a notification. So it will send a web-socket message to all web-socket clients and a message to the push server of Bitwarden.
This part is not something i have looked into that deeply. As this is more under Bitwarden control. And it doesn't seem that it will search and notify all devices which contain the users-id. Because for me multiple devices didn't received the update message. But this is the same for vault.bitwarden.com.
For me, during testing, i needed to fully clear the old devices and also clear the data on the mobile device and login again. I know that Bitwarden is looking into new ways to handle these notifications, because the currently way is stressing there current infrastructure. |
Btw, the PR still shows that changes are requested. Isn't it ready to be merged? |
I want to test it first. Didn't had time yet. |
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [vaultwarden/server](https://togithub.com/dani-garcia/vaultwarden) | stage | minor | `1.28.1-alpine` -> `1.29.0-alpine` | --- ### Release Notes <details> <summary>dani-garcia/vaultwarden (vaultwarden/server)</summary> ### [`v1.29.0`](https://togithub.com/dani-garcia/vaultwarden/releases/tag/1.29.0) [Compare Source](https://togithub.com/dani-garcia/vaultwarden/compare/1.28.1...1.29.0) #### Major changes and New Features - WebSocket notifications now work via the default HTTP port. No need for `WEBSOCKET_ENABLED` and a separate port anymore. The proxy examples still need to be updated for this. Support for the old websockets port 3012 will remain for the time being. - Mobile Client push notification support, see [#​3304](https://togithub.com/dani-garcia/vaultwarden/issues/3304) thanks [@​GeekCornerGH](https://togithub.com/GeekCornerGH)! - Web-Vault updated to v2023.5.0 (v2023.5.1 does not add any improvements for us) - The latest Bitwarden Directory Connector can be used now ([v2022.11.0](https://togithub.com/bitwarden/directory-connector/releases/tag/v2022.11.0)) - [Storing passkeys](https://bitwarden.com/passwordless-passkeys) is supported, though the clients are not yet released. So, it might be we need to make some changes once they are released. See: [#​3593](https://togithub.com/dani-garcia/vaultwarden/issues/3593), thanks [@​GeekCornerGH](https://togithub.com/GeekCornerGH)! #### What's Changed - check if reset password policy is enabled by [@​stefan0xC](https://togithub.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3427](https://togithub.com/dani-garcia/vaultwarden/pull/3427) - WebSockets via Rocket's Upgrade connection by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3404](https://togithub.com/dani-garcia/vaultwarden/pull/3404) - Several config and admin interface fixes by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3436](https://togithub.com/dani-garcia/vaultwarden/pull/3436) - Fixed missing footer_text and a few inconsistencies in email templates by [@​kennymc-c](https://togithub.com/kennymc-c) in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://togithub.com/dani-garcia/vaultwarden/pull/3439) - Small update to Rocket WebSockets by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3440](https://togithub.com/dani-garcia/vaultwarden/pull/3440) - inline static rsa keys by [@​vilgotf](https://togithub.com/vilgotf) in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://togithub.com/dani-garcia/vaultwarden/pull/3475) - Update Rust and Crates by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3469](https://togithub.com/dani-garcia/vaultwarden/pull/3469) - Change `String` to `&str` for all Rocket functions and some other fixes by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3491](https://togithub.com/dani-garcia/vaultwarden/pull/3491) - Use Rocket `v0.5` branch to fix endpoints by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3502](https://togithub.com/dani-garcia/vaultwarden/pull/3502) - Use fully qualified image names in Dockerfile by [@​gitouche-sur-osm](https://togithub.com/gitouche-sur-osm) in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://togithub.com/dani-garcia/vaultwarden/pull/3505) - policy data should be `null` not an empty object by [@​stefan0xC](https://togithub.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3513](https://togithub.com/dani-garcia/vaultwarden/pull/3513) - update web-vault to v2023.4.2 by [@​stefan0xC](https://togithub.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3522](https://togithub.com/dani-garcia/vaultwarden/pull/3522) - Sync global_domains.json (Pinterest) by [@​jjlin](https://togithub.com/jjlin) in [https://github.com/dani-garcia/vaultwarden/pull/3532](https://togithub.com/dani-garcia/vaultwarden/pull/3532) - Prevent 401 on main admin page by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3547](https://togithub.com/dani-garcia/vaultwarden/pull/3547) - Update crates and GH Workflow by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3548](https://togithub.com/dani-garcia/vaultwarden/pull/3548) - Fix collection change ws notifications by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3546](https://togithub.com/dani-garcia/vaultwarden/pull/3546) - Update Rust and Crates by [@​tessus](https://togithub.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3563](https://togithub.com/dani-garcia/vaultwarden/pull/3563) - feat: Implement Push Notifications sync by [@​GeekCornerGH](https://togithub.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3304](https://togithub.com/dani-garcia/vaultwarden/pull/3304) - Implement the Organization API Key support for the new Directory Connector v2022 by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3568](https://togithub.com/dani-garcia/vaultwarden/pull/3568) - Add mobile push device filter to non-null push uuid by [@​quexten](https://togithub.com/quexten) in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://togithub.com/dani-garcia/vaultwarden/pull/3578) - Update crates and workflow by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3603](https://togithub.com/dani-garcia/vaultwarden/pull/3603) - Add group import on invite by [@​farodin91](https://togithub.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3606](https://togithub.com/dani-garcia/vaultwarden/pull/3606) - Fix send access regression by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3608](https://togithub.com/dani-garcia/vaultwarden/pull/3608) - feat: Support for storing passkeys in the vault by [@​GeekCornerGH](https://togithub.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3593](https://togithub.com/dani-garcia/vaultwarden/pull/3593) - add user to collection during creation by [@​farodin91](https://togithub.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3609](https://togithub.com/dani-garcia/vaultwarden/pull/3609) - Updated docker run command by [@​DenuxPlays](https://togithub.com/DenuxPlays) in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://togithub.com/dani-garcia/vaultwarden/pull/3620) - Added-External_id for Collections by [@​fashberg](https://togithub.com/fashberg) in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://togithub.com/dani-garcia/vaultwarden/pull/3623) - fix missing password check while manual reset password enrollment by [@​sirux88](https://togithub.com/sirux88) in [https://github.com/dani-garcia/vaultwarden/pull/3632](https://togithub.com/dani-garcia/vaultwarden/pull/3632) - Update crates and small clippy fix by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3649](https://togithub.com/dani-garcia/vaultwarden/pull/3649) - fix version when compiled at a specific commit by [@​tessus](https://togithub.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3651](https://togithub.com/dani-garcia/vaultwarden/pull/3651) - Fix org creation regresion by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3659](https://togithub.com/dani-garcia/vaultwarden/pull/3659) #### New Contributors - [@​kennymc-c](https://togithub.com/kennymc-c) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://togithub.com/dani-garcia/vaultwarden/pull/3439) - [@​vilgotf](https://togithub.com/vilgotf) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://togithub.com/dani-garcia/vaultwarden/pull/3475) - [@​gitouche-sur-osm](https://togithub.com/gitouche-sur-osm) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://togithub.com/dani-garcia/vaultwarden/pull/3505) - [@​quexten](https://togithub.com/quexten) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://togithub.com/dani-garcia/vaultwarden/pull/3578) - [@​DenuxPlays](https://togithub.com/DenuxPlays) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://togithub.com/dani-garcia/vaultwarden/pull/3620) - [@​fashberg](https://togithub.com/fashberg) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://togithub.com/dani-garcia/vaultwarden/pull/3623) **Full Changelog**: dani-garcia/vaultwarden@1.28.1...1.29.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on saturday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/arthurgeek/vaultwarden-fly-template). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [vaultwarden/server](https://togithub.com/dani-garcia/vaultwarden) | stage | minor | `1.28.1-alpine` -> `1.29.0-alpine` | --- ### Release Notes <details> <summary>dani-garcia/vaultwarden (vaultwarden/server)</summary> ### [`v1.29.0`](https://togithub.com/dani-garcia/vaultwarden/releases/tag/1.29.0) [Compare Source](https://togithub.com/dani-garcia/vaultwarden/compare/1.28.1...1.29.0) #### Major changes and New Features - WebSocket notifications now work via the default HTTP port. No need for `WEBSOCKET_ENABLED` and a separate port anymore. The proxy examples still need to be updated for this. Support for the old websockets port 3012 will remain for the time being. - Mobile Client push notification support, see [#​3304](https://togithub.com/dani-garcia/vaultwarden/issues/3304) thanks [@​GeekCornerGH](https://togithub.com/GeekCornerGH)! - Web-Vault updated to v2023.5.0 (v2023.5.1 does not add any improvements for us) - The latest Bitwarden Directory Connector can be used now ([v2022.11.0](https://togithub.com/bitwarden/directory-connector/releases/tag/v2022.11.0)) - [Storing passkeys](https://bitwarden.com/passwordless-passkeys) is supported, though the clients are not yet released. So, it might be we need to make some changes once they are released. See: [#​3593](https://togithub.com/dani-garcia/vaultwarden/issues/3593), thanks [@​GeekCornerGH](https://togithub.com/GeekCornerGH)! #### What's Changed - check if reset password policy is enabled by [@​stefan0xC](https://togithub.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3427](https://togithub.com/dani-garcia/vaultwarden/pull/3427) - WebSockets via Rocket's Upgrade connection by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3404](https://togithub.com/dani-garcia/vaultwarden/pull/3404) - Several config and admin interface fixes by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3436](https://togithub.com/dani-garcia/vaultwarden/pull/3436) - Fixed missing footer_text and a few inconsistencies in email templates by [@​kennymc-c](https://togithub.com/kennymc-c) in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://togithub.com/dani-garcia/vaultwarden/pull/3439) - Small update to Rocket WebSockets by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3440](https://togithub.com/dani-garcia/vaultwarden/pull/3440) - inline static rsa keys by [@​vilgotf](https://togithub.com/vilgotf) in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://togithub.com/dani-garcia/vaultwarden/pull/3475) - Update Rust and Crates by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3469](https://togithub.com/dani-garcia/vaultwarden/pull/3469) - Change `String` to `&str` for all Rocket functions and some other fixes by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3491](https://togithub.com/dani-garcia/vaultwarden/pull/3491) - Use Rocket `v0.5` branch to fix endpoints by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3502](https://togithub.com/dani-garcia/vaultwarden/pull/3502) - Use fully qualified image names in Dockerfile by [@​gitouche-sur-osm](https://togithub.com/gitouche-sur-osm) in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://togithub.com/dani-garcia/vaultwarden/pull/3505) - policy data should be `null` not an empty object by [@​stefan0xC](https://togithub.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3513](https://togithub.com/dani-garcia/vaultwarden/pull/3513) - update web-vault to v2023.4.2 by [@​stefan0xC](https://togithub.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3522](https://togithub.com/dani-garcia/vaultwarden/pull/3522) - Sync global_domains.json (Pinterest) by [@​jjlin](https://togithub.com/jjlin) in [https://github.com/dani-garcia/vaultwarden/pull/3532](https://togithub.com/dani-garcia/vaultwarden/pull/3532) - Prevent 401 on main admin page by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3547](https://togithub.com/dani-garcia/vaultwarden/pull/3547) - Update crates and GH Workflow by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3548](https://togithub.com/dani-garcia/vaultwarden/pull/3548) - Fix collection change ws notifications by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3546](https://togithub.com/dani-garcia/vaultwarden/pull/3546) - Update Rust and Crates by [@​tessus](https://togithub.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3563](https://togithub.com/dani-garcia/vaultwarden/pull/3563) - feat: Implement Push Notifications sync by [@​GeekCornerGH](https://togithub.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3304](https://togithub.com/dani-garcia/vaultwarden/pull/3304) - Implement the Organization API Key support for the new Directory Connector v2022 by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3568](https://togithub.com/dani-garcia/vaultwarden/pull/3568) - Add mobile push device filter to non-null push uuid by [@​quexten](https://togithub.com/quexten) in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://togithub.com/dani-garcia/vaultwarden/pull/3578) - Update crates and workflow by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3603](https://togithub.com/dani-garcia/vaultwarden/pull/3603) - Add group import on invite by [@​farodin91](https://togithub.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3606](https://togithub.com/dani-garcia/vaultwarden/pull/3606) - Fix send access regression by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3608](https://togithub.com/dani-garcia/vaultwarden/pull/3608) - feat: Support for storing passkeys in the vault by [@​GeekCornerGH](https://togithub.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3593](https://togithub.com/dani-garcia/vaultwarden/pull/3593) - add user to collection during creation by [@​farodin91](https://togithub.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3609](https://togithub.com/dani-garcia/vaultwarden/pull/3609) - Updated docker run command by [@​DenuxPlays](https://togithub.com/DenuxPlays) in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://togithub.com/dani-garcia/vaultwarden/pull/3620) - Added-External_id for Collections by [@​fashberg](https://togithub.com/fashberg) in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://togithub.com/dani-garcia/vaultwarden/pull/3623) - fix missing password check while manual reset password enrollment by [@​sirux88](https://togithub.com/sirux88) in [https://github.com/dani-garcia/vaultwarden/pull/3632](https://togithub.com/dani-garcia/vaultwarden/pull/3632) - Update crates and small clippy fix by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3649](https://togithub.com/dani-garcia/vaultwarden/pull/3649) - fix version when compiled at a specific commit by [@​tessus](https://togithub.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3651](https://togithub.com/dani-garcia/vaultwarden/pull/3651) - Fix org creation regresion by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3659](https://togithub.com/dani-garcia/vaultwarden/pull/3659) #### New Contributors - [@​kennymc-c](https://togithub.com/kennymc-c) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://togithub.com/dani-garcia/vaultwarden/pull/3439) - [@​vilgotf](https://togithub.com/vilgotf) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://togithub.com/dani-garcia/vaultwarden/pull/3475) - [@​gitouche-sur-osm](https://togithub.com/gitouche-sur-osm) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://togithub.com/dani-garcia/vaultwarden/pull/3505) - [@​quexten](https://togithub.com/quexten) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://togithub.com/dani-garcia/vaultwarden/pull/3578) - [@​DenuxPlays](https://togithub.com/DenuxPlays) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://togithub.com/dani-garcia/vaultwarden/pull/3620) - [@​fashberg](https://togithub.com/fashberg) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://togithub.com/dani-garcia/vaultwarden/pull/3623) **Full Changelog**: dani-garcia/vaultwarden@1.28.1...1.29.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on saturday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/arthurgeek/vaultwarden-fly-template). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [vaultwarden/server](https://togithub.com/dani-garcia/vaultwarden) | stage | minor | `1.28.1-alpine` -> `1.29.0-alpine` | --- ### Release Notes <details> <summary>dani-garcia/vaultwarden (vaultwarden/server)</summary> ### [`v1.29.0`](https://togithub.com/dani-garcia/vaultwarden/releases/tag/1.29.0) [Compare Source](https://togithub.com/dani-garcia/vaultwarden/compare/1.28.1...1.29.0) #### Major changes and New Features - WebSocket notifications now work via the default HTTP port. No need for `WEBSOCKET_ENABLED` and a separate port anymore. The proxy examples still need to be updated for this. Support for the old websockets port 3012 will remain for the time being. - Mobile Client push notification support, see [#​3304](https://togithub.com/dani-garcia/vaultwarden/issues/3304) thanks [@​GeekCornerGH](https://togithub.com/GeekCornerGH)! - Web-Vault updated to v2023.5.0 (v2023.5.1 does not add any improvements for us) - The latest Bitwarden Directory Connector can be used now ([v2022.11.0](https://togithub.com/bitwarden/directory-connector/releases/tag/v2022.11.0)) - [Storing passkeys](https://bitwarden.com/passwordless-passkeys) is supported, though the clients are not yet released. So, it might be we need to make some changes once they are released. See: [#​3593](https://togithub.com/dani-garcia/vaultwarden/issues/3593), thanks [@​GeekCornerGH](https://togithub.com/GeekCornerGH)! #### What's Changed - check if reset password policy is enabled by [@​stefan0xC](https://togithub.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3427](https://togithub.com/dani-garcia/vaultwarden/pull/3427) - WebSockets via Rocket's Upgrade connection by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3404](https://togithub.com/dani-garcia/vaultwarden/pull/3404) - Several config and admin interface fixes by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3436](https://togithub.com/dani-garcia/vaultwarden/pull/3436) - Fixed missing footer_text and a few inconsistencies in email templates by [@​kennymc-c](https://togithub.com/kennymc-c) in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://togithub.com/dani-garcia/vaultwarden/pull/3439) - Small update to Rocket WebSockets by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3440](https://togithub.com/dani-garcia/vaultwarden/pull/3440) - inline static rsa keys by [@​vilgotf](https://togithub.com/vilgotf) in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://togithub.com/dani-garcia/vaultwarden/pull/3475) - Update Rust and Crates by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3469](https://togithub.com/dani-garcia/vaultwarden/pull/3469) - Change `String` to `&str` for all Rocket functions and some other fixes by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3491](https://togithub.com/dani-garcia/vaultwarden/pull/3491) - Use Rocket `v0.5` branch to fix endpoints by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3502](https://togithub.com/dani-garcia/vaultwarden/pull/3502) - Use fully qualified image names in Dockerfile by [@​gitouche-sur-osm](https://togithub.com/gitouche-sur-osm) in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://togithub.com/dani-garcia/vaultwarden/pull/3505) - policy data should be `null` not an empty object by [@​stefan0xC](https://togithub.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3513](https://togithub.com/dani-garcia/vaultwarden/pull/3513) - update web-vault to v2023.4.2 by [@​stefan0xC](https://togithub.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3522](https://togithub.com/dani-garcia/vaultwarden/pull/3522) - Sync global_domains.json (Pinterest) by [@​jjlin](https://togithub.com/jjlin) in [https://github.com/dani-garcia/vaultwarden/pull/3532](https://togithub.com/dani-garcia/vaultwarden/pull/3532) - Prevent 401 on main admin page by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3547](https://togithub.com/dani-garcia/vaultwarden/pull/3547) - Update crates and GH Workflow by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3548](https://togithub.com/dani-garcia/vaultwarden/pull/3548) - Fix collection change ws notifications by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3546](https://togithub.com/dani-garcia/vaultwarden/pull/3546) - Update Rust and Crates by [@​tessus](https://togithub.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3563](https://togithub.com/dani-garcia/vaultwarden/pull/3563) - feat: Implement Push Notifications sync by [@​GeekCornerGH](https://togithub.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3304](https://togithub.com/dani-garcia/vaultwarden/pull/3304) - Implement the Organization API Key support for the new Directory Connector v2022 by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3568](https://togithub.com/dani-garcia/vaultwarden/pull/3568) - Add mobile push device filter to non-null push uuid by [@​quexten](https://togithub.com/quexten) in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://togithub.com/dani-garcia/vaultwarden/pull/3578) - Update crates and workflow by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3603](https://togithub.com/dani-garcia/vaultwarden/pull/3603) - Add group import on invite by [@​farodin91](https://togithub.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3606](https://togithub.com/dani-garcia/vaultwarden/pull/3606) - Fix send access regression by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3608](https://togithub.com/dani-garcia/vaultwarden/pull/3608) - feat: Support for storing passkeys in the vault by [@​GeekCornerGH](https://togithub.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3593](https://togithub.com/dani-garcia/vaultwarden/pull/3593) - add user to collection during creation by [@​farodin91](https://togithub.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3609](https://togithub.com/dani-garcia/vaultwarden/pull/3609) - Updated docker run command by [@​DenuxPlays](https://togithub.com/DenuxPlays) in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://togithub.com/dani-garcia/vaultwarden/pull/3620) - Added-External_id for Collections by [@​fashberg](https://togithub.com/fashberg) in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://togithub.com/dani-garcia/vaultwarden/pull/3623) - fix missing password check while manual reset password enrollment by [@​sirux88](https://togithub.com/sirux88) in [https://github.com/dani-garcia/vaultwarden/pull/3632](https://togithub.com/dani-garcia/vaultwarden/pull/3632) - Update crates and small clippy fix by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3649](https://togithub.com/dani-garcia/vaultwarden/pull/3649) - fix version when compiled at a specific commit by [@​tessus](https://togithub.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3651](https://togithub.com/dani-garcia/vaultwarden/pull/3651) - Fix org creation regresion by [@​BlackDex](https://togithub.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3659](https://togithub.com/dani-garcia/vaultwarden/pull/3659) #### New Contributors - [@​kennymc-c](https://togithub.com/kennymc-c) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://togithub.com/dani-garcia/vaultwarden/pull/3439) - [@​vilgotf](https://togithub.com/vilgotf) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://togithub.com/dani-garcia/vaultwarden/pull/3475) - [@​gitouche-sur-osm](https://togithub.com/gitouche-sur-osm) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://togithub.com/dani-garcia/vaultwarden/pull/3505) - [@​quexten](https://togithub.com/quexten) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://togithub.com/dani-garcia/vaultwarden/pull/3578) - [@​DenuxPlays](https://togithub.com/DenuxPlays) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://togithub.com/dani-garcia/vaultwarden/pull/3620) - [@​fashberg](https://togithub.com/fashberg) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://togithub.com/dani-garcia/vaultwarden/pull/3623) **Full Changelog**: dani-garcia/vaultwarden@1.28.1...1.29.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on saturday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/arthurgeek/vaultwarden-fly-template). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Partially fixes #3577.
Over time, old devices accumulate in the SQL device table. Even when the device push uuid is NULL, a push request is sent for them when mobile push is active. For my server, this lead to ~100 requests to the Bitwarden push servers without a single active mobile push client, and a request time of ~15 seconds.
This requests adds a filter to prevent mobile push notifications from being sent to clients who did not even register for mobile push.