mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 01:35:54 +03:00
[GH-ISSUE #591] Question: Mobile app forks, what does it take? #389
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#389
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @grahamPegNetwork on GitHub (Aug 28, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/591
Hi there, I read several other issues discussing mobile sync and how either BitWarden would need to add functionality to their mobile apps, or they may need to be forked to handle notifications.
From what I understand, the upstream mobile applications use push notifications and somehow utilize firebase messaging/apple's (??).
A. Refer to a bitwarden_rs server (potentially what is happening in #443 ? )
B. Handle websocket connections? (probably horrible for battery drain come to think about it)
C. Simply run periodic polls to see if things need to sync. I don't really care if my phone is up to date to the second, as long as it gets changes within 5-15 minutes, and I don't have to manually trigger it.
I get iOS is challenging, I feel like with the right resources I should be able to build an APK with my server hardcoded in and distribute it to friends/family, right?
@grahamPegNetwork commented on GitHub (Aug 28, 2019):
Semi related (regarding sync):
What would it take to allow a server to register itself with BitWarden just like the self hosted version? As much as I would want 100% of my own infrastructure for notifications, hosting and sync, I did notice that the self hosted version handled syncing within seconds via the push notifications. All I did was register an installation ID. I won't make assumptions about how exactly the self hosted server triggers those notifications, but it happens somehow. I would love to 1. Figure out how to make the same thing happen with bitwarden_rs and 2. Run my own backend notification server that ultimately works with mobile.
/end brain dump
@dani-garcia commented on GitHub (Aug 28, 2019):
Well I never looked into it super deep but as far as I know the clients communicate with the
notifications.bitwarden.comendpoint when making changes and then the server contacts firebase or apple push notification services which are the ones that send the notification to the client.To replace it with our own would imply switching the hardcoded endpoint URL to bitwarden's service and point to an instance of our own, which we'd have to create, and changing the push notification services API keys on the apps code. Also the push notification connection might be tied to the app store listing, which might mean it won't be configurable like the server URLs are currently, not sure about that one.
Background websockets are probably impossible in iOS and would probably mean having a constantly running service on Android, with a notification open so the system doesn't kill it, as you say that can't be good for the battery.
Forcing a sync every so often could be reasonable, for example every time the app is open and if it hasn't synced in X time, trigger another sync. In theory the app already does this I think, but not sure what's the syncing logic (It might have been removed now that push notifications are here).
If we used upstream's server with a self hosted installation id that could work, but that would be still using the official server (though I don't think any sensitive data is sent). That said, that system is meant for the official self hosted solution, so I'm not sure about doing that unless we get the green light from the bitwarden devs.
@grahamPegNetwork commented on GitHub (Aug 28, 2019):
Okay good info. I was thinking of building the app and passing in the endpoint URL as part of the build process. I suppose it could be possible, if desired to run a single forked app for bitwarden_rs, however that would require some sort of registration/relay allowing _rs installations to push a notification through a main _rs server. Not ideal, but it would create the possibility of using an app store push notification. It would also require developer accounts/licenses, whatever those cost.
Regarding app based sync, I think it may be disabled like you said, due to push notifications. I intentionally kept some entries out of sync when testing and even locking/unlocking the app (and extension) did not result in a sync. (extension related to my websocket issues, unrelated)
I think the only way I could get mobile to update was A. Manual sync B. Log out / back in C. Maybe restart?
Regarding the last point, yes, I would ideally not like to use their servers, mainly due to keeping full isolation from their system, not relating to any privacy concerns.
Regarding push notifications, is it possible to use push notifications for sideloaded apps? I'm not sure if relying on google for notifications is the same thing as having an app store listing.
All in all, I feel like in terms of options, ranked from easiest to hardest:
So step 1: Have a conversation, step 2 discuss options/funding for option 2 if step 1 fails.
@mprasil commented on GitHub (Oct 11, 2019):
This feels like way out of scope of the
bitwarden_rsproject and should be closed. I'd love to see some independent 3rd party client implementations, but perhaps this is not the right project to do this under?@grahamPegNetwork commented on GitHub (Oct 18, 2019):
I see where you're coming from and I'm not sure I entirely agree.
When it comes to the official BW code and clients they have things handled. Sure, I could see somebody coming up with a 3rd party client, but I'd have to ask why. Even if you're using BitBetter I believe you're using their servers and the push notifications would work. (that was the main issue originally discussed)
The need for a 3rd party client relates to how _rs is an independent project/implementation of BW and does not rely on their servers. While I agree that other people forking the project may benefit from a client, as far as I can imagine, this seems like an issue limited to the _rs project.
I could be wrong, I mean if somebody forked BW entirely and wanted to run their own centralized registration servers they could, and would in turn need what is being discussed. That said, I haven't heard about anyone trying to do this and feel like it would at least be steered primarily by _rs people.
@mprasil commented on GitHub (Nov 11, 2019):
I'm going to close this as it feels a bit out of scope of this project. I don't think we have enough capacity to work on this. Obviously if anyone is interested, they are very welcome to submit a PR.