Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
docs: Explain security/data access model for E2EE push notifications.
Tim Abbotta9a25b9c564a
diff --git a/docs/production/mobile-push-notifications.md b/docs/production/mobile-push-notifications.mdindex 3c5d6cdb472..dde89dc40fc 100644--- a/docs/production/mobile-push-notifications.md+++ b/docs/production/mobile-push-notifications.md@@ -8,8 +8,9 @@ great mobile app experience.Google's and Apple's security model for mobile push notifications does not allowself-hosted Zulip servers to directly send mobile notifications to the Zulipmobile apps. The Zulip Mobile Push Notification Service solves this problem by-forwarding mobile push notifications generated by your server to the Zulip-mobile apps.+forwarding E2EE mobile push notifications generated by your server to the Zulip+mobile apps. With Zulip Server 12.0+ and an up-to-date Zulip mobile app, the+notifications are encrypted end-to-end from your server to your mobile device.## Signing up@@ -187,75 +188,113 @@ forwarding service).## Security and privacy+:::{note}Use of the push notification bouncer is subject to the Zulip Cloud [Terms ofService](https://zulip.com/policies/terms), [PrivacyPolicy](https://zulip.com/policies/privacy) and [Rules ofUse](https://zulip.com/policies/rules). By using push notifications, you agreeto these terms.+:::-We've designed this push notification bouncer service with security-and privacy in mind:--- Zulip Server 11.0+ supports a new end-to-end encrypted (E2EE)- protocol for mobile push notifications. Because mobile app support- for that protocol is not yet available, this documentation details- the legacy protocol. This documentation will be updated to reflect- on the new protocol's better privacy guarantees once [official- mobile app support][e2ee-flutter-issue] for the new protocol is- generally available.-- A central design goal of the Push Notification Service is to- avoid any message content being stored or logged by the service,- even in error cases.-- The Push Notification Service only stores the necessary metadata for- delivering the notifications to the appropriate devices and- otherwise operating the service:- - The APNS/FCM tokens needed to securely send mobile push- notifications to iOS and Android devices, one per device- registered to be notified by your Zulip server.- - User ID numbers generated by your Zulip server, needed to route- a given notification to the appropriate set of mobile devices.- These user ID numbers are opaque to the Push Notification- Service and Kandra Labs.- - [Basic organization metadata](#uploading-basic-metadata),- [optional usage statistics](#uploading-usage-statistics), and- aggregate statistics about how many push notifications are sent by- each customer.-- The Push Notification Service receives (but does not store) the- contents of individual mobile push notifications:+Zulip Server 12.0+ uses end-to-end encryption (E2EE) when sending push+notifications to the Zulip mobile app. E2EE ensures that message+**content** and **metadata** (including the sender's name, and the+recipient's name or channel and topic where the message was sent) are+not visible to Apple, Google, or Zulip's [Mobile Push Notification+Service](https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html).++The Zulip server encrypts the contents of each notification+with a per-device symmetric key shared between the Zulip server and the+user's mobile app. The Push Notification Service forwards the encrypted+payload without being able to decrypt it.++If either the Zulip Server or the mobile app is a version predating+the 12.0 release (April 2026) that does not support the E2EE protocol,+the [legacy push notifications protocol](#legacy-protocol) will be+used. Organization administrators can+[require](https://zulip.com/help/mobile-notifications#require-end-to-end-encryption-for-mobile-push-notifications)+E2EE for message content in mobile push notifications.- - The numeric message ID generated by your Zulip server.- - Metadata on the message's sender (name and avatar URL).- - Metadata on the message's recipient (channel name + ID, topic,- direct message recipients, etc.).- - A timestamp.- - The message's content.+If you have any questions about the security model, [contact Zulip+support](https://zulip.com/help/contact-support).- Zulip 11.0+ has an organization-level setting available to disable- message content being sent via the push notification bouncer (i.e.,- message content will be replaced with `New message`), for clients- that don't support the new end-to-end encrypted notifications- protocol. As of July 2025, this setting makes push notifications- significantly less usable, since mobile client support for- end-to-end encrypted push notifications is not yet available.+### What Apple, Google, and the Push Notification Service see- (Prior to Zulip 11.0, this functionality was available via the- `PUSH_NOTIFICATION_REDACT_CONTENT` server-level setting).+For each notification, the Push Notification Service receives and forwards to+Apple or Google:-- All of the network requests (both from Zulip servers to the Push- Notification Service and from the Push Notification Service to the- relevant Google and Apple services) are encrypted over the wire with- SSL/TLS.-- The code for the push notification forwarding service is 100% open- source and available as part of the- [Zulip server project on GitHub](https://github.com/zulip/zulip)- (specifically, [here](https://github.com/zulip/zulip/tree/main/zilencer)).-- The push notification forwarding servers are professionally managed- by a small team of security-sensitive engineers.+- The opaque APNs or FCM token identifying the target device (known to the+ service from registration, and never seen in plaintext by the Zulip server).+- An identifier selected by the mobile app (`push_key_id`) that the mobile app+ uses to select the correct decryption key. This identifier is opaque to+ the service.+- The encrypted notification payload (an XSalsa20+Poly1305+ ciphertext), forwarded to Apple or Google inside the push payload.+- The delivery priority (higher for a new message, lower for a notification+ removal).-If you have any questions about the security model, [contact Zulip-support](https://zulip.com/help/contact-support).+The notification contents — including the message, sender, recipient,+channel, and topic — are inside an encrypted ciphertext that Apple,+Google, and the service cannot decrypt.++All network requests — from Zulip servers to the Push Notification Service,+and from the Push Notification Service to Apple and Google — are encrypted+over the wire with SSL/TLS.++### What the Push Notification Service stores++The Push Notification Service stores the following metadata for as long as+a device's registration is active:++- The APNs and FCM tokens needed to deliver push notifications to iOS and+ Android devices, one per device registered with your Zulip server.+- [Basic organization metadata](#uploading-basic-metadata),+ [optional usage statistics](#uploading-usage-statistics), and aggregate+ statistics about how many push notifications are sent by each server.++### What the Zulip server sees++The Zulip server is the source of every notification it sends, and+holds the symmetric key used to encrypt each notification for+delivery.++E2EE makes notification contents opaque to Apple, Google, and the Push+Notification Service, but it does **not** protect against a compromised or+malicious Zulip server. Learn about [Zulip's approach to+security](https://zulip.com/security/), and [keep your server+safe](./securing-your-zulip-server.md).++### Limitations-[e2ee-flutter-issue]: https://github.com/zulip/zulip-flutter/issues/1764+The E2EE protocol has the following known limitations:++- **Incomplete forward secrecy.** A device's symmetric key persists until the+ mobile app rotates it (generally every 30 days), and is stored by both the+ mobile app and the Zulip server. An attacker who obtains both a historical+ capture of encrypted push payloads and the device's current key — for example,+ by compromising the mobile device or the Zulip server — can decrypt the+ notifications captured since the key was last rotated.++- **Metadata side channels.** The Push Notification Service, and+ indirectly Apple and Google, can observe the timing, delivery priority,+ and size of each push notification. These side channels can reveal+ coarse patterns of activity even though message contents are encrypted.++### Cryptography++The E2EE protocol encrypts each notification payload with libsodium's+`crypto_secretbox_easy` (XSalsa20-Poly1305 authenticated encryption) using+a per-device 256-bit symmetric key and a fresh 192-bit random nonce per+notification. Initial registration of a device with the Push Notification+Service uses libsodium's `crypto_box_seal` (Curve25519 + XSalsa20-Poly1305)+so that the Zulip server can forward the device's APNs/FCM token to the+bouncer without learning the token itself. A one-byte algorithm prefix on+each symmetric key reserves space for future cipher migrations.++The code for the push notification forwarding service is 100% open source,+and is available as part of the [Zulip server project on+GitHub](https://github.com/zulip/zulip) (specifically,+[here](https://github.com/zulip/zulip/tree/main/zilencer)).### Uploading basic metadata@@ -458,3 +497,51 @@ the `PUSH_NOTIFICATION_BOUNCER_URL = 'https://push.zulipchat.com'` line in your`/etc/zulip/settings.py` file (i.e., add `# ` at the start of the line), and[restart your Zulip server](settings.md#changing-server-settings). This approach makes iteasy to start using the service again by uncommenting the same line.++### Legacy protocol++Zulip Servers running 12.0+ sending notifications to a modern mobile+app version will always use the E2EE protocol. If either the Zulip+Server or the mobile app is a version predating the 12.0 release+(April 2026) that does not support the E2EE protocol, the legacy+non-E2EE protocol will be used.++The central design goal of the legacy Push Notification Service+service was to avoid any message content being stored or logged by the+service, even in error cases.++- The Push Notification Service only stores the necessary metadata for+ delivering the notifications to the appropriate devices and+ otherwise operating the service:+ - The APNS/FCM tokens needed to securely send mobile push+ notifications to iOS and Android devices, one per device+ registered to be notified by your Zulip server.+ - User ID numbers generated by your Zulip server, needed to route+ a given notification to the appropriate set of mobile devices.+ These user ID numbers are opaque to the Push Notification+ Service and Kandra Labs.+ - [Basic organization metadata](#uploading-basic-metadata),+ [optional usage statistics](#uploading-usage-statistics), and+ aggregate statistics about how many push notifications are sent by+ each customer.+- The Push Notification Service receives (but does not store) the+ contents of individual mobile push notifications:++ - The numeric message ID generated by your Zulip server.+ - Metadata on the message's sender (name and avatar URL).+ - Metadata on the message's recipient (channel name + ID, topic,+ direct message recipients, etc.).+ - A timestamp.+ - The message's content.++ Zulip 11.0+ has an organization-level setting available to disable+ message content being sent via the push notification bouncer (i.e.,+ message content will be replaced with `New message`), for clients+ that don't support the new end-to-end encrypted notifications+ protocol. (Prior to Zulip 11.0, this functionality was available via the+ `PUSH_NOTIFICATION_REDACT_CONTENT` server-level setting).++- All of the network requests (both from Zulip servers to the Push+ Notification Service and from the Push Notification Service to the+ relevant Google and Apple services) are encrypted over the wire with+ SSL/TLS.diff --git a/starlight_help/src/content/docs/mobile-notifications.mdx b/starlight_help/src/content/docs/mobile-notifications.mdxindex 6c7e722fc9f..15c5d2bb3a3 100644--- a/starlight_help/src/content/docs/mobile-notifications.mdx+++ b/starlight_help/src/content/docs/mobile-notifications.mdx@@ -30,23 +30,22 @@ topics](/help/follow-a-topic#configure-notifications-for-followed-topics).## End-to-end encryption (E2EE) for mobile push notifications-Zulip Server 12.0+ and Zulip Cloud support end-to-end encryption for mobile push-notifications. Support is [coming soon][e2ee-flutter-issue] to the Zulip mobile-app. Once implemented, all push notifications sent from an up-to-date version of-the server to an updated version of the app will be end-to-end encrypted. E2EE-push notifications ensure that message content and metadata (including the-sender's name, and the channel and topic where the message was sent) is not-visible to intermediaries.--[e2ee-flutter-issue]: https://github.com/zulip/zulip-flutter/issues/1764+Zulip Server 12.0+ and Zulip Cloud support end-to-end encrypted (E2EE) mobile+push notifications. E2EE ensures that message **content** and **metadata**+(including the sender's name, and the recipient's name or channel and topic+where the message was sent) are not visible to Apple, Google, or Zulip's+[Mobile Push Notification+Service](https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html).Organization administrators can require end-to-end encryption formessage content in mobile push notifications. When this setting isenabled, message content will be omitted when sending notifications toan app that doesn't support end-to-end encryption. Users will see “New-message” in place of message text. See [technical-documentation](https://zulip.readthedocs.io/en/latest/production/mobile-push-notifications.html#security-and-privacy)-for details.+message” in place of message text.++See [technical+documentation](https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html#security-and-privacy)+for encryption protocol details.### Require end-to-end encryption for mobile push notifications