Skip to content

feat: Push Subscription keys#414

Merged
s-aga-r merged 5 commits into
frappe:developfrom
s-aga-r:jmap-push-auth
Apr 8, 2026
Merged

feat: Push Subscription keys#414
s-aga-r merged 5 commits into
frappe:developfrom
s-aga-r:jmap-push-auth

Conversation

@s-aga-r
Copy link
Copy Markdown
Collaborator

@s-aga-r s-aga-r commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for JMAP PushSubscription encryption keys by introducing site-level key management in Mail Settings, attaching keys during push subscription creation, and decrypting inbound encrypted push notifications.

Changes:

  • Add generation + validation of JMAP push encryption keys (P256DH/public, private key, auth secret) in Mail Settings with a UI action.
  • Include keys in PushSubscription create payload and enforce/decrypt aes128gcm encrypted push notifications when keys are configured.
  • Auto-generate keys during app install if missing.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
mail/mail/doctype/mail_settings/mail_settings.py Adds key validation, key generation, and helpers for base64/keypair consistency checks.
mail/mail/doctype/mail_settings/mail_settings.json Adds new Mail Settings fields/section for JMAP Push keys.
mail/mail/doctype/mail_settings/mail_settings.js Adds “Generate JMAP Push Keys” action with confirmation and server call.
mail/jmap/services/mail/push_subscription.py Passes PushSubscription keys through to JMAP set/create payload.
mail/install.py Generates site-level JMAP push keys on install when missing.
mail/client/doctype/push_subscription/push_subscription.py Attaches keys when creating push subscriptions; adds decryption routine for encrypted notifications.
mail/api/jmap.py Enforces encrypted push notifications when keys exist and decrypts request body accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mail/client/doctype/push_subscription/push_subscription.py
Comment thread mail/mail/doctype/mail_settings/mail_settings.py
Comment thread mail/mail/doctype/mail_settings/mail_settings.py
@s-aga-r s-aga-r marked this pull request as ready for review April 8, 2026 05:55
@s-aga-r s-aga-r requested a review from krantheman as a code owner April 8, 2026 05:55
@s-aga-r s-aga-r merged commit 5ccd563 into frappe:develop Apr 8, 2026
2 of 3 checks passed
@s-aga-r s-aga-r deleted the jmap-push-auth branch April 14, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants