However, we don't use the WebPush API between the push server and distributor since there is a lot of scope for innovation in that space (for example Google's FCM uses a custom XMPP based protocol).
[1] One example, https://github.com/UnifiedPush/dart-webpush-encryption
If you are sending a small amount of data it is likely a tiny overhead for some notable benefits.
1. If all data is encrypted then no data stands out for being encrypted.
2. It provides integrity which may prevent push servers from changing message to be invalid or triggering parsing bugs in applications.
3. If only encrypted messages are supported it is impossible for uses which do need encryption to forget to turn it on or accidentally turn it off.
For many apps the benefit here is indeed tiny, but so is the cost. So I think it is best to not support unencrypted messages altogether.
As a small project, ease of adoption has been our most important goal. However, as we work towards better WebPush compatibility [2], I personally absolutely want to promote RFC8291 encryption and make it easy to implement for developers using UnifiedPush, hopefully making it the norm.
[1] https://volkerkrause.eu/2022/11/12/kde-unifiedpush-push-noti...
As soon as you need encryption in at least one place in your software, it's going to happen.
I agree encryption should be the default choice though. Maybe we can introduce it in a future protocol revision? Client side, I expect most people use libraries, making this easy. Server side? Not so much.
The main goal was to get it adopted as widely as possible though, and encryption certainly seemed like something that would slow the effort.
While I understand that some developers may think of security as wasteful, having unencrypted data be the default relies on every developer to spend much more time considering the possible threat models and how . Case in point here is Matrix—the IDs they send aren't random at all, they actually send full room IDs and event IDs for each message, so you'd be able to build up someone's entire social graph just from reading their unencrypted push notification data and looking up room IDs on the Matrix server in question or even correlating room IDs across different Element installs. This also hurts users, since they're not in a position to inspect the source code and understand how or whether they need to trust their "push provider" with whatever data the app developers might have chosen to regard as "less sensitive"—WebPush's encryption-by-default design removes trust from the equation entirely and prevents of these sorts of "passive surveillance" attacks (except those based on timing or message length)
> You can then decrypt these notifications in the app
This pushes all of the complexity of supporting encryption onto the app developer, instead of having it be provided by the platform where it can be centrally audited and securely managed.
> However, we don't use the WebPush API between the push server and distributor since there is a lot of scope for innovation in that space (for example Google's FCM uses a custom XMPP based protocol).
Why not do this innovation in an open standards body like the IESG where other stakeholders can give feedback and review? The web push standard does allow for Push Servers to use other custom wire protocols besides the default RFC8030, but having open and standards-based discussion of the possible performance improvements would "lift all boats" in terms of being able to provide low-power devices with timely push notifications
I'm personally using UnifiedPush HTTP endpoints as-if they were Web Push, and it just works. I handle decryption manually on the receiving end.
Similar to how Apples push notification service works already (APN: https://en.wikipedia.org/wiki/Apple_Push_Notification_servic...)
It looks like the submission side of UnifiedPush could indeed have been Web Push-compatible but isn’t, though.
Exactly. It was discussed a bit early on whether to mandate encryption, but simplicity was chosen instead.
Adjusting the server protocol to make it compatible with WebPush is also being discussed: https://github.com/UnifiedPush/wishlist/issues/15
That would be useful for supporting Telegram, for instance. I don't really see it becoming mandatory, however.
Actually, the web push standard strongly recommends that you use RFC 8030 for this, but it does allow browsers to substitute other protocols as long as their semantics are the same https://datatracker.ietf.org/doc/html/rfc8030. I believe Mozilla and Edge both use HTTP Push, I'm not sure what Google uses on Desktop Chrome but I could see it going either way. Safari probably uses APNS.