[wpt-sync] Sync PR 63435 - [wpt] Fix webauthn add_credential/invalid.py null signCount expectation
Categories
(Remote Protocol :: Marionette, task, P4)
Tracking
(firefox160 fixed)
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Blocks 2 open bugs, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 63435 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63435
Details from upstream follow.
Mike Taylor <miketaylr@chromium.org> wrote:
[wpt] Fix webauthn add_credential/invalid.py null signCount expectation
The test asserted that
signCount: nullmust be rejected with
"invalid argument". However, w3c/webauthn#2382 made signCount nullable
to represent a credential without a signature counter, and ChromeDriver
implements this (see crrev.com/c/fc0cd539d551b "[chromedriver] Support
null signature counters"). The sibling set_credential_properties/set.py
test already treatsNoneas a valid signCount, so invalid.py was
internally inconsistent with the rest of the suite. This made
test_sign_count_invalid_type[None] fail deterministically on all
platforms.Remove
Nonefrom the invalid-type cases and add a positive test in
add.py asserting that a credential with a null signCount is accepted
and read back withsignCount == null.Removes the [ Failure ] expectation. Both add.py and invalid.py pass
locally with run_wpt_tests.py (36 subtests).Bug: 533056772
Change-Id: Ia8cecaf642a11dcfeab2ddf7830de6d4331be7a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8540564
Reviewed-by: Martin Kreichgauer \<martinkr@google.com>
Auto-Submit: Mike Taylor \<miketaylr@chromium.org>
Commit-Queue: Martin Kreichgauer \<martinkr@google.com>
Cr-Commit-Position: refs/heads/main@{#1714914}
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=102810
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 2 tests and 36 subtests
Status Summary
Firefox
OK : 2
PASS : 39
FAIL : 3
Chrome
OK : 1
PASS : 36
TIMEOUT: 1
Safari
OK : 2
FAIL : 1
ERROR : 41
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /webdriver/tests/classic/external/webauthn/add_credential/add.py [wpt.fyi]
- test_add_credential_with_large_blob:
FAIL(Safari:ERROR) - test_add_credential_with_null_sign_count:
FAIL(Safari:ERROR)
- test_add_credential_with_large_blob:
- /webdriver/tests/classic/external/webauthn/add_credential/invalid.py [wpt.fyi]
- test_user_handle_missing_for_resident_credential:
FAIL(Chrome:PASS, Safari:ERROR)
- test_user_handle_missing_for_resident_credential:
Comment 3•1 month ago
|
||
Michael, this is for your information. Not sure if there is a platform specific bug filed for it yet, but in Firefox we will see the tests failing with the upcoming changes.
Comment 5•1 month ago
•
|
||
Thanks! The actual error in test_add_credential_with_null_sign_count is at assert_success(response):
AssertionError: invalid argument (400): invalid type: null, expected u64 at line 1 column 306
The deserialisation error is probably thrown from WebDriver, because sign_count is declared as u64 (and also in geckodriver here), so serde throws a validation error.
Changing this field is related to Bug 2066804, and may also hit the issue noted in Bug 2064129, but slightly more complicated, because signCount will now also need an undefined state (ie: Option<u64> isn't enough because it makes null == undefined).
serde-json #376 says that serde doesn't actually support tracking field presence. There's a workaround using Option<Option<T>>.
https://hg.mozilla.org/mozilla-central/rev/f8801424e7b0
https://hg.mozilla.org/mozilla-central/rev/9f4936952535
Comment 7•1 month ago
|
||
(In reply to Michael Farrell [:mfarrell] from comment #5)
The deserialisation error is probably thrown from WebDriver, because
sign_countis declared asu64(and also in geckodriver here), so serde throws a validation error.
Thanks. Michael, if it's something you want to see fixed in geckodriver sooner than later it would be a good idea to get this updated now. I'm about to release a new version soon - and it's not clear yet when the next one will follow. If you want this update to be included, maybe you could fix it? Note that we already use Option<Option<T>> for session timeouts definitions so it sounds fine.
Comment 8•1 month ago
|
||
Even if it was fixed in WebDriver, the field type change (to allow null) would need to be propagated to nsIWebAuthnService (and all its implementations), authrs_bridge's TestToken, and need to sort out the XPCOM nullability issue.
At best this would probably move the failure later in the function, as signCount would be set to 0.
I've opened Bug 2081517 to sort this properly.
Updated•1 month ago
|
Description
•