Skip to content

End-to-end encrypted pushes on FCM, APNs and WNS - #79

Merged
LucaCappelletti94 merged 9 commits into
mainfrom
feat/encrypted-pushes
Oct 26, 2026
Merged

LucaCappelletti94 merged 9 commits into
mainfrom
feat/encrypted-pushes

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Owner

With the new encryption feature, pushups creates an RFC 8291 key pair on the device, keeps it in the platform key store, and reports the public half with the token, so the app's server can encrypt every push for that device whatever the transport. pushups decrypts before any callback runs, and Message.payload is the plaintext the server encrypted. The ciphertext travels under the pushups key of an FCM data message or an APNs payload, and as {"pushups":"..."} in a WNS raw body. Pushes without it arrive as before.

Token moves to a new pushups-token crate with serde, and its FCM, APNs and WNS variants gain a keys field. A new pushups-sender crate reads that token on the server and encrypts for it without compiling the app crate. #[notification_service] becomes #[rendering_handler] and also runs for every push on Android, Linux and Windows, where pushups shows the notification it returns. pushups::rotate_keys() replaces the keys and registers again. The MSRV rises to 1.88, which the Android and Windows key stores need.

The Android key store is a git dependency on open-source-cooperative/android-native-keyring-store#50, which adds the explicit context a headless push needs, so publishing waits for its release. The check that the iOS extension reads its key on a locked iPhone is still to be done by hand.

@LucaCappelletti94 LucaCappelletti94 added the enhancement New feature or request label Oct 26, 2026
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 395c4969-3756-4fea-bf27-c6c4c4b162fa
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.08637% with 58 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.52%. Comparing base (94eedb4) to head (78ef8cb).

Files with missing lines Patch % Lines
src/key_store.rs 84.04% 30 Missing ⚠️
src/android.rs 87.50% 5 Missing ⚠️
src/private.rs 92.59% 4 Missing ⚠️
android/src/main/kotlin/rs/pushups/Delivery.kt 57.14% 2 Missing and 1 partial ⚠️
src/backend.rs 0.00% 3 Missing ⚠️
pushups-macros/src/lib.rs 95.23% 2 Missing ⚠️
pushups-sender/src/lib.rs 98.96% 2 Missing ⚠️
pushups-token/src/serde_impl.rs 98.83% 2 Missing ⚠️
src/linux.rs 95.12% 2 Missing ⚠️
src/webpush_crypto.rs 60.00% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
+ Coverage   94.25%   94.52%   +0.26%     
==========================================
  Files          39       45       +6     
  Lines        4930     5937    +1007     
  Branches       58       61       +3     
==========================================
+ Hits         4647     5612     +965     
- Misses        244      285      +41     
- Partials       39       40       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@LucaCappelletti94
LucaCappelletti94 merged commit fc87b2c into main Oct 26, 2026
38 checks passed
@LucaCappelletti94
LucaCappelletti94 deleted the feat/encrypted-pushes branch October 26, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant