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

17 Коммитов

Автор SHA1 Сообщение Дата
Tim Taubert c29f1dbeb7 Bug 1403818 - Fix WebAuthn IPC crashes by keeping the child actor alive until process shutdown r=jcj
Summary:
We currently call ChildActor.send__delete() when clearing an active transaction
and thereby destroy the child actor. If that happens, e.g. due to a tab switch,
while a message is in the IPC buffer waiting to be delivered, we crash.

This patch creates the child actor lazily as before, but keeps it around until
the WebAuthnManager goes away, which will be at process shutdown.

Each transaction now has a unique id, that the parent process will include in
any of the ConfirmRegister, ConfirmSign, or Abort messages. That way we can
easily ignore stale messages that were in the buffer while we started a new
transaction or cancelled the current one.

Reviewers: jcj

Reviewed By: jcj

Bug #: 1403818

Differential Revision: https://phabricator.services.mozilla.com/D149
2017-10-25 15:59:53 +02:00
Tim Taubert f7e1c16e21 Bug 1409116 - Rename {WebAuthn,U2F}TransactionParent::Cancel message to Abort r=jcj
Summary:
We currently allow sending a "Cancel" message from the child to abort a running
transaction, e.g. when the user switches away from the currently active tab.

We have a message with the same name "Cancel" sent by the parent when the
transaction is aborted due to failure somewhere in the token manager.

This patch renames abort messages from the parent to "Abort" to clarify the
purpose of the message.

Reviewers: jcj

Reviewed By: jcj

Bug #: 1409116

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

--HG--
extra : amend_source : ee6767965ad928033eb23b258aacf54bbaf57d2d
2017-10-17 11:30:55 +02:00
Tim Taubert efb7d369f2 Bug 1400662 - Prefer the USB token if the softtoken is enabled as well r=jcj
Bug #: 1400662

Differential Revision: https://phabricator.services.mozilla.com/D63
2017-09-17 20:14:54 +02:00
J.C. Jones 334836b1e7 Bug 1245527 - Use PWebAuthnTransactionParent superclass for U2FTokenManager. r=keeler
This is a change to permit interacting with the U2FTokenManager from
the dom/U2F context in addition to the dom/WebAuthn one.

MozReview-Commit-ID: BvP5BY2wVYi

--HG--
extra : rebase_source : 0ca9cb1e72cb688b901484ec6bf2602d15131478
2017-08-25 18:37:17 -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 e2109ded03 Bug 1245527 - Use PWebAuthnTransactionParent superclass for U2FTokenManager. r=keeler
This is a change to permit interacting with the U2FTokenManager from
the dom/U2F context in addition to the dom/WebAuthn one.

MozReview-Commit-ID: BvP5BY2wVYi

--HG--
extra : transplant_source : %BEt%83%DBq%1C%1E%AE%24%D3%81%94%ACK%08%9C9%3F%0D%EF
2017-08-25 18:37:17 -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
Tim Taubert 9dfa878543 Bug 1385313 - Use MozPromiseRequestHolders in U2FTokenManager r=jcj 2017-07-28 17:11:03 +02:00
Tim Taubert 4d50b6bd73 Bug 1380954 - Forward WebAuthnTransactionInfo::TimeoutMS() to U2F*TokenManagers r=jcj
The U2FSoftTokenManager is a synchronous implementation and thus didn't need a
timeout so far. We need it for the U2FHIDTokenManager though to let user
interaction timeout properly.

Thus, add a timeout argument to the methods required by the U2FTokenTransport
interface and forward that to the token manager implementations.
2017-07-14 19:27:53 +02:00
Tim Taubert aac46d1b3e Bug 1379580 - U2FTokenTransport promises should resolve to U2F data buffers r=qDot 2017-07-11 11:09:08 +02:00
Tim Taubert daf6324bec Bug 1378762 - Remove 'aSignature' argument from U2FTokenTransport::Register() r=qDot,jcj 2017-07-06 14:44:56 +02: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
Tim Taubert fa3483fd1d Bug 1375828 - U2FTokenTransport::Register() and ::Sign() should return promises r=qDot 2017-06-23 12:36:32 +02:00
Tim Taubert 907f818103 Bug 1375744 - Add U2FTokenTransport::Cancel() to abort requests on HW devices r=qDot
This patch adds a Cancel() method to the U2FTokenTransport interface so that
we can forward request cancellations to the actual token manager implementation.
The current softtoken doesn't need that as it processes API calls synchronously,
USB HID tokens however need a cancellation mechanism.

The SendRequestCancel() call has been removed from WebAuthnManager::Cancel() as
we're currently only calling this method either when the chrome process
cancels the request (and then we don't need to send it back again) or the
content process fails to process the data after a request was fulfilled and
thus there's nothing to cancel. We will touch this again later when the UI
cancels requests on tab switch and similar user actions.
2017-06-23 21:04:38 +02:00
Tim Taubert 237ab99f6b Bug 1375512 - Don't require a U2F*TokenManager to expose IsRegistered() r=qDot 2017-06-23 04:50:31 +02:00
Axel Nennker 9738486c01 Bug 1364991 - Make U2FTokenManager use const where possible r=qdot
The U2F Soft Token, due to its usage of NSS, has to have const values be
marked non-const - but no such limitation should exist for other implementations
of U2F, so this patch moves the const_cast-ing from the U2FTokenManager-level
down to the U2FSoftTokenManager, where it is actually necessary.

Credit to Axel Nennker for this patch.

MozReview-Commit-ID: Kw6zfTDI3GL

--HG--
extra : rebase_source : 90e31e2da9e021043509653a476ddaae03078e55
2017-05-22 16:40:29 -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