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

9 Коммитов

Автор SHA1 Сообщение Дата
Tim Taubert e7bbf534a6 Bug 1439805 - Implement CredentialsContainer.preventSilentAccess() r=jcj,smaug
Reviewers: jcj, smaug

Reviewed By: jcj, smaug

Bug #: 1439805

Differential Revision: https://phabricator.services.mozilla.com/D629
2018-02-22 14:36:08 +01:00
J.C. Jones 8ecfc436b4 Bug 1436473 - Rename WebAuthn dict to PublicKeyCredentialCreationOptions r=baku
Late-breaking rename pre-CR in Web Authentication [1] renamed a dictionary. It's
not an interop issue, really, which must be why it was let through. This is a
WebIDL and Web Platform Tests-only issue. (The WPT updates are happening at
Github [2])

[1] https://github.com/w3c/webauthn/pull/779/files
[2] https://github.com/w3c/web-platform-tests/pull/9237

MozReview-Commit-ID: KEIlqIYbzKp

--HG--
extra : rebase_source : 4204ea62a41f374a6731a9367552af122d354145
2018-02-07 12:01:51 -07:00
J.C. Jones bce88244c0 Bug 1407789 - Prohibit cross-site iframes for Credential Management r=baku,keeler,ttaubert
Credential Management defines a parameter `sameOriginWithAncestors` which is
set true if the responsible document is not either in a top-level browsing
context, or is in a nested context whose heirarchy is all loaded from the
same origin as the top-level context [1][2]. The individual credential types
of CredMan can use this flag to make decisions on whether to error or not.

Our Credential Management implementation right now is a shim to Web
Authentication, which says that if `sameOriginWithAncestors` is false, return
`"NotAllowedError"`.

This ensures that

  https://webauthn.bin.coffee/iframe.html

works, but the cross-origin

  https://u2f.bin.coffee/iframe-webauthn.html

does not.

[1] https://w3c.github.io/webappsec-credential-management/#algorithm-request
[2] https://w3c.github.io/webappsec-credential-management/#algorithm-create
[3] https://w3c.github.io/webauthn/#createCredential
[4] https://w3c.github.io/webauthn/#getAssertion

MozReview-Commit-ID: KIyakgl0kGv

--HG--
extra : rebase_source : dace4f4d73823913bff759fce8255da8e18ad5e3
2017-10-12 18:18:39 -07:00
Tim Taubert 73cfd2472a Bug 1415675 - Web Authentication - Support AbortSignal types r=jcj,smaug
Summary:
This patch adds support for aborting WebAuthn requests via AbortSignals.

https://w3c.github.io/webauthn/#abortoperation
https://w3c.github.io/webauthn/#sample-aborting
https://dom.spec.whatwg.org/#abortcontroller-api-integration

It also adds a variety of request abortion/cancellation tests.

To test request cancellation we can use USB tokens as those requests will
never complete without a token and/or user interaction. A bonus here is that
we'll have a little coverage for u2f-hid-rs.

Reviewers: jcj, smaug

Reviewed By: jcj, smaug

Bug #: 1415675

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

--HG--
extra : amend_source : bd779d5c4c6a11dd8ce34c0cc86675825b799031
2017-11-17 09:44:50 +01:00
J.C. Jones cffad01a4b Bug 1407829 - WebAuthn: Implement CredMan's Store method r=qdot,ttaubert
Credential Management defines a Store operation [1], which needs to be
implemented for WebAuthn's spec compliance. It only returns a NotSupportedError
for WebAuthn [2], so it's pretty simple.

[1] https://w3c.github.io/webappsec-credential-management/#dom-credentialscontainer-store
[2] https://w3c.github.io/webauthn/#storeCredential

MozReview-Commit-ID: KDEB8r5feQt

--HG--
extra : rebase_source : b3e2a270a2ea7c1689ef9991c1345bcc20368c9e
2017-10-12 17:02:22 -07:00
J.C. Jones 24696391df Bug 1406456 - WebAuthn WebIDL Updates for WD-07 (part 1) r=keeler,qdot
This covers these renames:
* In PublicKeyCredentialParameters, algorithm => alg
* MakeCredentialOptions => MakePublicKeyCredentialOptions
* PublicKeyCredentialEntity => PublicKeyCredentialRpEntity
* Attachment => AuthenticatorAttachment

It sets a default excludeList and allowList for the make / get options.

It adds the method isPlatformAuthenticatorAvailable which is incomplete and
not callable, to be completed in Bug 1406468.

Adds type PublicKeyCredentialRpEntity.

Adds "userId" to AuthenticatorAssertionResponse.

Adds "id" as a buffer source to PublicKeyCredentialUserEntity and as a
DOMString to PublicKeyCredentialRpEntity, refactoring out the "id" field
from the parent PublicKeyCredentialEntity.

It also adds a simple enforcement per spec 4.4.3 "User Account Parameters for
Credential Generation" that the new user ID buffer, if set, be no more than
64 bytes long. I mostly added it here so I could adjust the tests all at once
in this commit.

MozReview-Commit-ID: IHUdGVoWocq

--HG--
extra : rebase_source : bc1793f74700b2785d2bf2099c0dba068f717a59
2017-10-06 16:10:57 -07: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 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