-
Notifications
You must be signed in to change notification settings - Fork 174
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
Notify when updates are available (Mac & Windows) #189
Comments
ProtonVPN has a built-in update process. Maybe for mac we'd want to take inspiration from their implementation. Or maybe this is something build-in to macOS. Will have to investigate. update: this is done with the help of the Sparkle Project. |
I suggest that disabling update checks should prevent a built-in update feature from creating network requests, in addition to not displaying notifications that an update is available. This flow would account for the usecase where users prefer using a package manager, like Brew, to handle updates and rely on firewalls to control outbound network requests. A built-in update feature that triggers the firewall, despite the update feature being disabled, would be avoidably noisy and may create concern. |
@deeplow mentioned something interesting, that I was not aware of. There's a class of software, like Sparkle Project, that deals solely with safely updating an already installed application. So, before diving into how can Dangerzone notify users for updates, it would help laying down what's the current state with these update frameworks: Update FrameworksSparkle ProjectSparkle project seems to be the de-facto update framework in MacOS. Integrators in practice need to care about two things: creating a proper The client-side part is not very straight-forward, since Sparkle is written in Objective-C. Thankfully, there are others who have ventured into this before: https://fman.io/blog/codesigning-and-automatic-updates-for-pyqt-apps/ The server-side part is also not very straight-forward. For integrators that use GitHub releases (like us), this issue may be of help: sparkle-project/Sparkle#648 The Windows platform is not covered by Sparkle itself, but there are other projects, such as WinSparkle, that follow a similar approach. I see that there's a Python library ( Note that the Sparkle project is not a silver bullet. Development missteps can happen, and users can be left without updates. Here's an example issue that showcases this. The Update FrameworkThe Update Framework is a graduated CNCF project hosted by Linux Foundation. It's based on the Thandy updater for Tor. It's not widely adopted, but some of its adopters are high-profile, and it has passed security audits. It's more of a specification and less of a software project, although a well-maintained reference implementation in Python exists. Also, a Python project ( Regardless of whether we use it, knowing about the threat vectors that it's protecting against is very important. Other ProjectsQt has some updater framework as well: https://doc.qt.io/qtinstallerframework/ifw-updates.html |
Integrating with an update framework will certainly take a bit of work, especially given that we target both Windows and MacOS systems. In the meantime though, we can't have releases out without including at least a notification channel, since staying behind on updates has a huge negative impact on the users' safety. So, we can keep this issue scoped to just the notification part, and punt the problem of installing updates to a subsequent release. Here's a suggestion on how we can proceed. Design overviewEDIT 2023-07-19: After some discussions, which you can read below, and attempts to implement this update notification scheme, we decided to make some changes to the original design. One of those is to move away from the intrusive dialog pop-up route and instead introduce a hamburger menu that will allow notifications. The following design overview reflects these discussions. This feature introduces a hamburger icon that will be visible across almost all of the Dangerzone windows. This will be used to notify the users about updates. First runWe detect it's the first time Dangerzone runs because the Add the following keys in our
Note:
Second runWe detect it's the second time Dangerzone runs because Before starting up the main window, show this window:
Note:
Subsequent runsWe perform the following only if
Notes:
Error handlingWe trigger error handling when the updater thread encounters an error (either due to an HTTPS failure or a Python exception) and does not complete successfully.
|
Key Benefits
Security ConsiderationsBecause this approach does not download binaries / auto-updates, it does not add any more security issues than the existing, manual way of installing updates. These issues have to do with a compromised/malicous GitHub service, and are the following:
A good update framework would probably defend against 1,2,3. This is not to say that our users are currently unprotected, since 1-4 can be detected by the general public and the developers (unless GitHub specifically targets an individual, but that's another story). Usability Considerations
|
Thanks for digging into this. It certainly feels a bit like reinventing the wheel. But from your research nothing seems to be as simple as this solution. So I think I prefer it. Fallback mechanism
Fingers crossed that that API never ever changes. We should probably have our own fallback URL (even if generally inactive), just in case the user ever gets anything other than 200 OK. Considering Github outages, we may not want to rely fully on them. Strict version increase checking
Let's probably check if it's superior. Just as a sanity check? Check interval?We probably don't need to check every time the app starts. Maybe we a Way to change setting
Why not just add a discrete button to the bottom of the "select suspicious docs" window? Other notes
I think it's under FPF's control at the moment. But still any push will be mirrored so that probably still applies. |
Thanks much for the detailed research and thoughts :)
|
I had thought of something similar as well. If I get what you're saying, you talk about serving a file, probably with a different schema, under https://dangerzone.rocks, right? It makes sense, but:
I think this approach will add complexity with diminishing returns.
Doesn't matter much, because the attacker can say that they serve a later release, but in reality the binary may be an older one. There is no way to detect this unless you download the binary.
Pretty reasonable, I agree.
Oh, I hadn't considered touching our UI, before we have a UX discussion! I think what you're suggesting would tie really nice with @eloquence's suggestion for an inline notification in our GUI. I really like that
Mentioned it above; it's served by GitHub Pages actually. |
Add a new Python module called "updater", which contains the logic for prompting the user to enable updates, and checking our GitHub releases for new updates. This class has some light dependency to Qt functionality, since it needs to: * Show a prompt to the user, * Run update checks asynchronously in a Qt thread, * Provide the main window with the result of the update check Refs #189
Add a new Python module called "updater", which contains the logic for prompting the user to enable updates, and checking our GitHub releases for new updates. This class has some light dependency to Qt functionality, since it needs to: * Show a prompt to the user, * Run update checks asynchronously in a Qt thread, * Provide the main window with the result of the update check Refs #189
Add a new Python module called "updater", which contains the logic for prompting the user to enable updates, and checking our GitHub releases for new updates. This class has some light dependency to Qt functionality, since it needs to: * Show a prompt to the user, * Run update checks asynchronously in a Qt thread, * Provide the main window with the result of the update check Refs #189
Add a new Python module called "updater", which contains the logic for prompting the user to enable updates, and checking our GitHub releases for new updates. This class has some light dependency to Qt functionality, since it needs to: * Show a prompt to the user, * Run update checks asynchronously in a Qt thread, * Provide the main window with the result of the update check Refs #189
Add a design document for the update notifications mechanism, adapted from the write-up in the original GitHub issue. Refs #189
Add a design document for the update notifications mechanism, adapted from the write-up in the original GitHub issue. Refs #189
Notify the user when another release is available.
Evidence / Notes
On Windows and Mac, given the distribution method, there is currently no way for the user to be automatically informed about updates
The text was updated successfully, but these errors were encountered: