-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
publicKey
member name in CredentialCreationRequestOptions
should be "public-key"
, or vice-versa?
#1004
Comments
@emlun noted in #750 (comment): |
@equalsJeffH noted in #750 (comment):
|
(2) requires change for both RP as well as client. Its a breaking change. |
IMPLEMENTORS -- please weigh-in on how you're ACTUALLY dealing with this ostensible impl-level issue (at the code level)? |
How Gecko is dealing as follows:
Needless to say, this looks nothing like the spec. I ran into this issue when trying to make our behavior more like the spec... |
on webauthn call 1-Aug-2018:
|
In Chrome CredentialCreationOptions has three optional members and the code checks that exactly one of them is present and dispatches based on which it is. When we create a Credential object the subclass sets the I don't understand why these two strings need to be same and thus why a change is being suggested here. |
Right, the question is how that dispatch happens. Looking at the linked code, it looks like Chrome hardcodes the fact that the "publicKey" member maps to the PublicKeyCredential interface, right? And then the PublicKeyCredential implementation is hardcoded to set "public-key" instead of having a
The [CredMan] spec is trying to do dispatch for all this stuff without hardcoding a specific list of possible credentials. So it walks the list of all the interfaces looking for one whose The [CredMan] spec could switch to having two different internal slots, or to defining a mapping from dictionary member names to |
Ah, I see. It comes from this section of the CredMan spec. However, clearly no implementation actually works like that (otherwise they would have hit this issue). Thus I would suggest option three: do nothing. This part of the CredMan spec was excessively abstract and we shouldn't suffer for it now. If the group does not like option three, then option two would seem to be the least disruptive path. Lots of code probably doesn't check the |
I strongly object to "do nothing". That leaves the spec in a state that will cause problems for anyone who tries to actually implement what the spec says. If we need to fix the credman spec, we should fix the credman spec. But leaving things in a known-broken state as a landmine for unwary implementors is unacceptable. |
(My ”do nothing“ was directed at webauthn specifically and I didn't intend to suggest that CredMan couldn't be updated. But it appears to me that nobody has implemented the CredMan spec as written and thus I think the CredMan spec should align with reality here rather than us changing webauthn to follow it.) |
That would be a perfectly reasonable course of action from my point of view, fwiw, as someone not directly involved in either spec. |
on 15-aug webauthn call -- I'll open an issue on CredMan in regards to this and then we can note that here and close this issue. |
per #1004 (comment) above, I've (finally) submitted w3c/webappsec-credential-management#147 and am closing this issue. |
forking the thread beginning here #750 (comment) into this new issue.
Here's the salient portions:
@bzbarsky wrote in #750 (comment):
Does the spec actually describe what should happen when the .publicKey dictionary is missing? As far as I can tell https://w3c.github.io/webauthn/#createCredential asserts it's present in the CredentialCreationOptions, but it's not clear to me what guarantees that, exactly... It's also not clear to me when the "publicKey" member of CredentialRequestOptions ever gets used.
As long as the spec completely describes behavior when the dictionaries involved are missing, it should be fine as things stand.
@emlun wrote in #750 (comment):
As far as I understand, the presence of the
publicKey
member is what triggers the client to invoke the WebAuthn methods instead of other Credential Management backends.@emlun wrote in #750 (comment):
I think it happens here, where interfaces refers to here where options is the options argument object sent to the
create()
method and the[[type]]
slot for the PublicKeyCredential interface contains"public-key"
....actually, does that mean that the
publicKey
member name inCredentialCreationRequestOptions
should also be"public-key"
, or vice-versa?@equalsJeffH wrote in #750 (comment):
Looking more closely at credman's magic relevant credential interface objects sub-algorithm, i'm now thinking you & @emlun are correct, due to steps 4.2 & 4.3 in said sub-alg:
So, perhaps browser implementors can weigh-in on whether it matters if we change..
publicKey
to bepublic-key
, or"publicKey"
(rather than the present"public-key"
)...i.e., what are present implementations doing, would making this spec fix affect them at all?
cc @kpaulh @agl @akshayku @jcjones
The text was updated successfully, but these errors were encountered: