Граф коммитов

39 Коммитов

Автор SHA1 Сообщение Дата
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Bastien Orivel d24b02b94c Bug 1520166 - Part 1: Use a vendored version of authenticator. r=jcj
This replaces the in-tree u2fhid (which has been renamed to
authenticator) by the published crate.

Differential Revision: https://phabricator.services.mozilla.com/D32221

--HG--
extra : moz-landing-system : lando
2019-05-24 07:31:26 +00:00
Fabrice Desré 3b8efb7695 Bug 1551297 - Use MOZ_WIDGET_ANDROID instead of ANDROID when targeting Java r=jcj
ANDROID is true for platforms based only on the native parts of the stack so can't
be used when what you depend on is actually the Java layer.

Differential Revision: https://phabricator.services.mozilla.com/D30965

--HG--
extra : moz-landing-system : lando
2019-05-13 20:42:37 +00:00
J.C. Jones 9b769ac3e9 Bug 1391438 - Support FIDO2 for WebAuthn on Android r=snorp,keeler
Support using the Google Play-provided FIDO2 API for Web Authentication.

FIDO U2F API support  is being handled subsequently in Bug 1550625.

This patch uses the privileged APIs and thus will only work on Fennec Nightly, Beta, and Release builds.

Differential Revision: https://phabricator.services.mozilla.com/D1148

--HG--
extra : moz-landing-system : lando
2019-05-10 16:40:17 +00:00
Sebastian Hengst dbf700470c Bug 1527600 - Update moz.build files to use new bugzilla component 'Core :: DOM: Web Authentication' r=jcj
Differential Revision: https://phabricator.services.mozilla.com/D19659

--HG--
extra : moz-landing-system : lando
2019-02-13 14:22:06 +00:00
Akshay Kumar aff7fc2c26 Bug 1508115 - Web Authentication - Support Windows Hello r=keeler,jcj,baku
This change adopts Windows Win32 WebAuthN APIs from https://github.com/Microsoft/webauthn

Differential Revision: https://phabricator.services.mozilla.com/D15752

--HG--
extra : moz-landing-system : lando
2019-01-21 01:10:44 +00:00
Franziskus Kiefer a52a8495f9 Bug 1479787 - use NSS mozpkix in Firefox, r=mt,keeler,glandium
Differential Revision: https://phabricator.services.mozilla.com/D2725
Differential Revision: https://phabricator.services.mozilla.com/D2860

--HG--
extra : rebase_source : 189c13c2a3104c106fcabad5998af6cb2e20d4a5
2018-10-02 14:59:34 +02:00
Tim Taubert 6ded2cf370 Bug 1430150 - Implement WebAuthentication permission prompts r=jcj,johannh
Reviewers: jcj, johannh

Reviewed By: jcj, johannh

Bug #: 1430150

Differential Revision: https://phabricator.services.mozilla.com/D638

--HG--
rename : dom/webauthn/tests/cbor/cbor.js => dom/webauthn/tests/cbor.js
extra : amend_source : f137c2aebea5797cd07d4500cb71c2b9be4e4844
2018-03-11 18:47:14 +01:00
Tim Taubert b5c19b9f90 Bug 1396907 - Abstract a BaseAuthManager for dom/u2f and dom/webauthn r=jcj
Summary: We can probably abstract more stuff in the future, but this seems like a good start.

Reviewers: jcj

Reviewed By: jcj

Bug #: 1396907

Differential Revision: https://phabricator.services.mozilla.com/D323
2017-12-06 18:41:58 +01:00
Tim Taubert a3256fcae8 Bug 1421616 - Have one WebAuthnManager instance per CredentialsContainer r=jcj
Summary:
We currently have a single WebAuthnManager instance per process that's shared
between all CredentialContainers. That way the nsPIDOMWindowInner parent has
to be tracked by the transaction, as multiple containers could kick off
requests simultaneously.

This patch lets us we have one WebAuthnManager instance per each
CredentialsContainer and thus each nsPIDOMWindowInner. This matches the current
U2F implementation where there is one instance per parent window too.

This somewhat simplifies the communication diagram (at least in my head), as
each U2F/WebAuthnManager instance also has their own TransactionChild/Parent
pair for IPC protocol communication. The manager and child/parent pair are
destroyed when the window is.

Reviewers: jcj

Reviewed By: jcj

Bug #: 1421616

Differential Revision: https://phabricator.services.mozilla.com/D305
2017-12-05 19:05:06 +01:00
Tim Taubert 587ed9ddc7 Backed out changeset bb739695f566 (bug 1421616) 2017-12-05 19:24:22 +01:00
Tim Taubert a0935f0ff1 Bug 1421616 - Have one WebAuthnManager instance per CredentialsContainer r=jcj
Summary:
We currently have a single WebAuthnManager instance per process that's shared
between all CredentialContainers. That way the nsPIDOMWindowInner parent has
to be tracked by the transaction, as multiple containers could kick off
requests simultaneously.

This patch lets us we have one WebAuthnManager instance per each
CredentialsContainer and thus each nsPIDOMWindowInner. This matches the current
U2F implementation where there is one instance per parent window too.

This somewhat simplifies the communication diagram (at least in my head), as
each U2F/WebAuthnManager instance also has their own TransactionChild/Parent
pair for IPC protocol communication. The manager and child/parent pair are
destroyed when the window is.

Reviewers: jcj

Reviewed By: jcj

Bug #: 1421616

Differential Revision: https://phabricator.services.mozilla.com/D305
2017-12-05 19:05:06 +01:00
Tim Taubert 1d2e8ed150 Bug 1412408 - Fix content process leak of U2FTransactionChild instances r=jcj
Summary:
This patch fixes the reported leak of U2FTransactionChild instances in the
content process by introducing a WebAuthnTransactionChildBase class that both
WebAuthnTransactionChild and U2FTransactionChild inherit from.

This base class is responsible for proper refcounting. In
BackgroundChildImpl::DeallocPWebAuthnTransactionChild() we currently always
cast to WebAuthnTransactionChild, that will work only for the WebAuthn API. We
can now cast to WebAuthnTransactionChildBase to make this work for U2F as well.

Reviewers: jcj

Reviewed By: jcj

Bug #: 1412408

Differential Revision: https://phabricator.services.mozilla.com/D179
2017-11-02 12:18:19 +01:00
J.C. Jones f05cfb1125 Bug 1381190 - Remove WebAuthnRequest dead code r=ttaubert
The WebAuthnRequest.h file is no longer used, and it appears we forgot to
clean it up.

MozReview-Commit-ID: 8Cgh40YxGiY

--HG--
extra : rebase_source : 81b84d0365f8a0766d84962a2f628b6025c135e2
2017-10-12 15:17:51 -07:00
Tim Taubert e773e24ae5 Bug 1388851 - Implement U2FHIDTokenManager r=jcj,qdot,keeler 2017-08-09 21:24:50 +02:00
J.C. Jones 554acaea86 Bug 1245527 - Remove NSS U2F SoftToken. r=ttaubert, r=jed
The nsIU2FToken and its implementors are no longer needed; the soft token was
re-implemented into dom/webauthn/U2FSoftTokenManager.cpp during the WebAuthn
implementation. When the dom/u2f/ code changed to the implementation from
WebAuthn, the old synchronous version became dead code.

This patch removes the dead code.

MozReview-Commit-ID: 2yDD0tccgZr

--HG--
extra : rebase_source : 0f14d8de8f62599a41c13aa4d8fc9cdbc1fd79c7
2017-09-05 12:32:42 -07:00
Phil Ringnalda 2dba33e427 Backed out 3 changesets (bug 1245527) for ASan browser-chrome leaks and Android mochitest bustage
Backed out changeset 8ee1f7aebd62 (bug 1245527)
Backed out changeset e6a5de8d1246 (bug 1245527)
Backed out changeset be63e73426b4 (bug 1245527)

MozReview-Commit-ID: AU22LgPh9iB
2017-09-09 00:09:21 -07:00
J.C. Jones 9ade50e63c Bug 1245527 - Remove NSS U2F SoftToken. r=ttaubert, r=jed
The nsIU2FToken and its implementors are no longer needed; the soft token was
re-implemented into dom/webauthn/U2FSoftTokenManager.cpp during the WebAuthn
implementation. When the dom/u2f/ code changed to the implementation from
WebAuthn, the old synchronous version became dead code.

This patch removes the dead code.

MozReview-Commit-ID: 2yDD0tccgZr

--HG--
extra : transplant_source : %B3%96Te%E7%02%08%98%1A%B2%FA%1C%40%C4J%BC%B2%85j%81
2017-09-05 12:32:42 -07:00
J.C. Jones 28cc1969ee Bug 1265472 - Add Telemetry to Web Authentication r=francois,keeler datareview=francois
This patch intends to obtain a 1) rough sense of the percentage of telemetry
population using Web Authentication over time, and 2) whether or not the
Authentication request was successful or errored out as a scalar. It also tracks
3) how long it takes for requests to complete as a histogram.

It counts Register (enrollment) and Sign (login) separately as we would
anticipate there being far, far more Sign uses than Register.

MozReview-Commit-ID: 8DFyKAG8XJw

--HG--
extra : rebase_source : 0c168b32b995ffffda804538d2b92009d4dc38c5
2017-08-09 12:22:48 -07:00
Carsten "Tomcat" Book cad2e55095 Backed out changeset 674770e65a4f (bug 1265472) for memory leaks in browser_webauthn_telemetry.js 2017-07-26 07:56:38 +02:00
J.C. Jones 1b29ab6da2 Bug 1265472 - Add Telemetry to Web Authentication r=francois,keeler datareview=francois
This patch intends to obtain a 1) rough sense of the percentage of telemetry
population using Web Authentication over time, and 2) whether or not the
Authentication request was successful or errored out as a scalar. It also tracks
3) how long it takes for requests to complete as a histogram.

It counts Register (enrollment) and Sign (login) separately as we would
anticipate there being far, far more Sign uses than Register.

MozReview-Commit-ID: 8DFyKAG8XJw

--HG--
extra : rebase_source : c93eeac7a978a1d1c4b08ff1e18e2548b1045ced
2017-07-21 15:23:09 -07:00
J.C. Jones 3987ef311b Bug 1380529 - Use CBOR for the Create Credential WebAuthn call (2/3) r=ttaubert
The WebAuthn Create Credential method should encode its results using CBOR;
this patch changes to that format.

The CBOR formats for the U2F data are specified in [1][2]

The attestation data format is in [3]

The high-level layout is in [4]

[1] https://w3c.github.io/webauthn/#generating-an-attestation-object
[2] https://w3c.github.io/webauthn/#fido-u2f-attestation
[3] https://w3c.github.io/webauthn/#sec-attestation-data
[4] https://w3c.github.io/webauthn/#sctn-attestation

MozReview-Commit-ID: BYoFCJSxlLt

--HG--
extra : rebase_source : 190cb5f128659c7a947645abbc172c8aa39e4d40
2017-07-13 18:12:50 -07:00
J.C. Jones 91d5522630 Bug 1380529 - Add a CBOR library for WebAuthn (1/3) r=ttaubert
Web Authentication's WD-05 specification moves to using (CBOR) Concise Binary
Object Representation to transmit the binary data... most of it. This lands a
subset of the Apache 2-licensed "CBOR C++" serialization library [1] into
webauthn's path.

It does not add any code to use this library; see patch 2/3.

[1] https://github.com/naphaso/cbor-cpp/

MozReview-Commit-ID: Ktj9TgdqElk

--HG--
extra : rebase_source : e36c956ef62be3ea1a3b6cbc8e3d6df2626c15b1
2017-07-13 18:12:57 -07:00
Tim Taubert c3833cf06b Bug 1375847 - Add skeleton U2FHIDTokenManager r=qDot
This patch adds a skeleton U2FHIDTokenManager that returns
NS_ERROR_NOT_IMPLEMENTED for ::Register() and ::Sign().

This will help test calling into the Rust library and make it easier to
implement the full USB HID transport.
2017-06-23 15:48:50 +02:00
David Keeler 838ea1425f bug 1332681 - part 4/4 - convert authentication.getAssertion to credentials.get r=jcj,qdot
MozReview-Commit-ID: 13EqlQVQApx

--HG--
extra : rebase_source : 5790d61619e4d4a0d4039b9379bcf06169bd762f
2017-05-23 14:55:10 -07:00
David Keeler abac00aea3 bug 1332681 - part 3/4 - convert authentication.makeCredential to credentials.create r=jcj,qdot
MozReview-Commit-ID: 1xfsQqGCEcl

--HG--
rename : dom/webauthn/WebAuthentication.cpp => dom/credentialmanagement/CredentialsContainer.cpp
rename : dom/webauthn/WebAuthentication.h => dom/credentialmanagement/CredentialsContainer.h
extra : rebase_source : d92546a7f6a3780c6ec8790dfabb23a9ea29efbe
2017-05-22 17:09:49 -07:00
David Keeler 0ecb59e4a9 bug 1332681 - part 2/4 - authentication.getAssertion: return a PublicKeyCredential instead of a WebAuthnAssertion r=jcj,qdot
MozReview-Commit-ID: 72p9lvhQISe

--HG--
rename : dom/webauthn/WebAuthnAssertion.cpp => dom/webauthn/AuthenticatorAssertionResponse.cpp
rename : dom/webauthn/WebAuthnAssertion.h => dom/webauthn/AuthenticatorAssertionResponse.h
extra : rebase_source : f5e77b0a71556764b58ba7822a5716bee5c47d99
2017-05-22 13:03:58 -07:00
David Keeler 07f967118b bug 1332681 - part 1/4 - authentication.makeCredential: return a PublicKeyCredential instead of a ScopedCredentialInfo r=jcj,qdot
(This is part of updating WebAuthn to Working Draft 5.)

MozReview-Commit-ID: 7o5yvtijo1P

--HG--
rename : dom/webauthn/WebAuthnAttestation.cpp => dom/webauthn/AuthenticatorResponse.cpp
rename : dom/webauthn/WebAuthnAttestation.h => dom/webauthn/AuthenticatorResponse.h
rename : dom/webauthn/ScopedCredentialInfo.cpp => dom/webauthn/PublicKeyCredential.cpp
rename : dom/webauthn/ScopedCredentialInfo.h => dom/webauthn/PublicKeyCredential.h
extra : rebase_source : 89633847ed85c75f1f277d040f6a6c86b73687a3
2017-05-16 17:07:01 -07:00
Kyle Machulis 4f61492d32 Bug 1323339 - Add U2FTokenManager class and support IPC Parent classes; r=jcj r=baku
Takes functionality that was in the WebAuthentication class that now
needs to be handled by the parent process, and moves it to the
U2FTokenManager singleton class. U2FTokenManager is created on the
PBackground thread during the first WebAuthn transaction, and manages
hardware access and transaction management for the lifetime of the
browser session. Patch also adds parent classes for WebAuthn IPC
protocol.

MozReview-Commit-ID: EnhgUTPdlMZ
2017-05-09 13:21:23 -07:00
Kyle Machulis e0c24a5abd Bug 1323339 - Add WebAuthnManager and support IPC Child classes; r=jcj r=baku
Takes functionality once in the WebAuthentication DOM class that needs
to be handled by the content process, and moves it to a
singleton (per-content-process) manager class. This allows the
WebAuthn API to centralize management of transactions and IPC
channels. Patch also creates the child (content-process) classes for
WebAuthn IPC channels.

MozReview-Commit-ID: 6ju2LK8lvNR
2017-05-09 13:21:23 -07:00
Kyle Machulis 2945d52cd5 Bug 1323339 - IPDL for WebAuthn Protocol and PBackground additions; r=jcj r=baku
MozReview-Commit-ID: 3WzTVZEdjia
2017-05-09 13:21:23 -07:00
Joel Maher c203f27827 Bug 1335099 - add BUG_COMPONENT to many dom/* subdir files. r=overholt
MozReview-Commit-ID: CyIIs98hnUI
2017-02-06 09:45:55 -05:00
Sebastian Hengst 7225ec6170 Backed out changeset 9a332af74af5 (bug 1335099) for build bustage (moz.build rule matches no files). r=backout on a CLOSED TREE 2017-02-06 16:21:20 +01:00
Joel Maher 60e61eed48 Bug 1335099 - add BUG_COMPONENT to many dom/* subdir files. r=overholt
MozReview-Commit-ID: CyIIs98hnUI
2017-02-06 09:45:55 -05:00
Kyle Machulis 14bcecc66f Bug 1330138 - Divide U2F and WebAuthn into separate directories; r=jcj
MozReview-Commit-ID: FCCSL6XWhTf


--HG--
rename : dom/u2f/NSSU2FTokenRemote.cpp => dom/webauthn/NSSU2FTokenRemote.cpp
rename : dom/u2f/NSSU2FTokenRemote.h => dom/webauthn/NSSU2FTokenRemote.h
rename : dom/u2f/ScopedCredential.cpp => dom/webauthn/ScopedCredential.cpp
rename : dom/u2f/ScopedCredential.h => dom/webauthn/ScopedCredential.h
rename : dom/u2f/ScopedCredentialInfo.cpp => dom/webauthn/ScopedCredentialInfo.cpp
rename : dom/u2f/ScopedCredentialInfo.h => dom/webauthn/ScopedCredentialInfo.h
rename : dom/u2f/WebAuthnAssertion.cpp => dom/webauthn/WebAuthnAssertion.cpp
rename : dom/u2f/WebAuthnAssertion.h => dom/webauthn/WebAuthnAssertion.h
rename : dom/u2f/WebAuthnAttestation.cpp => dom/webauthn/WebAuthnAttestation.cpp
rename : dom/u2f/WebAuthnAttestation.h => dom/webauthn/WebAuthnAttestation.h
rename : dom/u2f/tests/test_webauthn_get_assertion.html => dom/webauthn/tests/test_webauthn_get_assertion.html
rename : dom/u2f/tests/test_webauthn_loopback.html => dom/webauthn/tests/test_webauthn_loopback.html
rename : dom/u2f/tests/test_webauthn_make_credential.html => dom/webauthn/tests/test_webauthn_make_credential.html
rename : dom/u2f/tests/test_webauthn_no_token.html => dom/webauthn/tests/test_webauthn_no_token.html
rename : dom/u2f/tests/test_webauthn_sameorigin.html => dom/webauthn/tests/test_webauthn_sameorigin.html
2017-01-19 14:18:32 -08:00