-
Notifications
You must be signed in to change notification settings - Fork 180
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
credential ID returned by authenticatorGetAssertion() is optional if allowList has exactly one member #472
Comments
Hm, if the authnr's returning of Credential ID is optional in the case where the webauthn client invokes Is this a case of "snapshotting" ? I took a stab at doing this in 31a8f85 |
Please re-cc me if there's a specific question for me. |
@bzbarsky yes, the above questions are for you if you have time to consider them (the other guys are out-of-pocket for a while). thanks. |
I guess I just don't understand the questions then. They seem to be about details of authn that I'm not familiar with, not about the general platform integration aspects.... |
The questions are about how to save state (a particular value) from before the invocation of an async operation, until the async operation returns, and then combine the saved value with the async op's returned values. abstracted out, it's like this: if a given sequence |A| has exactly one value, then let |S| be a new Is the above more or less correctly specified, or not? thanks for your help. |
So basically you want to pass some sort of data through the async op? I'm not sure what the best current spec language for that is. @domenic ? |
I'm having a hard time understanding the above, and I tried reading 31a8f85, but without context it's not very intelligible to me. At first glance those sentences seem OK-ish, although generally you want to be more explicit about going in-parallel and then posting a task to get back to the main thread. But it seems like you're taking care to not create or manipulate main-thread objects during your off-main-thread async work, so that's good at least. |
Well, not "through" the async op. Rather, want to remember something "globally" (on the "main thread" ?) "outside" the async op. So, thanks guys -- I take that as meaning that at a first-order approximation the new language is OK enough for now. wrt..
might you be able to point to a spec that does the above, that we might learn from? thanks again. |
Ok thanks. Is not "posting a task to get back to the main thread" part of inherent Promise machinery? In the case of the alg discussed here, it is called-into by navigator.credentials.get() wherein the Promise resolution/rejection is handled. |
If the only thing you do back on the main thread is resolve/reject a promise with a pre-existing value (usually undefined), then we have defined them to post a task. (Although that is somewhat controversial/buggy; see w3ctag/promises-guide#52.) But if you do anything else back on the main thread, such as creating an object, you need to post a task to do that. Now that I've been linked to https://w3c.github.io/webauthn/#getAssertion, I see a few problems:
I think I would advise:
You can see some pretty similar spec-code in WebAssembly/design#1093 (preview). That PR's processing/success/failure steps are probably not quite necessary in your case, so no need to emulate that somewhat inside-out structure, but hopefully it conveys the way in which you weave between threads. Hope this helps... I do feel every time I end up in this repository I see you tackling with some of the hardest issues in spec-writing, so my heart goes out to you. |
Thanks for the review & guidance @domenic ! @domenic noted in irc #whatwg that when he says "post a task", he means "[=queue a task=]" @domenic wrote:
Ok.
Ok, will look to WebAssembly/design#1093 (preview) for guidance.
ah, you are referring to webappsec-credential-management/#abstract-opdef-request-a-credential here it seems.
ok, though IIUC, webappsec-credential-management/#abstract-opdef-request-a-credential does not itself presently "queue a task...to actually do the object/exception creation and resolve/reject the promise", yes? I am thinking that all the "object/exception creation and resolve/reject the promise" functionality could be specified in the webauthn spec in a fashion similar to WebAssembly PR #1093's approach. WDYT? /cc @mikewest |
see also issue #254 "There is no "current settings object" in algorithm steps that are executing in parallel" for additional context wrt what's at issue here. see especially #254 (comment) |
* do not call authenticatorMakeCredential() with separate |rpId| fixes #466 * credID returned by authnrGetAssn() is optional if allowCreds has exactly 1 member fixes #472 * fixup global object reference per domenic, improves #472 * indent 4.1.4 step 18et al to clarify relation to prior step * fix line indent * do not call authenticatorMakeCredential() with separate |rpId| fixes #466 * credID returned by authnrGetAssn() is optional if allowCreds has exactly 1 member fixes #472 * fixup global object reference per domenic, improves #472 * indent 4.1.4 step 18et al to clarify relation to prior step * fix line indent * post rebase-on-master, fix dangling MakeCredentialOptions * fix error in resolving rebase conflicts * further rebase conflict resolution error fixups * convert switch steps to colon-denotation * tag 'while' * primary changes for improving #472 mostly complete * further issue #472 cleanups * del 'cancel the timer' from #creatCredential fixes #535 * polish constructResultantCredentialCallback method description * incorp comments from mikewest at webappsec-credential-management/pull/100 * rebased onto master * credID returned by authnrGetAssn() is optional if allowCreds has exactly 1 member fixes #472 * fixup global object reference per domenic, improves #472 * indent 4.1.4 step 18et al to clarify relation to prior step * fix line indent * do not call authenticatorMakeCredential() with separate |rpId| fixes #466 * credID returned by authnrGetAssn() is optional if allowCreds has exactly 1 member fixes #472 * post rebase-on-master, fix dangling MakeCredentialOptions * fix error in resolving rebase conflicts * convert switch steps to colon-denotation * tag 'while' * primary changes for improving #472 mostly complete * further issue #472 cleanups * polish constructResultantCredentialCallback method description * incorp comments from mikewest at webappsec-credential-management/pull/100 * fix indents make BS happy, add some periods * fix code tags placement * correct bugs in prior merge conflict resolution, doh * rm 'the bytes of' * add missing @@EDITOR-ANCHOR-01A * auto-number some steps * re- fix #466 (due to merge-from-master), fix #536 * eliminate callback and just return an algorithm from #createCredential * continue fix conflicts from merge from master * fix a couple of issue #466 stragglers in #op-make-cred * revert to prior AuthenticationExtensions language per jyasskin * add inline spec issue pointing to issue #657 * minor cleanups, remove issue wrt not explicitly returning |credentialCreationData| * fix annoying bikeshed warning wrt 'rpEntity' * correctly fix warning as well as other incorrect markup
* do not call authenticatorMakeCredential() with separate |rpId| fixes #466 * credID returned by authnrGetAssn() is optional if allowCreds has exactly 1 member fixes #472 * fixup global object reference per domenic, improves #472 * indent 4.1.4 step 18et al to clarify relation to prior step * fix line indent * do not call authenticatorMakeCredential() with separate |rpId| fixes #466 * credID returned by authnrGetAssn() is optional if allowCreds has exactly 1 member fixes #472 * fixup global object reference per domenic, improves #472 * indent 4.1.4 step 18et al to clarify relation to prior step * fix line indent * post rebase-on-master, fix dangling MakeCredentialOptions * fix error in resolving rebase conflicts * further rebase conflict resolution error fixups * convert switch steps to colon-denotation * tag 'while' * primary changes for improving #472 mostly complete * further issue #472 cleanups * del 'cancel the timer' from #creatCredential fixes #535 * polish constructResultantCredentialCallback method description * marked authenticator model section as non-normative * marked relying party operation section as non-normative * fix proper subset tweak * Added abort signal object and steps to webauthn * fixed a minor issue with linking * add minor edits to focus on the main things * getting the blank line correct * Added a example section to explain how abort should be used * fix up example * committing before computer dies * updated grammars of the example based on feedback * update example text * Updated with the section on switching tab; complete the PR * minor tweak * finished polishing the spec * whoops one leftover * finally figured out how to remove last two linking errors * take out abortsignal from extension; edit promise rejection
The authenticatorGetAssertion operation says:
However, the CTAP spec says in 4.2 authenticatorGetAssertion:
..which would seem to be an optimization for CTAP where it does not have to return as many bytes (in what may be a common case).
Update WebAuthn to reflect this?
The text was updated successfully, but these errors were encountered: