Closed Bug 1420763 Opened 7 years ago Closed 6 years ago

webauthn: credential public key not a COSE_Key

Categories

(Core :: DOM: Device Interfaces, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: agl, Assigned: agl)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file, 1 obsolete file)

Using a Nightly build, below is a credential public key from attestationObject.authData:

a363616c6765455332353661785820578c3b41309593d00bcf9dfe89b74bb0a2ccceaf511baeedbd130f6b67690ad76179582051bf2e1586643767bd56cb592044a4226d5e9590a30baf59542231c6350ff3e3

It's a CBOR map with keys "alg", "x", and "y". However, I think it should be a COSE_Key structure[1]. Based on the example[2] from the RFC, it looks like that should be an integer-keyed map.

[1] https://www.w3.org/TR/webauthn/#sec-attestation-data
[2] https://tools.ietf.org/html/rfc8152#appendix-C.7.1
Priority: -- → P2
Whiteboard: [webauthn][webauthn-wd07]
Comment on attachment 8939282 [details]
Bug 1420763 - encode webauthn keys as a COSE key;

https://reviewboard.mozilla.org/r/209714/#review215582

This is accurate, based on my reading of COSE and the CTAP canonicalization rules. Thank you again, Adam!
Attachment #8939282 - Flags: review?(jjones) → review+
Assignee: nobody → agl
Status: NEW → ASSIGNED
Keywords: checkin-needed
MozReview complains that a suitable reviewer has not given a "Ship It!"
I can't land the patch because of this.
Flags: needinfo?(jjones)
Keywords: checkin-needed
Comment on attachment 8939282 [details]
Bug 1420763 - encode webauthn keys as a COSE key;

That is super weird; 1420760 landed just fine earlier today.

I guess I'll bother David; r?keeler?
Flags: needinfo?(jjones)
Attachment #8939282 - Flags: review?(dkeeler)
Comment on attachment 8939282 [details]
Bug 1420763 - encode webauthn keys as a COSE key;

https://reviewboard.mozilla.org/r/209714/#review215914

Looking at RFC 8152 section 13.1.1, it seems crv, x, and y are indeed required, so I believe this is correct.
Attachment #8939282 - Flags: review?(dkeeler) → review+
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s d441285b7018 -d 38b6a5527c29: rebasing 440875:d441285b7018 "Bug 1420763 - encode webauthn keys as a COSE key; r=jcj,keeler" (tip)
merging dom/webauthn/WebAuthnCBORUtil.cpp
warning: conflicts while merging dom/webauthn/WebAuthnCBORUtil.cpp! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Comment on attachment 8939964 [details]
Bug 1420763 - encode webauthn keys as a COSE key;

https://reviewboard.mozilla.org/r/210238/#review215962
Attachment #8939964 - Flags: review?(jjones) → review+
Comment on attachment 8939964 [details]
Bug 1420763 - encode webauthn keys as a COSE key;

https://reviewboard.mozilla.org/r/210238/#review216244
Attachment #8939964 - Flags: review?(dkeeler) → review+
Attachment #8939282 - Attachment is obsolete: true
https://webauthn.bin.coffee/ is now updated to use COSE structures.
Pushed by dkeeler@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cd99a1f959ad
encode webauthn keys as a COSE key; r=keeler
Pushed by dkeeler@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6168b9358352
encode webauthn keys as a COSE key; r=keeler
https://hg.mozilla.org/mozilla-central/rev/6168b9358352
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: