[go: nahoru, domu]

Closed Bug 1892021 Opened 4 months ago Closed 24 days ago

Implement a credential chooser for IdentityCredentials

Categories

(Core :: DOM: Credential Management, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: bvandersloot, Assigned: bvandersloot)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

No description provided.
No longer blocks: 1892020
Depends on: 1892020
Priority: -- → P1

I figured out that there is a cleaner way to load from disk that doesn't lose
the null-ness of results. This was causing UI issues across restarts.

Assignee: nobody → bvandersloot
Status: NEW → ASSIGNED

This is entirely behind a pref still, but having a prototype for consumers to play with
sooner than UI/UX review will be good.

Depends on D215005

Down the stack I need to change the argument to notify in the nsICredentialChosenCallback so it
can run in Javascript for testing. I make the change here that allows consumers of this class to
still get the IPCIdentityCredential in the resolve callback of the argument promise.

Depends on D215006

This is the meat of the chooser's logic.

Depends on D215007

I'm sorry. This is a big change to recent stuff, and worst of all is a big commit.

Decisions I made while implementing credential discovery backed me into a corner
where I couldn't have the UI actually get rendered. Particularly around where the
IPCs needed to happen and at what point we called into the main process and when
we returned.

The way it works now is that we do ONE IPC for a credentials.get call, doing most of
the work in the main process and only maybe doing one IPC down to the content process
to tell it to navigate.

This is neater and more secure to a compromised content process. However, a lot happens in
this patch.

Depends on D215008

Pushed by bvandersloot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e53013b48c21
part 1 - Fix storage service load of nulls from disk - r=pbz
https://hg.mozilla.org/integration/autoland/rev/f3f9691bb850
part 2 - Add credential chooser markup, style, and content - r=anti-tracking-reviewers,fluent-reviewers,desktop-theme-reviewers,flod,pbz,emilio
https://hg.mozilla.org/integration/autoland/rev/5e7c91612daa
part 3 - Credential chosen callback update to match new semantic - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/32d47ef1e1dd
part 4 - Add Credential Chooser Service logic - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/35c606aceb37
part 5 - Rearchitect IPC for discovery - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/5a76de33c183
part 6 - Fix mozilla-only lightweight FedCM WPT to avoid custom service calls - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/5d306569397d
part 7 - Credential Chooser UI tests - r=anti-tracking-reviewers,pbz

Backed out for causing build bustages in credentialChooser.ftl.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: RuntimeError: File "../../toolkit/components/credentialmanagement/credentialChooser.ftl" not found in /builds/worker/checkouts/gecko/browser/locales, /builds/worker/workspace/obj-build/browser/locales

Also, please check these bp-nu bustages too.

L.E. Please also check these wpt failures.

Flags: needinfo?(bvandersloot)

Case sensitivity strikes macos user. Fixing other bustage and faulure too.

Flags: needinfo?(bvandersloot)
Pushed by bvandersloot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/247cf5c06c25
part 1 - Fix storage service load of nulls from disk - r=pbz
https://hg.mozilla.org/integration/autoland/rev/2958972909b1
part 2 - Add credential chooser markup, style, and content - r=anti-tracking-reviewers,fluent-reviewers,desktop-theme-reviewers,flod,pbz,emilio
https://hg.mozilla.org/integration/autoland/rev/5d0683eaf762
part 3 - Credential chosen callback update to match new semantic - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/f3b48a85a13c
part 4 - Add Credential Chooser Service logic - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/5fa9f0cc8969
part 5 - Rearchitect IPC for discovery - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/12d8161339d7
part 6 - Fix mozilla-only lightweight FedCM WPT to avoid custom service calls - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/b5b5254bf660
part 7 - Credential Chooser UI tests - r=anti-tracking-reviewers,pbz

Backed out for causing mochitest failures related to browser_credential_chooser.js

[task 2024-07-24T20:38:38.634Z] 20:38:38     INFO - TEST-START | toolkit/components/credentialmanagement/tests/browser/browser_credential_chooser.js
[task 2024-07-24T20:38:38.658Z] 20:38:38     INFO - GECKO(8609) | [Child 8957: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 7f7a76d63400 == 1 [pid = 8957] [id = 0]
[task 2024-07-24T20:38:38.658Z] 20:38:38     INFO - GECKO(8609) | [Child 8957: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 1 (7f7a94df3a00) [pid = 8957] [serial = 1] [outer = 0]
[task 2024-07-24T20:38:38.660Z] 20:38:38     INFO - GECKO(8609) | [Child 8957: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 2 (7f7a76d63c00) [pid = 8957] [serial = 2] [outer = 7f7a94df3a00]
[task 2024-07-24T20:38:38.855Z] 20:38:38     INFO - GECKO(8609) | [Parent 8609, Main Thread] WARNING: BounceTrackingState::OnDocumentStartRequest failed.: 'NS_SUCCEEDED(rv)', file /builds/worker/checkouts/gecko/netwerk/ipc/DocumentLoadListener.cpp:2618
[task 2024-07-24T20:38:38.872Z] 20:38:38     INFO - GECKO(8609) | [Child 8957: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 3 (7f7a76d66c00) [pid = 8957] [serial = 3] [outer = 7f7a94df3a00]
[task 2024-07-24T20:38:39.018Z] 20:38:39     INFO - GECKO(8609) | [WARN  l10nregistry_ffi::env] L10nRegistry error: Missing resource in locale en-US: preview/CredentialChooser.ftl
[task 2024-07-24T20:38:39.019Z] 20:38:39     INFO - GECKO(8609) | [fluent] Couldn't find a message: credential-chooser-sign-in-button
[task 2024-07-24T20:38:39.020Z] 20:38:39     INFO - GECKO(8609) | [fluent] Couldn't find a message: credential-chooser-cancel-button
[task 2024-07-24T20:38:39.038Z] 20:38:39     INFO - GECKO(8609) | JavaScript error: , line 0: InvalidStateError: [fluent] Couldn't find a message: credential-chooser-sign-in-button
[task 2024-07-24T20:38:39.766Z] 20:38:39     INFO - GECKO(8609) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmpqbsr9x0z.mozrunner/runtests_leaks_tab_pid9067.log
[task 2024-07-24T20:38:39.789Z] 20:38:39     INFO - GECKO(8609) | [Child 9067, Main Thread] WARNING: could not set real-time limit in CubebUtils::InitLibrary: file /builds/worker/checkouts/gecko/dom/media/CubebUtils.cpp:757
[task 2024-07-24T20:38:40.922Z] 20:38:40     INFO - GECKO(8609) | [Child 8669: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 17 (7ff1e4a72800) [pid = 8669] [serial = 6] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:40.922Z] 20:38:40     INFO - GECKO(8609) | [Child 8669: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 16 (7ff1e4a6f400) [pid = 8669] [serial = 2] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:40.922Z] 20:38:40     INFO - GECKO(8609) | [Child 8669: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 15 (7ff1e4a74800) [pid = 8669] [serial = 10] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:40.922Z] 20:38:40     INFO - GECKO(8609) | [Child 8669: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 14 (7ff1e4a73800) [pid = 8669] [serial = 8] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:40.922Z] 20:38:40     INFO - GECKO(8609) | [Child 8669: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 13 (7ff1e4a71000) [pid = 8669] [serial = 4] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:40.922Z] 20:38:40     INFO - GECKO(8609) | [Child 8669: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 12 (7ff1e3885c00) [pid = 8669] [serial = 17] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:41.951Z] 20:38:41     INFO - GECKO(8609) | [Child 8719: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 4 (7f0b80161800) [pid = 8719] [serial = 4] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:41.953Z] 20:38:41     INFO - GECKO(8609) | [Child 8719: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 3 (7f0b8015d800) [pid = 8719] [serial = 3] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:41.953Z] 20:38:41     INFO - GECKO(8609) | [Child 8719: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (7f0b8015c000) [pid = 8719] [serial = 2] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:42.525Z] 20:38:42     INFO - GECKO(8609) | [Parent 8609: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 11 (7ff0077e8c00) [pid = 8609] [serial = 4] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:42.532Z] 20:38:42     INFO - GECKO(8609) | [Parent 8609: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 10 (7ff001ee1400) [pid = 8609] [serial = 9] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:42.914Z] 20:38:42     INFO - GECKO(8609) | [Child 8785: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f8556b67800 == 0 [pid = 8785] [id = 0] [url = about:blank]
[task 2024-07-24T20:38:42.924Z] 20:38:42     INFO - GECKO(8609) | [Child 8785: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 1 (7f8556257200) [pid = 8785] [serial = 1] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:44.259Z] 20:38:44     INFO - GECKO(8609) | [Child 8834: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (7fb40366b800) [pid = 8834] [serial = 2] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:47.118Z] 20:38:47     INFO - GECKO(8609) | [Child 8785: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 0 (7f8556b68000) [pid = 8785] [serial = 2] [outer = 0] [url = about:blank]
[task 2024-07-24T20:38:51.169Z] 20:38:51     INFO - GECKO(8609) | [Child 8957: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (7f7a76d63c00) [pid = 8957] [serial = 2] [outer = 0] [url = about:blank]
[task 2024-07-24T20:39:07.114Z] 20:39:07     INFO - GECKO(8609) | [Child 8669: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7ff1e4a73400 == 5 [pid = 8669] [id = 3] [url = moz-extension://822636b6-d278-413e-9c1e-48fae0bf5684/_generated_background_page.html]
[task 2024-07-24T20:39:11.258Z] 20:39:11     INFO - GECKO(8609) | [Child 8669: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 11 (7ff1e4254800) [pid = 8669] [serial = 7] [outer = 0] [url = moz-extension://822636b6-d278-413e-9c1e-48fae0bf5684/_generated_background_page.html]
[task 2024-07-24T20:39:15.329Z] 20:39:15     INFO - GECKO(8609) | [Child 8669: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 10 (7ff1e387d400) [pid = 8669] [serial = 14] [outer = 0] [url = moz-extension://822636b6-d278-413e-9c1e-48fae0bf5684/_generated_background_page.html]
[task 2024-07-24T20:40:08.717Z] 20:40:08     INFO - TEST-INFO | started process screentopng
[task 2024-07-24T20:40:08.998Z] 20:40:08     INFO - TEST-INFO | screentopng: exit 0
[task 2024-07-24T20:40:09.007Z] 20:40:09     INFO - Buffered messages logged at 20:38:38
[task 2024-07-24T20:40:09.007Z] 20:40:09     INFO - Entering test bound test_single_credential_dialog
[task 2024-07-24T20:40:09.007Z] 20:40:09     INFO - Buffered messages logged at 20:38:39
[task 2024-07-24T20:40:09.007Z] 20:40:09     INFO - Console message: [JavaScript Warning: "Missing resource in locale en-US: preview/CredentialChooser.ftl"]
[task 2024-07-24T20:40:09.007Z] 20:40:09     INFO - Console message: [JavaScript Warning: "[fluent] Couldn't find a message: credential-chooser-sign-in-button"]
[task 2024-07-24T20:40:09.007Z] 20:40:09     INFO - Console message: [JavaScript Warning: "[fluent] Couldn't find a message: credential-chooser-cancel-button"]
[task 2024-07-24T20:40:09.007Z] 20:40:09     INFO - Console message: [JavaScript Error: "InvalidStateError: [fluent] Couldn't find a message: credential-chooser-sign-in-button"]
[task 2024-07-24T20:40:09.007Z] 20:40:09     INFO - Buffered messages finished
[task 2024-07-24T20:40:09.007Z] 20:40:09     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/credentialmanagement/tests/browser/browser_credential_chooser.js | Test timed out - 
[task 2024-07-24T20:40:09.007Z] 20:40:09     INFO - GECKO(8609) | Completed ShutdownLeaks collections in process 8609
[task 2024-07-24T20:40:09.007Z] 20:40:09     INFO - TEST-START | Shutdown
Flags: needinfo?(bvandersloot)
Pushed by bvandersloot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3f49d83f85ec
part 1 - Fix storage service load of nulls from disk - r=pbz
https://hg.mozilla.org/integration/autoland/rev/d321b046e3ac
part 2 - Add credential chooser markup, style, and content - r=anti-tracking-reviewers,fluent-reviewers,desktop-theme-reviewers,flod,pbz,emilio
https://hg.mozilla.org/integration/autoland/rev/905fd0102183
part 3 - Credential chosen callback update to match new semantic - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/e8eca7aca938
part 4 - Add Credential Chooser Service logic - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/33bb13530242
part 5 - Rearchitect IPC for discovery - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/ad9a13b88c4a
part 6 - Fix mozilla-only lightweight FedCM WPT to avoid custom service calls - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/4961e9e4a0a4
part 7 - Credential Chooser UI tests - r=anti-tracking-reviewers,pbz

Backed out for causing bc failures on browser_credential_chooser.js

Backout link

Push with failures

Failure log

Wpt failures are also present with these failure lines: https://treeherder.mozilla.org/logviewer?job_id=467957577&repo=autoland&lineNumber=6670

Pushed by bvandersloot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/388dd1f6025a
part 1 - Fix storage service load of nulls from disk - r=pbz
https://hg.mozilla.org/integration/autoland/rev/e67224c9464b
part 2 - Add credential chooser markup, style, and content - r=anti-tracking-reviewers,fluent-reviewers,desktop-theme-reviewers,flod,pbz,emilio
https://hg.mozilla.org/integration/autoland/rev/55eea3c836a3
part 3 - Credential chosen callback update to match new semantic - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/f7de16d771fa
part 4 - Add Credential Chooser Service logic - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/fc3e3fde4091
part 5 - Rearchitect IPC for discovery - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/1b30ee6c2534
part 6 - Fix mozilla-only lightweight FedCM WPT to avoid custom service calls - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/7e08bac9cd1b
part 7 - Credential Chooser UI tests - r=anti-tracking-reviewers,pbz

Ah, I've realized my problem with that test. It was fixed later down the stack. Pushing the whole lot, since it passes:

https://treeherder.mozilla.org/jobs?repo=try&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&tier=1&revision=f716befdbf743cd44403160d8cbbc7099d0058f3

Flags: needinfo?(bvandersloot)
Pushed by bvandersloot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eba8ce6b348f
part 1 - Fix storage service load of nulls from disk - r=pbz
https://hg.mozilla.org/integration/autoland/rev/72b108bb7c3a
part 2 - Add credential chooser markup, style, and content - r=anti-tracking-reviewers,fluent-reviewers,desktop-theme-reviewers,flod,pbz,emilio
https://hg.mozilla.org/integration/autoland/rev/5f8a5419d394
part 3 - Credential chosen callback update to match new semantic - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/7eb447f12cd9
part 4 - Add Credential Chooser Service logic - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/b69c4cf25381
part 5 - Rearchitect IPC for discovery - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/98cf6e5c1549
part 6 - Fix mozilla-only lightweight FedCM WPT to avoid custom service calls - r=anti-tracking-reviewers,pbz
https://hg.mozilla.org/integration/autoland/rev/cb0b1184c972
part 7 - Credential Chooser UI tests - r=anti-tracking-reviewers,pbz
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: