Open Bug 1945969 Opened 3 days ago Updated 2 days ago

Make PWebAuthnTransaction a PWindowGlobal managee

Categories

(Core :: DOM: Web Authentication, enhancement, P3)

enhancement

Tracking

()

ASSIGNED

People

(Reporter: jschanck, Assigned: jschanck)

References

(Blocks 2 open bugs)

Details

Attachments

(4 files)

For the topOrigin part of Bug 1901809, we need to get the principal for the top document, which we can only do on the thread that owns the corresponding WindowGlobalParent in the parent process.

The PWebAuthnTransaction actor is currently managed by PBackground, which means that IPC messages are received by the parent process on the "Background" thread. As such, to handle Bug 1901809, we would need to dispatch from the "Background" thread to the "WindowGlobalParent" thread and then finally to some work thread from the background thread pool. If we make PWebAuthnTransaction a PWindowGlobal managee instead, then messages will be received on the "WindowGlobalParent" thread and we can dispatch immediately to the background thread pool after getting the required principals.

While we're doing this work, we should also take advantage of newer IPC tooling. In particular, we should make PWebAuthnTransaction not "ManualDealloc", and we should simplify the IPC message structure by using MozPromise returns.

This removes the "ConfirmRegister", "ConfirmSign", and "Abort" IPC messages in
favor of promise returns. It also removes the content-process generated
transaction identifier, which was really only used as a "cancellation
identifier". The parent process is now responsible for generating this
identifier. The content process doesn't need a cancellation identifier, because
each content process is only allowed to have one transaction in flight at any
given time.

It made sense to abstract some of the functionality of WebAuthnManager when we
supported U2F and WebAuthn. A separate base class is no longer useful.

Attachment #9464091 - Attachment description: WIP: Bug 1945969 - make PWebAuthnTransaction a PWindowGlobal managee. r=keeler → WIP: Bug 1945969 - part 1: make PWebAuthnTransaction a PWindowGlobal managee. r=keeler
Attachment #9464092 - Attachment description: WIP: Bug 1945969 - simplify WebAuthn IPC messages. r=keeler → WIP: Bug 1945969 - part 2: simplify WebAuthn IPC messages. r=keeler
Attachment #9464093 - Attachment description: WIP: Bug 1945969 - remove WebAuthnManagerBase. r=keeler → WIP: Bug 1945969 - part 3: remove WebAuthnManagerBase. r=keeler
Attachment #9464094 - Attachment description: WIP: Bug 1945969 - simplify android implementation of RecvIsUVPAA. r=keeler → WIP: Bug 1945969 - part 4: simplify android implementation of RecvIsUVPAA. r=keeler
Attachment #9464091 - Attachment description: WIP: Bug 1945969 - part 1: make PWebAuthnTransaction a PWindowGlobal managee. r=keeler → Bug 1945969 - part 1: make PWebAuthnTransaction a PWindowGlobal managee. r=keeler
Attachment #9464092 - Attachment description: WIP: Bug 1945969 - part 2: simplify WebAuthn IPC messages. r=keeler → Bug 1945969 - part 2: simplify WebAuthn IPC messages. r=keeler
Attachment #9464093 - Attachment description: WIP: Bug 1945969 - part 3: remove WebAuthnManagerBase. r=keeler → Bug 1945969 - part 3: remove WebAuthnManagerBase. r=keeler
Attachment #9464094 - Attachment description: WIP: Bug 1945969 - part 4: simplify android implementation of RecvIsUVPAA. r=keeler → Bug 1945969 - part 4: simplify android implementation of RecvIsUVPAA. r=keeler
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: