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

104 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Andi-Bogdan Postelnicu 649fe4a141 Bug 1626555 - Add `dom/webauthn` to the list of non-unified-build-compatible directories. r=sg
Depends on D96586

Differential Revision: https://phabricator.services.mozilla.com/D96590
2020-11-10 16:32:16 +00:00
Jeff Walden 29f576510d Bug 1660555 - Move traverse/unlink operations on |AbortFollower| and |AbortSignalImpl| into static member functions. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92322
2020-10-29 08:02:58 +00:00
Jeff Walden e1ed5804d7 Bug 1660555 - Split AbortFollower::Abort into AbortFollower::RunAbortAlgorithm and AbortSignalImpl::SignalAbort functions for readability. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92321
2020-10-22 07:42:18 +00:00
J.C. Jones 1bd162dde3 Bug 1540309 - Track browsing context for the WebAuthn UX prompts r=nhnt11
The WebAuthn popup just used the current selected browser for its context,
while we actually want to stick with the window that brought us to the party.

This adds tests to ensure that the doorhanger stays on the tab it was originally
attached to, avoiding the 'wandering doorhanger' problem from the bug.

Differential Revision: https://phabricator.services.mozilla.com/D72255
2020-10-05 22:20:41 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Sebastian Streich 1ec5974790 Bug 1636148 - "BandAid" - Cast Remaining Callers To BasePrincipal r=ckerschb,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D74248
2020-05-14 19:42:57 +00:00
Dorel Luca c269f23ce0 Backed out 2 changesets (bug 1636148) for Build bustage on android in gecko/widget/android/nsWindow.cpp. CLOSED TREE
Backed out changeset fca4a9808bd9 (bug 1636148)
Backed out changeset 6fda7ca2484d (bug 1636148)
2020-05-12 17:01:59 +03:00
Sebastian Streich 8dc87b9987 Bug 1636148 - "BandAid" - Cast Remaining Callers To BasePrincipal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D74248
2020-05-12 12:50:21 +00:00
J.C. Jones f2ef3fe72c Bug 1630088 - WebAuthn requests need to retain the Browsing Context ID r=keeler
The browsing context ID is useful for UX and UX improvements, particularly
for making progress on Bug 1540309.

Differential Revision: https://phabricator.services.mozilla.com/D71702
2020-04-24 22:57:33 +00:00
Boris Zbarsky f31fe5e910 Bug 1619112 part 3. Pass UTF8 strings to MaybeRejectWithType/RangeError promise methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65539

--HG--
extra : moz-landing-system : lando
2020-03-06 21:05:48 +00:00
J.C. Jones 36d2616bf1 Bug 1616675 - Prohibit IP addresses for WebAuthn operations r=keeler
Refactor to reduce duplication of the promiseWebAuth* methods

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

--HG--
extra : moz-landing-system : lando
2020-02-26 23:16:27 +00:00
Boris Zbarsky 6c66fa85a4 Bug 1615022 part 2. Require an rvalue reference to reject a Promise with an ErrorResult. r=farre,kvark
The rejection process consumes the ErrorResult, so an rvalue reference is the honest thing here.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 15:42:30 +00:00
Boris Zbarsky b40350c499 Bug 1610732 part 2. Throw the right exception when a user.id value is too long. r=jcj
The test changes are for the following reasons:

1) Removing the "empty ArrayBuffer" test: I don't see anything obvious in the
spec that would cause that to reject before prompting the user, and in fact it
does not do that in browsers.  All browsers time out on that line.

2) Removing the "name is object" test: This test is wrong.  Passing {} where a
string is expected in IDL will come out as the string "[object Object]" on the
other side, and that seems like a perfectly valid name.

3) Removing the "name is null" test: This test is wrong.  Passing null where a
string is expected in IDL will come out as the string "null" on the other side,
and that seems like a perfectly valid name.

4) Removing the "name is empty" test: I don't see anything obvious in the
spec that would cause that to reject before prompting the user.

5) Removing the various "icon is whatever" tests: I don't see anything obvious in the
spec that would cause that to reject before prompting the user.

6) Removing the various "displayName is whatever" tests: the same reasoning as
for the coresponding "name is whatever" tests applies.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 16:53:09 +00:00
Boris Zbarsky a0b4a1fee2 Bug 1582892. Expose the number of strings in a Web IDL enum in a nice way. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D49536

--HG--
extra : moz-landing-system : lando
2019-10-23 03:54:39 +00:00
Daniel Varga ae5334abca Backed out changeset f9a4c8d67be3 (bug 1582892) for build bustage at build/src/dom/console/ConsoleInstance. On a CLOSED TREE 2019-10-23 06:13:54 +03:00
Boris Zbarsky e09da7b0c7 Bug 1582892. Expose the number of strings in a Web IDL enum in a nice way. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D49536

--HG--
extra : moz-landing-system : lando
2019-10-18 03:26:43 +00:00
J.C. Jones 51aefb37d2 Bug 1573245 - Change AuthenticatorTransport to be string, not `enum` r=bzbarsky,keeler
Upstream: https://github.com/w3c/webauthn/issues/1268

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

--HG--
extra : moz-landing-system : lando
2019-09-17 07:50:44 +00:00
Gurzau Raul 1d0e84d2ec Backed out 2 changesets (bug 1573245) for Windows build bustages at WebAuthnManager.cpp on a CLOSED TREE.
Backed out changeset 0bf953d07a4f (bug 1573245)
Backed out changeset cfdf258c11ae (bug 1573245)
2019-09-17 08:40:27 +03:00
J.C. Jones c119c83cd4 Bug 1573245 - Include BindingUtils.h for WebAuthnManager on a CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D46109

--HG--
extra : moz-landing-system : lando
2019-09-17 05:16:26 +00:00
J.C. Jones 8cc2abfd2a Bug 1573245 - Change AuthenticatorTransport to be string, not `enum` r=bzbarsky,keeler
Upstream: https://github.com/w3c/webauthn/issues/1268

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

--HG--
extra : moz-landing-system : lando
2019-09-17 04:47:27 +00:00
J.C. Jones bdc71696d2 Bug 1551594 - Support HmacSecret webauthn extension r=keeler,smaug
Differential Revision: https://phabricator.services.mozilla.com/D31093

--HG--
extra : moz-landing-system : lando
2019-06-27 23:23:26 +00:00
Dana Keeler 7c34defd31 bug 1524478 - don't create JS objects from WebAuthnManager or U2F destructors r=qdot
Before this patch, the WebAuthnManager/U2F destructors would call MaybeReject on
existing transaction promises. Doing this leaks JS objects. If
WebAuthnManager/U2F are being destructed, though, the window is going away, so
it shouldn't be necessary to reject any outstanding promises. This patch just
clears the transactions.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 18:18:57 +00:00
Akshay Kumar dbdbade34c Bug 1536773 - WebAuthn does not return userHandle back during Authentication r=jcj
Differential Revision: https://phabricator.services.mozilla.com/D24189

--HG--
extra : moz-landing-system : lando
2019-03-21 11:37:07 +00:00
J.C. Jones aaa18d99e7 Bug 1541085 - Web Authentication - Only reset mTransaction on cycle collection r=keeler
This stack is pretty clear that calling StopListeningForVisibilityEvents
(via ClearTransaction) is a no-go from the cycle collector. We need to instead
just do the minimum version of bug 1540378, just reset mTransaction and move on.

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

--HG--
extra : moz-landing-system : lando
2019-04-02 17:56:47 +00:00
J.C. Jones bfdf3e2380 Bug 1540378 - Web Authentication: Fix teardown during cycle collection r=keeler,mccr8
In Bug 1448408 ("Don't listen to visibility events"), it became possible to
close a tab without a visibility event to cause transactions to cancel. This
is a longstanding bug that was covered up by the visibility events. This patch
updates the cycle collection code to ensure that transactions get cleared out
safely, and we don't proceed to RejectTransaction (and subsequent code) on
already-cycle-collected objects.

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

