WebAuthn PublicKeyCredential object's "id" and "type" fields must be set

RESOLVED FIXED in Firefox 56

Status

()

defect
P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jcj, Assigned: jcj)

Tracking

(Blocks 1 bug)

55 Branch
mozilla56
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

(Whiteboard: [webauthn] [webauthn-interop])

Attachments

(1 attachment)

The "PublicKeyCredential" WebIDL object's "id", "discovery", and "type" fields are blank in Firefox Nightly. 

Both of those fields are inherited from Credential Management's WebIDL "Credential" type. [1]

"id" should be set to the base64url encoding of the data in "rawId".
"type" should be the literal "public-key"
"discovery" should be the literal "remote", but as an "internal slot" it doesn't appear in the WebIDL, nor have a Getter. So that might be a follow-up to resolve.

[1] https://www.w3.org/TR/webauthn/#publickeycredential
See Also: → 1384331
Comment on attachment 8890115 [details]
Bug 1384307 - Set WebAuthn PublicKeyCredential's "id" and "type" fields

https://reviewboard.mozilla.org/r/161200/#review166546

Cool - lgtm.

::: dom/webauthn/tests/test_webauthn_loopback.html:54
(Diff revision 1)
>           - attestationObject: CBOR object
>           - clientDataJSON: serialized JSON
>         - clientExtensionResults: (not yet supported)
>      */
>  
> +    is(aCredInfo.type, "public-key", "Credential type must be public-key")

nit: to me it makes sense to check these in the same order as the comment, but no big deal
Attachment #8890115 - Flags: review?(dkeeler) → review+
Thanks for the review, David!

Marking checkin-needed.
Assignee: nobody → jjones
Status: NEW → ASSIGNED
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/42013738df2a
Set WebAuthn PublicKeyCredential's "id" and "type" fields r=keeler
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/42013738df2a
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.