Closed Bug 1750844 Opened 2 years ago Closed 2 years ago

Make Push to use the client principal in window

Categories

(Core :: DOM: Push Subscriptions, task)

task

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: timhuang, Assigned: timhuang)

References

Details

Attachments

(3 files)

We have moved to use ForeignPartitionedPrincipal for ServiceWorkers in Bug 1731982 and Bug 1731990. So, Push will use the foreignPartitionedPrincipal in the worker scope. However, we are still using node principal in the window scope. This can cause some issues when accessing PushManager in the window scope because node principal may have a different parititonKey from the ForeignPartitionedPrincipal.

We can fix the issue by using the client principal for Push in the window scope. The client principal is using ForeignPartitionedPrincipal and it matches the principal used in the service worker.

Blocks: 1750013

This patch changes Push to use client principal. The client principal
will be used for service workers. Therefore, push should also use client
principal.

Depends on D136319

Pushed by tihuang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/03cad3a7f83a
Part 1: Expose client principal to windows. r=smaug
https://hg.mozilla.org/integration/autoland/rev/6cafcdebb62e
Part 2: Using client principal in Push. r=asuth
https://hg.mozilla.org/integration/autoland/rev/cd17dbda375e
Part 3: Modify the push test to use client principal. r=asuth
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: