RE: Three possibilities for discussion

Someone else also recently mentioned the third item on Richard’s list – that the pattern for web APIs is to put all optional arguments in a dictionary. I’ve created a issue #84 in Github so we don’t lose track of this one.

From: Alexei Czeskis []
Sent: Saturday, May 07, 2016 8:40 PM
To: Vijay Bharadwaj <>
Cc: Richard Barnes <>; Axel Nennker <>; W3C WebAuthn WG <>
Subject: Re: Three possibilities for discussion

+1 to what Vijay said.  Keeping them separate seems like the right approach to me.



 . Alexei Czeskis .:. Securineer .:. 317.698.4740 .

On Wed, Mar 30, 2016 at 9:22 AM, Vijay Bharadwaj <<>> wrote:
We’ve certainly discussed this before as well.

The problem is that makeCredential and getAssertion are conceptually quite different and typically embedded in very different UX flows.

-          makeCredential is used to generate and register a credential with an RP, typically after some out-of-band (often relatively high-friction) proofing such as phone calls, text messages, etc.

-          getAssertion is used to show possession of an already-proofed-and-registered credential, and is typically part of a very streamlined flow.

It also seems to make very little sense to sign an assertion with a credential you just created. At makeCredential time, the new credential is just a key – anyone can create one, and signing with a key you created is no feat. The RP’s problem at that time is to assign trust to that credential using other means. Since those other means must be at least as strong (in a risk-management sense) as the credential they are endorsing, they should also be enough for any purpose that would otherwise accept the results of getAssertion.

From: Richard Barnes [<>]
Sent: Wednesday, March 30, 2016 7:28 AM
To: Axel Nennker <<>>
Cc: W3C WebAuthn WG <<>>
Subject: Re: Three possibilities for discussion

On Wed, Mar 30, 2016 at 10:27 AM, <<>> wrote:
And then name the folded method “get” and place it into navigator.credentials ?

I'm flexible on naming.  Using signAssertion might be more descriptive.  I admit that it does take us farther from Credential API.

If there is no key already then is the method returning the results of both methods? That is: is the newly generated key immediately used to sign a challenge?

That's what I was thinking, yes.

From: Richard Barnes [<>]
Sent: Mittwoch, 30. März 2016 15:24
To: W3C WebAuthn WG
Subject: Three possibilities for discussion

Hey all,

I was hacking on a U2F stack over the weekend, and a couple of possible simplifications to WebAuthn occurred to me:

1. Fold makeCredential into signAssertionn

It seems like there's a pretty high degree of overlap between the makeCredential and signAssertion methods.  They have the following things in common:

- A challenge (attestationChallenge / assertionChallenge)
- A timeout (credentialTimeoutSeconds / assertionTimeoutSeconds)
- A list of keys the JS already has (blacklist / whitelist)
- A list of extensions (credentialExtensions / assertionExtensions)

Can we fold the semantics of makeCredential into a slightly expanded signAssertion?

OLD: Sign with one of the keys on the whitelist
NEW: Sign with one of the keys on the whitelist or generate one if you can't find a whitelisted one

This would require some additional optional stuff, e.g., to pass in the accountInformation / cryptoParameters and return the key that was generated in that case.

Basically, ISTM that people are rarely going to just call makeCredential, without calling signAssertion immediately after, so there's not a whole lot of reason for all the duplication.

2. Make Account optional

Right now, you always have to provide an Account dictionary in makeCredential.  This dictionary is just a bunch of metadata that won't apply in a bunch of cases, so we shouldn't make people put {} in there all the time.

3. Move optional parameters and extensions into an "options" dictionary

The "extensions" pattern in the WebAuthn methods seems uncharacteristic for a Web API. It's more common to package all of the optional arguments (plus any possible future ones) into an "options" dictionary.  See, for example:<><>

We should take all the optional stuff in these methods (timeout, whitelist/blacklist) and put them in an optional options dictionary which is the last argument to the method.

And as your reward for reading this far:<>


Received on Sunday, 8 May 2016 06:54:32 UTC