--HG--
extra : moz-landing-system : lando
2019-04-01 23:13:26 +00:00
J.C. Jones f7a8b4c054 Bug 1448408 - Web Authentication - Don't immediately abort on visibility events r=keeler
The published recommendation of L1 for WebAuthn changed the visibility/focus
listening behaviors to a SHOULD [1], and Chromium, for reasons like our SoftU2F
bug [0], opted to not interrupt on tabswitch/visibility change.

Let's do the same thing.

This changes the visibility mechanism to set a flag on an ongoing transaction,
and then, upon multiple calls to the FIDO/U2F functions, only aborts if
visibility had changed. Otherwise, subsequent callers return early.

This is harder to explain than it is really to use as a user. I think. At least,
my testing feels natural when I'm working within two windows, both potentially
prompting WebAuthn.

Note: This also affects FIDO U2F API.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1448408#c0
[1] https://www.w3.org/TR/webauthn-1/#abortoperation

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

--HG--
extra : moz-landing-system : lando
2019-03-29 17:59:08 +00:00
J.C. Jones 1746417e71 Bug 1539541 - Enable FIDO U2F API, and permit registrations for Google Accounts r=keeler,qdot
Per the thread "Intent-to-Ship: Backward-Compatibility FIDO U2F support for
Google Accounts" on dev-platform [0], this bug is to:

  1. Enable the security.webauth.u2f by default, to ride the trains

  2. Remove the aOp == U2FOperation::Sign check from EvaluateAppID in
     WebAuthnUtil.cpp, permitting the Google override to work for Register as
     well as Sign.

This would enable Firefox users to use FIDO U2F API on most all sites, subject
to the algorithm limitations discussed in the section "Thorny issues in
enabling our FIDO U2F API implementation" of that post.

[0] https://groups.google.com/d/msg/mozilla.dev.platform/q5cj38hGTEA/lC834665BQAJ

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

--HG--
extra : moz-landing-system : lando
2019-03-29 17:16:13 +00:00
Alex Gaynor 823516cc43 Bug 1536097 - Part 5 - convert AttestationConveyancePreference to use ParamTraits for deserialization; r=jcj
Depends on D24065

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

--HG--
extra : moz-landing-system : lando
2019-03-19 23:25:35 +00:00
Alex Gaynor 12dcc5de20 Bug 1536097 - Part 4 - convert UserVerificationRequirement to use ParamTraits for deserialization; r=jcj
Depends on D24064

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

--HG--
extra : moz-landing-system : lando
2019-03-19 23:25:47 +00:00
Alex Gaynor b6f7702cfa Bug 1536097 - Part 3 - convert WebAuthnMaybeGetAssertionExtraInfo to use a native IPDL maybe; r=jcj
Depends on D24063

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

--HG--
extra : moz-landing-system : lando
2019-03-19 23:26:00 +00:00
Alex Gaynor 936775f7b8 Bug 1536097 - Part 2 - convert WebAuthnMaybeMakeCredentialExtraInfo to use a native IPDL maybe; r=jcj
Depends on D24062

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

--HG--
extra : moz-landing-system : lando
2019-03-19 23:26:20 +00:00
Alex Gaynor 8db559a3fd Bug 1536097 - Part 1 - convert WebAuthnMaybeAuthenticatorAttachment to use a native IPDL maybe and use ParamTraits for deserialization; r=jcj
Differential Revision: https://phabricator.services.mozilla.com/D24062

--HG--
extra : moz-landing-system : lando
2019-03-20 15:23:44 +00:00
Akshay Kumar 85743771de Bug 1522145 - Web Authentication - Support additional Windows Hello Algorithms r=keeler
Support Main Algorithms

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

--HG--
extra : moz-landing-system : lando
2019-01-24 18:38:49 +00:00
Sylvestre Ledru b61d90492b Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Depends on D17388

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

--HG--
extra : moz-landing-system : lando
2019-01-24 08:11:00 +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
Andrew McCreight 9e451b1da0 Bug 1517611 - Cycle collect WebAuthnManager and U2F more. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D17026

--HG--
extra : moz-landing-system : lando
2019-01-18 23:21:46 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andrea Marchesini 2dd8d57be4 Bug 1480365: WebAuthManager doesn't need to keep alive AbortSignal, r=smaug 2018-08-06 21:01:53 +02:00
David Keeler e3dc094a76 bug 1468909 - enforce that all given RP IDs be valid domain strings in webauthn r=qdot
The webauthn spec mandates that relying party identifiers (RP IDs) are valid
domain strings. This enforces that by ensuring that any passed-in RP IDs parse
correctly when set as the host portion of a URL.

https://w3c.github.io/webauthn/#relying-party-identifier

--HG--
extra : rebase_source : 6be22c9be660db3062f4e8119051cd122bc24a12
2018-06-19 14:29:45 -07:00
Tim Taubert 2a252e45a4 Bug 1464015 - Web Authentication - Rework IPC layer for future Android/Windows support r=jcj
Reviewers: jcj

Reviewed By: jcj

Subscribers: mgoodwin

Bug #: 1464015

Differential Revision: https://phabricator.services.mozilla.com/D1378
2018-05-30 16:06:09 +02:00
Tim Taubert 2b5e4e52b4 Bug 1462324 - Remove unused WebAuthnTransaction::mDirectAttestation r=jcj
Reviewers: jcj

Reviewed By: jcj

Bug #: 1462324

Differential Revision: https://phabricator.services.mozilla.com/D1301
2018-05-17 18:32:53 +02:00
Tim Taubert 368a1dde38 Bug 1458755 - Web Authentication - Copy flag bits 0 & 1 for Sign operations r=jcj
Reviewers: jcj

Reviewed By: jcj

Bug #: 1458755

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

--HG--
extra : amend_source : 349a05210460beefbfe0dcc3e3f36885bb02246c
2018-05-07 11:23:10 +02:00
Emilio Cobos Álvarez a1b2e5070a Bug 1455885: Inline and make document casts fatally assert. r=bz
For consistency with AsElement / AsContent / AsDocumentFragment, etc.

MozReview-Commit-ID: 8GSj8R9hLBe
2018-04-26 17:05:12 +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 0af61da4ec Bug 1406471 - Web Authentication - Implement FIDO AppID Extension r=jcj,smaug
Reviewers: jcj, smaug

Reviewed By: jcj

Bug #: 1406471

Differential Revision: https://phabricator.services.mozilla.com/D595
2018-02-22 10:53:49 +01:00
Tim Taubert bc18da5fe7 Bug 1437616 - Use proper WebAuthn result types defined in the .pidl r=jcj
Reviewers: jcj

Reviewed By: jcj

Bug #: 1437616

Differential Revision: https://phabricator.services.mozilla.com/D582
2018-02-12 21:08:54 +01:00
Tim Taubert 4c6fab9bac Bug 1416056 - Web Authentication - Default to "None Attestation" r=jcj
Summary:
Always replace attestation statements with a "none" attestation.

Bug 1430150 will introduce a prompt that asks the user for permission whenever
the RP requests "direct" attestation. Only if the user opts in we will forward
the attestation statement with the token's certificate and signature.

Reviewers: jcj

Reviewed By: jcj

Bug #: 1416056

Differential Revision: https://phabricator.services.mozilla.com/D567
2018-02-09 16:34:39 +01:00
Tim Taubert 08931dd068 Bug 1435527 - Run to timeout from navigator.credentials.get() when PublicKeyCredentialRequestOptions.allowCredentials is empty r=jcj
Reviewers: jcj

Reviewed By: jcj

Bug #: 1435527

Differential Revision: https://phabricator.services.mozilla.com/D559
2018-02-08 12:45:21 +01:00