-
-
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
feat: Implement Push Notifications sync #3304
feat: Implement Push Notifications sync #3304
Conversation
Thanks for the contribution. I have not looked at the changes yet but can you run |
Sure thing, will do it later |
Removed pretty much every error. |
0bb3a9f
to
0ac90bc
Compare
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'm looking at the code right now.
At a first glance the code looks ok, but have not looked detailed at it.
First things that i notice are the following.
There are two migrations done on the database, while that could be done in one go, which would make a down.sql
a bit easier I think, and probably wanted.
Also, i have not checked what the effects are yet of this change, since there is a primary key on the old UUID
and USER_UUID
combined. I don't know if that will break stuff with this rename.
I still tend do keep uuid
as is, and use push_token
as a new column. Even though that deviates from upstream Bitwarden. But we can put that into the comments at the object.
I also see a lot of extra calls being done in regards to pushing these notifications.
Now every function which has a nt.send...
also has a push_...
in there.
Can't we merge this in some way and just have one entry point for sending out changes?
Like, and the push::
to the notifications.rs
file?
That would solve future notification updates or additions to just add one, instead of two calls every time.
migrations/mysql/2023-02-18-133907_create-new-uuid-table/up.sql
Outdated
Show resolved
Hide resolved
0ac90bc
to
59da014
Compare
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.
Some more reviews from my side.
I haven't fully checked everything detailed though.
59da014
to
97d7792
Compare
97d7792
to
ae3a5c6
Compare
@GeekCornerGH , my apologies already for my changes, hope it won't be to hard to merge hehe. |
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.
The SQL statements are wrong. I am not sure how they ever ran successfully during a migration.
The proper statement is ALTER TABLE bla ADD COLUMN ...
Wooops, I guess git didn't caught the changes 😂 I'll rebase anyways |
5a6bfe3
to
adeba68
Compare
adeba68
to
8b5cffe
Compare
@tessus since GitHub won't allow me to request 2 reviewers at one time, I just tag you haha, is everything fine 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 there are still 2 points outstanding, from other reviewers:
- don't add an option in config.rs for
PUSH_RELAY_URI
(or at least it should not be public for now) - merge the function calls
ad 1) currently there is only one push server and setting it to anything other than the bw address won't work. It is too error prone to allow users to change this value. However, in the code the variable should still be used, since bw might introduce other servers or allow customers to setup their own push server (which would also require a change in he client code).
ad 2) currently there are always 2 fuction calls, as an example:
send_folder_update(...)
push_folder_update(...)
If I understood BlackDex's comment correctly, the second call should be added to the first one:
fn send_folder_update(...) {
original code;
if (PUSH_ENABLED) {
push_folder_update(...);
}
}
But I am not the right person to review the entire PR. Someone who actually knows Rust (I only dabble with it) and the code base will hvae to do a proper review.
Thank you @tessus for your remarks. @BlackDex : could you please confirm that the code suggested by @tessus is what you inteded? Can we simply call Thank you in advance for your feedback |
My main point is i don't like to have two functions being called at all those functions while using the same arguments. But i do think the |
@BlackDex thanks for the answer. I get your point. My main concern is that we're not very deep into rust development, We're happy to learn and do, we just need a bit of guidance on the best practices and on how Vaultwarden may develop. Does it make sense to keep push calls and websocket notifications in two separate files, or should we merge them |
I think this is up to you. Everyone has their preference. I don't see an issue to have 2 files. I suspect other reviewers would have already objected otherwise.
Personally I'd just go for it. It's just a bit of refactoring. But BlackDex also mentioned that a wrapper might be beneficial. However, as a first step, I'd just try adding it to the impl block and see what happens. ;-) |
@GeekCornerGH It seems you are merging main into your PR. You need to rebase it. Currently your PR has so many changes that do not even belong to this PR that it makes reviewing it a real mess. e.g. you added 2 commits. None of them had anything to do with BlackDex's review. But I had to read all of it to find that out, and I might have missed somthing since BlackDex had quite a few comments. |
I'm in fact using rebase, not merge. Also I missed BlackDex's comments, as my phone didn't showed the reviews themselves. Checking this rn Edit: I guess the multiple commits are shown if you had the pull request page open and GitHub caught up the changes. |
This is very strange then. Maybe I clicked on the wrong button. I think I clicked on In that case my apologies. My bad. |
4ec5334
to
8a21c2d
Compare
5a290bc
to
5fac9f2
Compare
5fac9f2
to
05b0eca
Compare
Latest changes were tested against 2 cloned AVD, running the latest apk 2023.05.0 |
Looks nice, some final tweaks i think. |
05b0eca
to
26322c2
Compare
Co-authored-by: samb-devel <[email protected]> Co-authored-by: Zoruk <[email protected]>
26322c2
to
2d66292
Compare
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [vaultwarden/server](https://github.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://github.com/dani-garcia/vaultwarden/releases/tag/1.29.0) [Compare Source](https://github.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://github.com/dani-garcia/vaultwarden/issues/3304) thanks [@​GeekCornerGH](https://github.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://github.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://github.com/dani-garcia/vaultwarden/issues/3593), thanks [@​GeekCornerGH](https://github.com/GeekCornerGH)! #### What's Changed - check if reset password policy is enabled by [@​stefan0xC](https://github.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3427](https://github.com/dani-garcia/vaultwarden/pull/3427) - WebSockets via Rocket's Upgrade connection by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3404](https://github.com/dani-garcia/vaultwarden/pull/3404) - Several config and admin interface fixes by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3436](https://github.com/dani-garcia/vaultwarden/pull/3436) - Fixed missing footer_text and a few inconsistencies in email templates by [@​kennymc-c](https://github.com/kennymc-c) in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://github.com/dani-garcia/vaultwarden/pull/3439) - Small update to Rocket WebSockets by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3440](https://github.com/dani-garcia/vaultwarden/pull/3440) - inline static rsa keys by [@​vilgotf](https://github.com/vilgotf) in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://github.com/dani-garcia/vaultwarden/pull/3475) - Update Rust and Crates by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3469](https://github.com/dani-garcia/vaultwarden/pull/3469) - Change `String` to `&str` for all Rocket functions and some other fixes by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3491](https://github.com/dani-garcia/vaultwarden/pull/3491) - Use Rocket `v0.5` branch to fix endpoints by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3502](https://github.com/dani-garcia/vaultwarden/pull/3502) - Use fully qualified image names in Dockerfile by [@​gitouche-sur-osm](https://github.com/gitouche-sur-osm) in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://github.com/dani-garcia/vaultwarden/pull/3505) - policy data should be `null` not an empty object by [@​stefan0xC](https://github.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3513](https://github.com/dani-garcia/vaultwarden/pull/3513) - update web-vault to v2023.4.2 by [@​stefan0xC](https://github.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3522](https://github.com/dani-garcia/vaultwarden/pull/3522) - Sync global_domains.json (Pinterest) by [@​jjlin](https://github.com/jjlin) in [https://github.com/dani-garcia/vaultwarden/pull/3532](https://github.com/dani-garcia/vaultwarden/pull/3532) - Prevent 401 on main admin page by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3547](https://github.com/dani-garcia/vaultwarden/pull/3547) - Update crates and GH Workflow by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3548](https://github.com/dani-garcia/vaultwarden/pull/3548) - Fix collection change ws notifications by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3546](https://github.com/dani-garcia/vaultwarden/pull/3546) - Update Rust and Crates by [@​tessus](https://github.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3563](https://github.com/dani-garcia/vaultwarden/pull/3563) - feat: Implement Push Notifications sync by [@​GeekCornerGH](https://github.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3304](https://github.com/dani-garcia/vaultwarden/pull/3304) - Implement the Organization API Key support for the new Directory Connector v2022 by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3568](https://github.com/dani-garcia/vaultwarden/pull/3568) - Add mobile push device filter to non-null push uuid by [@​quexten](https://github.com/quexten) in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://github.com/dani-garcia/vaultwarden/pull/3578) - Update crates and workflow by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3603](https://github.com/dani-garcia/vaultwarden/pull/3603) - Add group import on invite by [@​farodin91](https://github.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3606](https://github.com/dani-garcia/vaultwarden/pull/3606) - Fix send access regression by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3608](https://github.com/dani-garcia/vaultwarden/pull/3608) - feat: Support for storing passkeys in the vault by [@​GeekCornerGH](https://github.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3593](https://github.com/dani-garcia/vaultwarden/pull/3593) - add user to collection during creation by [@​farodin91](https://github.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3609](https://github.com/dani-garcia/vaultwarden/pull/3609) - Updated docker run command by [@​DenuxPlays](https://github.com/DenuxPlays) in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://github.com/dani-garcia/vaultwarden/pull/3620) - Added-External_id for Collections by [@​fashberg](https://github.com/fashberg) in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://github.com/dani-garcia/vaultwarden/pull/3623) - fix missing password check while manual reset password enrollment by [@​sirux88](https://github.com/sirux88) in [https://github.com/dani-garcia/vaultwarden/pull/3632](https://github.com/dani-garcia/vaultwarden/pull/3632) - Update crates and small clippy fix by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3649](https://github.com/dani-garcia/vaultwarden/pull/3649) - fix version when compiled at a specific commit by [@​tessus](https://github.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3651](https://github.com/dani-garcia/vaultwarden/pull/3651) - Fix org creation regresion by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3659](https://github.com/dani-garcia/vaultwarden/pull/3659) #### New Contributors - [@​kennymc-c](https://github.com/kennymc-c) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://github.com/dani-garcia/vaultwarden/pull/3439) - [@​vilgotf](https://github.com/vilgotf) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://github.com/dani-garcia/vaultwarden/pull/3475) - [@​gitouche-sur-osm](https://github.com/gitouche-sur-osm) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://github.com/dani-garcia/vaultwarden/pull/3505) - [@​quexten](https://github.com/quexten) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://github.com/dani-garcia/vaultwarden/pull/3578) - [@​DenuxPlays](https://github.com/DenuxPlays) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://github.com/dani-garcia/vaultwarden/pull/3620) - [@​fashberg](https://github.com/fashberg) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://github.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>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [vaultwarden/server](https://github.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://github.com/dani-garcia/vaultwarden/releases/tag/1.29.0) [Compare Source](https://github.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://github.com/dani-garcia/vaultwarden/issues/3304) thanks [@​GeekCornerGH](https://github.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://github.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://github.com/dani-garcia/vaultwarden/issues/3593), thanks [@​GeekCornerGH](https://github.com/GeekCornerGH)! #### What's Changed - check if reset password policy is enabled by [@​stefan0xC](https://github.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3427](https://github.com/dani-garcia/vaultwarden/pull/3427) - WebSockets via Rocket's Upgrade connection by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3404](https://github.com/dani-garcia/vaultwarden/pull/3404) - Several config and admin interface fixes by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3436](https://github.com/dani-garcia/vaultwarden/pull/3436) - Fixed missing footer_text and a few inconsistencies in email templates by [@​kennymc-c](https://github.com/kennymc-c) in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://github.com/dani-garcia/vaultwarden/pull/3439) - Small update to Rocket WebSockets by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3440](https://github.com/dani-garcia/vaultwarden/pull/3440) - inline static rsa keys by [@​vilgotf](https://github.com/vilgotf) in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://github.com/dani-garcia/vaultwarden/pull/3475) - Update Rust and Crates by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3469](https://github.com/dani-garcia/vaultwarden/pull/3469) - Change `String` to `&str` for all Rocket functions and some other fixes by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3491](https://github.com/dani-garcia/vaultwarden/pull/3491) - Use Rocket `v0.5` branch to fix endpoints by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3502](https://github.com/dani-garcia/vaultwarden/pull/3502) - Use fully qualified image names in Dockerfile by [@​gitouche-sur-osm](https://github.com/gitouche-sur-osm) in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://github.com/dani-garcia/vaultwarden/pull/3505) - policy data should be `null` not an empty object by [@​stefan0xC](https://github.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3513](https://github.com/dani-garcia/vaultwarden/pull/3513) - update web-vault to v2023.4.2 by [@​stefan0xC](https://github.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3522](https://github.com/dani-garcia/vaultwarden/pull/3522) - Sync global_domains.json (Pinterest) by [@​jjlin](https://github.com/jjlin) in [https://github.com/dani-garcia/vaultwarden/pull/3532](https://github.com/dani-garcia/vaultwarden/pull/3532) - Prevent 401 on main admin page by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3547](https://github.com/dani-garcia/vaultwarden/pull/3547) - Update crates and GH Workflow by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3548](https://github.com/dani-garcia/vaultwarden/pull/3548) - Fix collection change ws notifications by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3546](https://github.com/dani-garcia/vaultwarden/pull/3546) - Update Rust and Crates by [@​tessus](https://github.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3563](https://github.com/dani-garcia/vaultwarden/pull/3563) - feat: Implement Push Notifications sync by [@​GeekCornerGH](https://github.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3304](https://github.com/dani-garcia/vaultwarden/pull/3304) - Implement the Organization API Key support for the new Directory Connector v2022 by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3568](https://github.com/dani-garcia/vaultwarden/pull/3568) - Add mobile push device filter to non-null push uuid by [@​quexten](https://github.com/quexten) in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://github.com/dani-garcia/vaultwarden/pull/3578) - Update crates and workflow by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3603](https://github.com/dani-garcia/vaultwarden/pull/3603) - Add group import on invite by [@​farodin91](https://github.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3606](https://github.com/dani-garcia/vaultwarden/pull/3606) - Fix send access regression by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3608](https://github.com/dani-garcia/vaultwarden/pull/3608) - feat: Support for storing passkeys in the vault by [@​GeekCornerGH](https://github.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3593](https://github.com/dani-garcia/vaultwarden/pull/3593) - add user to collection during creation by [@​farodin91](https://github.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3609](https://github.com/dani-garcia/vaultwarden/pull/3609) - Updated docker run command by [@​DenuxPlays](https://github.com/DenuxPlays) in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://github.com/dani-garcia/vaultwarden/pull/3620) - Added-External_id for Collections by [@​fashberg](https://github.com/fashberg) in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://github.com/dani-garcia/vaultwarden/pull/3623) - fix missing password check while manual reset password enrollment by [@​sirux88](https://github.com/sirux88) in [https://github.com/dani-garcia/vaultwarden/pull/3632](https://github.com/dani-garcia/vaultwarden/pull/3632) - Update crates and small clippy fix by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3649](https://github.com/dani-garcia/vaultwarden/pull/3649) - fix version when compiled at a specific commit by [@​tessus](https://github.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3651](https://github.com/dani-garcia/vaultwarden/pull/3651) - Fix org creation regresion by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3659](https://github.com/dani-garcia/vaultwarden/pull/3659) #### New Contributors - [@​kennymc-c](https://github.com/kennymc-c) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://github.com/dani-garcia/vaultwarden/pull/3439) - [@​vilgotf](https://github.com/vilgotf) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://github.com/dani-garcia/vaultwarden/pull/3475) - [@​gitouche-sur-osm](https://github.com/gitouche-sur-osm) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://github.com/dani-garcia/vaultwarden/pull/3505) - [@​quexten](https://github.com/quexten) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://github.com/dani-garcia/vaultwarden/pull/3578) - [@​DenuxPlays](https://github.com/DenuxPlays) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://github.com/dani-garcia/vaultwarden/pull/3620) - [@​fashberg](https://github.com/fashberg) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://github.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>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [vaultwarden/server](https://github.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://github.com/dani-garcia/vaultwarden/releases/tag/1.29.0) [Compare Source](https://github.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://github.com/dani-garcia/vaultwarden/issues/3304) thanks [@​GeekCornerGH](https://github.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://github.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://github.com/dani-garcia/vaultwarden/issues/3593), thanks [@​GeekCornerGH](https://github.com/GeekCornerGH)! #### What's Changed - check if reset password policy is enabled by [@​stefan0xC](https://github.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3427](https://github.com/dani-garcia/vaultwarden/pull/3427) - WebSockets via Rocket's Upgrade connection by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3404](https://github.com/dani-garcia/vaultwarden/pull/3404) - Several config and admin interface fixes by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3436](https://github.com/dani-garcia/vaultwarden/pull/3436) - Fixed missing footer_text and a few inconsistencies in email templates by [@​kennymc-c](https://github.com/kennymc-c) in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://github.com/dani-garcia/vaultwarden/pull/3439) - Small update to Rocket WebSockets by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3440](https://github.com/dani-garcia/vaultwarden/pull/3440) - inline static rsa keys by [@​vilgotf](https://github.com/vilgotf) in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://github.com/dani-garcia/vaultwarden/pull/3475) - Update Rust and Crates by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3469](https://github.com/dani-garcia/vaultwarden/pull/3469) - Change `String` to `&str` for all Rocket functions and some other fixes by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3491](https://github.com/dani-garcia/vaultwarden/pull/3491) - Use Rocket `v0.5` branch to fix endpoints by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3502](https://github.com/dani-garcia/vaultwarden/pull/3502) - Use fully qualified image names in Dockerfile by [@​gitouche-sur-osm](https://github.com/gitouche-sur-osm) in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://github.com/dani-garcia/vaultwarden/pull/3505) - policy data should be `null` not an empty object by [@​stefan0xC](https://github.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3513](https://github.com/dani-garcia/vaultwarden/pull/3513) - update web-vault to v2023.4.2 by [@​stefan0xC](https://github.com/stefan0xC) in [https://github.com/dani-garcia/vaultwarden/pull/3522](https://github.com/dani-garcia/vaultwarden/pull/3522) - Sync global_domains.json (Pinterest) by [@​jjlin](https://github.com/jjlin) in [https://github.com/dani-garcia/vaultwarden/pull/3532](https://github.com/dani-garcia/vaultwarden/pull/3532) - Prevent 401 on main admin page by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3547](https://github.com/dani-garcia/vaultwarden/pull/3547) - Update crates and GH Workflow by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3548](https://github.com/dani-garcia/vaultwarden/pull/3548) - Fix collection change ws notifications by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3546](https://github.com/dani-garcia/vaultwarden/pull/3546) - Update Rust and Crates by [@​tessus](https://github.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3563](https://github.com/dani-garcia/vaultwarden/pull/3563) - feat: Implement Push Notifications sync by [@​GeekCornerGH](https://github.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3304](https://github.com/dani-garcia/vaultwarden/pull/3304) - Implement the Organization API Key support for the new Directory Connector v2022 by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3568](https://github.com/dani-garcia/vaultwarden/pull/3568) - Add mobile push device filter to non-null push uuid by [@​quexten](https://github.com/quexten) in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://github.com/dani-garcia/vaultwarden/pull/3578) - Update crates and workflow by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3603](https://github.com/dani-garcia/vaultwarden/pull/3603) - Add group import on invite by [@​farodin91](https://github.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3606](https://github.com/dani-garcia/vaultwarden/pull/3606) - Fix send access regression by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3608](https://github.com/dani-garcia/vaultwarden/pull/3608) - feat: Support for storing passkeys in the vault by [@​GeekCornerGH](https://github.com/GeekCornerGH) in [https://github.com/dani-garcia/vaultwarden/pull/3593](https://github.com/dani-garcia/vaultwarden/pull/3593) - add user to collection during creation by [@​farodin91](https://github.com/farodin91) in [https://github.com/dani-garcia/vaultwarden/pull/3609](https://github.com/dani-garcia/vaultwarden/pull/3609) - Updated docker run command by [@​DenuxPlays](https://github.com/DenuxPlays) in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://github.com/dani-garcia/vaultwarden/pull/3620) - Added-External_id for Collections by [@​fashberg](https://github.com/fashberg) in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://github.com/dani-garcia/vaultwarden/pull/3623) - fix missing password check while manual reset password enrollment by [@​sirux88](https://github.com/sirux88) in [https://github.com/dani-garcia/vaultwarden/pull/3632](https://github.com/dani-garcia/vaultwarden/pull/3632) - Update crates and small clippy fix by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3649](https://github.com/dani-garcia/vaultwarden/pull/3649) - fix version when compiled at a specific commit by [@​tessus](https://github.com/tessus) in [https://github.com/dani-garcia/vaultwarden/pull/3651](https://github.com/dani-garcia/vaultwarden/pull/3651) - Fix org creation regresion by [@​BlackDex](https://github.com/BlackDex) in [https://github.com/dani-garcia/vaultwarden/pull/3659](https://github.com/dani-garcia/vaultwarden/pull/3659) #### New Contributors - [@​kennymc-c](https://github.com/kennymc-c) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3439](https://github.com/dani-garcia/vaultwarden/pull/3439) - [@​vilgotf](https://github.com/vilgotf) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3475](https://github.com/dani-garcia/vaultwarden/pull/3475) - [@​gitouche-sur-osm](https://github.com/gitouche-sur-osm) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3505](https://github.com/dani-garcia/vaultwarden/pull/3505) - [@​quexten](https://github.com/quexten) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3578](https://github.com/dani-garcia/vaultwarden/pull/3578) - [@​DenuxPlays](https://github.com/DenuxPlays) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3620](https://github.com/dani-garcia/vaultwarden/pull/3620) - [@​fashberg](https://github.com/fashberg) made their first contribution in [https://github.com/dani-garcia/vaultwarden/pull/3623](https://github.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>
I think you should delete |
For now we don't, since we need a transition from the old to the new way of websockets. And we don't want to break current installations. |
Implements the Push Notification feature
Resolves #2469
Push-demo.webm
Special thanks to @samb-devel for your help
How to test:
Get your keys from the Bitwarden website
Set environment variables to the required values:
PUSH_RELAY_URI is already configured to use default Bitwarden server.
Start the server, then test.
This was my first shot at Rust.