Closed Bug 1676679 Opened 4 years ago Closed 1 year ago

Connect authenticator-rs's WebDriver implementation to GeckoDriver

Categories

(Testing :: geckodriver, enhancement, P1)

enhancement

Tracking

(firefox118 fixed)

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: jcj, Assigned: keeler)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [webdriver:m8][webdriver:external], [wptsync upstream])

Attachments

(1 file)

Authenticator-rs has an optional feature webdriver which exposes a web service designed to implement the Virtual Authenticator API from WebAuthn.

The necessary work to hook it up and enable those Web Platform Tests is:

  1. Make Gecko compile-in the webdriver feature
  2. Make Gecko initialize the web service via the C interface when running in GeckoDriver mode. This will require a new C API point in authenticator-rs (https://github.com/mozilla/authenticator-rs/issues/144)
  3. Add code to GeckoDriver (mozilla-central/testing/geckodriver/src) to proxy requests for /session/{session id}/webauthn to the authenticator-rs service, stripping off the /session/{session id} portion that GeckoDriver has to manage. (See https://github.com/mozilla/authenticator-rs/blob/main/webdriver-tools/webdriver-driver.py for example of what the authenticator-rs code expects)
  4. Add code to GeckoDriver's capabilities model (https://searchfox.org/mozilla-central/source/testing/geckodriver/src/capabilities.rs) to reveal that WebAuthn is supported
Blocks: 1587563

Note that at step 3 we want to hook up marionette to authenticator_rs; that's where the actual implementation of WebDriver commands lives and will be enough to get the wpt working (since it uses marionette directly). GeckoDriver itself is more or less just a proxy between HTTP and marionette, so there are some changes required there but it's mostly just boilerplate.

I can provide any help required with the GeckoDriver and marionette parts.

The severity field is not set for this bug.
:jcj, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jc)
Severity: -- → N/A
Type: defect → enhancement
Flags: needinfo?(jc)
Priority: -- → P1
Assignee: nobody → bugs
Status: NEW → ASSIGNED

As this is work on geckodriver I'm going ahead and moving this bug to the appropriate component.

Component: DOM: Web Authentication → geckodriver
Product: Core → Testing
Attachment #9304569 - Attachment description: WIP: Bug 1676679 - WIP → Bug 1676679 - part 1: add virtual authenticator stubs to GeckoDriver. r=jgraham

The bug assignee is inactive on Bugzilla, and this bug has priority 'P1'.
:whimboo, could you have a look please?

For more information, please visit auto_nag documentation.

Assignee: bugs → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(hskupin)
Flags: needinfo?(hskupin)
Assignee: nobody → jschanck
Status: NEW → ASSIGNED
Depends on: 1838894
Attachment #9304569 - Attachment description: Bug 1676679 - part 1: add virtual authenticator stubs to GeckoDriver. r=jgraham → Bug 1676679 - support webdriver virtual authenticator functions in marionette r?jgraham
Assignee: jschanck → dkeeler
No longer blocks: 1846574
Depends on: 1846574
Attachment #9304569 - Attachment description: Bug 1676679 - support webdriver virtual authenticator functions in marionette r?jgraham → Bug 1676679 - support virtual authenticator functions in webdriver r?jgraham
Whiteboard: [webdriver:m8][webdriver:external]
Pushed by dkeeler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/af356c621a91 support virtual authenticator functions in webdriver r=webdriver-reviewers,jgraham,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41377 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m8][webdriver:external] → [webdriver:m8][webdriver:external], [wptsync upstream]
Upstream PR was closed without merging
Pushed by dkeeler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1b600408020d support virtual authenticator functions in webdriver r=webdriver-reviewers,jgraham,whimboo
Flags: needinfo?(dkeeler)

Backed out for causing wpt failures in response.py

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | /webdriver/tests/classic/new_session/response.py | test_capability_type[webauthn:extension:credBlob-bool] - AssertionError: assert 'webauthn:extension:credBlob' in {'acceptInsecureCerts': False, 'browserName': 'firefox', 'browserVersion': '118.0a1', 'moz:accessibilityChecks': False, ...}
Flags: needinfo?(dkeeler)
Upstream PR was closed without merging
Flags: needinfo?(dkeeler)
Pushed by dkeeler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d918661c17e3 support virtual authenticator functions in webdriver r=webdriver-reviewers,jgraham,whimboo
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
Upstream PR was closed without merging

There is actually a problem with merging the upstream PR because the infrastructure test is failing:
https://github.com/web-platform-tests/wpt/pull/41377/checks?check_run_id=15772568550

Dana, can you please have a look?

Flags: needinfo?(dkeeler)

(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #16)

There is actually a problem with merging the upstream PR because the infrastructure test is failing:
https://github.com/web-platform-tests/wpt/pull/41377/checks?check_run_id=15772568550

Actually the following error might mean that we need a new marionette client release? James, is that correct? It at least doesn't fail in our CI which would explain that.

 0:15.65 CRITICAL Traceback (most recent call last):
  File "/home/test/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py", line 158, in start_runner
    executor = executor_cls(logger, browser, **executor_kwargs)
  File "/home/test/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 1275, in __init__
    MarionetteRefTestExecutor.__init__(self,
  File "/home/test/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 1010, in __init__
    self.protocol = MarionetteProtocol(self, browser, capabilities,
  File "/home/test/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 745, in __init__
    do_delayed_imports()
  File "/home/test/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 55, in do_delayed_imports
    from marionette_driver.webauthn import WebAuthn
ModuleNotFoundError: No module named 'marionette_driver.webauthn'
Flags: needinfo?(dkeeler) → needinfo?(james)

Yes, that's correct.

Flags: needinfo?(james)
Upstream PR was closed without merging
Upstream PR merged by DanielRyanSmith
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: