-
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
username and display name should not be mandatory (rp, challange either) and OS UX should be simplified if not present #1915
Comments
@r-jo Ultimately this actually comes down to the RP. In https://github.com/kanidm/webauthn-rs we enforce that the userid is a uuid, and the displayname can be any str input - even blank. This is needed so in a discoverable workflow we have to identify which credential matches to which account. We don't even need to store and PII, but we just need to tie it to the account. The alternate is to have a way to id the user before to know what credential id's to present as valid in the authentication (non-discoverable) where the RP checks the userid/username first. The displayname is just for the client side in discoverable to allow the user to ID what user account they are about to use to authenticate, but its NOT transmitted as part of that operation. Finally, RP and challenge are mandatory and have extremely critical security implications for how webauthn works. Webauthn does have it's complexities and issues, but "privacy" as you are describing is not one - it's simply up to RP's to implement privacy preserving implementations of webauthn that respect users. |
Ironically, the only purpose of
This may be your own experience, but it is not up to the RP to decide whether the user gets to have multiple accounts. In fact, it is an explicit design goal of WebAuthn make it difficult for the RP to detect if a user does (see §14.2.). A user with more than one account does need a Also notice in the definitions of
So even if the RP doesn't care about these fields, it's recommended to still allow the user to set them. That said, it could in principle make sense to make these fields optional and have the client prompt for them if the RP doesn't set them. It would even make sense to me that the user should be allowed to override the values set by the RP. But I'm not sure it's worth the added complexity - UI could become inconsistent between RPs, for example, which might be more confusing than helpful.
I agree with @Firstyear, particularly in the case of assertions. It is critical that the RP chooses the Registrations are slightly different, though. We already provide shortcuts for RPs not interested in verifying the attestation signature, in which case the |
And we just know there are RP's that would make challenge optional when attestation is direct/indirect. Better to do the secure and correct thing by default. |
Hallo, SUGGESTIONS: PKCEntity could be an empty interface if still needed No apparent need for name to be required. Even Adam Langley in his example sets the name to blank which is a very strong sign if not a proof that the field should be explicitly optional (not just implicitly). No apparent need for name or display name to be required. Setting them to blank is ok and privacy friendly. No apparent need for rp or challenge to be required. Per default rp can be nameless, only with the domain name as id. I would say it is even best practice since using discovered domain name is better than self naming (and then error handling). dictionary PublicKeyCredential**Creation**Options { I am not very knowledgable yet so take this with a pinch of salt from an amateur who has not very deep ideas about webauthn (and not klugscheissen): the whole API could use a rethink where it does not hurt much (at least notes or required -> not required transitions which is better as the other way round since there are already implementations running): around attestation vs no attestation and platform authenticators vs. roaming authenticators I guess. Especially decoupling attestation would be great for RPs who actually are supposed to implement it. I have the feeling that at least 95% use cases will be with platform authenticators and without attestation. REPLIES:
firstyear:
|
What is the privacy issue with It may be against some RPs' terms of service for one person to create multiple accounts, but it is not possible for the RP to prevent this using the tools WebAuthn provides. This is by design, because that is a privacy concern. An RP seeking to prevent this must use external tools (cookies, local storage, IP filtering, government ID proofing, etc.) to do so. You certainly can set
I agree, but it is far too late to change this now. |
Hi. My issue is not really privacy and of course the privacy issue is not explicit since the 2 username fields are implicitly optional. I can skip them by leaving them blank. If I understand well, the user handle came later on and until then, username was the id too like by practically all accounts with emails as usernames. However, the 2 username fields remain still required in the spec for no good reason, which makes it very ugly for privacy conscious usernameless services to deal with it (leaving it blank? filling with something like "user"? both? just one of them?). In addition, you always have to fear what the UX implementations will be: will it be only awkward or flat out suspicious if you leave usernames blank? I think the spec has the responsibility to make not required fields not required and guide UX implementers. It should be a totally legal case to use only user id/handle. The api should communicate this. As I wrote earlier, I do not try to prevent multiple accounts, I know I cannot prevent it, I just pointed out that in my opinion multiple accounts in a domain are not normal. I do not really know what you are talking about since cookies and local storage are
Either you or me is very wrong (probably me?) because you say things like sabotage something with setting the 2 usernames to the same. Even this implies I should set usernames that make sense? As I can see every pass manager uses the user id/handle for passkey entries. There will be 2 entries even if usernames are the same. And of course by leaving usernames blank they will always be the same. Is that a problem now or not? Again, if I see in a browser that this user has a passkey I will not offer to create one, why should I. If somebody wants another account (even if they should not) they can just go to a different browser and when they create an account with a passkey they get a new user id/handle. I will not set any usernames but they can in their pass managers, for both of their accounts. I do not sabotage anything. No, it is not too late to change anything. Tomorrow you could change the specs to what I suggested in my previous post since you only have to make fields not required (fields that are actually not required). Nothing would break. And I did not get an answer to my real questions. Why not make those fields NOT required? I even published all interfaces how they should look (user.name, user.displayName, rp and challenge). Problem is they are flat out wrong, ugly, make us RPs (each and every RP) write code that makes no sense like: The API communicates to UX programmers that they do not have to think about usernameless entries. As an effect, now, today all 3 big implementations show account chooser for my domain even if there is only one account and the 2 username fields are blank! This is all because of this bad API. As of now, the UX is sabotaged by a very bad specs. Since optional fields are marked as required, leaving out optional fields by blanking them leads to an awkward UX in reality instead of just: create your passkey for xyz.com or use your passkey for xyz.com And please do not say that the specs says nothing about UX implementations because you should have take more responsibility. Make these fields truly optional and lets see if it has a positive effect on UX in the future. No way somebody by Apple/Google/Microsoft will write a code that: if a required field string contains only white spaces then... It is NOT the way. If a field can truly be blank, the field is optional and must not be required. |
My real questions.
Thanks a lot. |
This: That's what you get if you create two passkeys with How do you propose that "UX programmers [...] think about usernameless entries" when there's more than one? Remember, the browser cannot assume that the user will have only one credential per domain.
Nevertheless, there are many valid reasons a user may have them. When they do, the UI needs to be equipped to help the user distinguish which passkey goes to which account. That is why these fields are required.
Ask the user for a value, maybe describe it as a "passkey label". You do not need to store that value; it will never be conveyed back to you. Or set all three to the same user ID, if you have one suitable for human consumption. Or generate a random name for the account and its passkeys. As long as there's something the user can use to distinguish passkeys for different accounts. |
2023-08-16 WG call: There seems to be nothing more to discuss here; closing. |
Hi, The internal logic of webauthn is usernameless and it will be extremely confusing if this thing is not cleared. For more details and the first website people struggling with this check out: I do not have time for this anymore. Moreover, the BAD pass manager UX is also because of this mess up. Even if only one account (which should be NORMAL) there is a lot of unnecessary text in the pass manager, an account choser as extra step blaahhh... instead of "use the passkey for xyz.com" Simply put: you cannot and should not micromanage the pass manager labels from the server side. And in the webauthn logic, the 2 username fields are nothing more than labels. They can be changed by the user anytime in the pass manager without the "relying party" knowing about it. They are in the power of the user and the responibility of the user. Even accounts with usernames would learn in absence of username fields at least the true nature of passkey authentication. Again, it is a self-discussion about deleting username fields from the spec vs. 1 or 2 optional fields. |
Yes, WebAuthn doesn't need the usernames internally, but human-comprehensible labels are still needed for human end-users to understand and what each passkey is for. Also, it occurred to me just now that your original ask is based on a false premise:
But the reality is that if they were optional, then the client UI would have to have more steps than if they were set, not fewer. As established above, it's not feasible to leave passkeys without a user-comprehensible label, so the client would have to ask the user for one if the RP doesn't. Then if the user chooses to create another passkey for the same account on an additional authenticator, they'll probably want the same label on both passkeys. The RP is better equipped than the client to choose and remember a suitable "account label" for any future passkeys the user may choose to create for the account. I fully agree that choosing suitable values for |
I did not answer your questions because I think I did them before but again: If it is optional, not required, others who fear those screenshots you published can set the starting username or note fields in the pass manager. Your reply was an argument against deleting the fields not against making them optional. If it is optional, I can decide that I dont give a shit about users who create more than one accounts. For such websites if a user creates multiple accounts, which it can, then it is of course his/her responsibility to manage in his/her pass manager labels... in my service, in a usernameless account, there are no such labels because it makes no sense to have more than one account. Your thinking is very tied to the fact that everybody uses burner accounts and multiple accounts but it does not make it normal. And no, I do not want to prohibit it, I cannot prohibit it but it is not my responsibility if a user creates 2 usernameless accounts in a web domain and doesnt have any idea which is which. Hint: enter both accounts, know why you created them and why you need them how you want to distinguish them (you are on pro level in one account and the opponents are too strong and you want to create a new one where you seem to be an amateur and enjoy being super dominant, then call them pro and amateur in your pass manager, or call them 1 and 2 I dont care). And I suggested for example
Another example, a usernamless account with the option(!) of email recovery could let the user manage the labels which could be the email adresses (if the user has no idea, enter account with label 1, check email, then replace label in the pass manager to email adress) A nicer website could suggest the email adress as label. But actually, I would not do this because it makes usually no sense to have real users create multiple accounts. The users are not babys. Websites should not micromanage things that they actually have no power or responsibility over. |
I really dont have time for this but you simply state logically false statements! You do not even realize there are 3 possibilities for the 2 username fields or whatever pass manager labels you want relying parties to micro manage or suggest:
You repeatedly argue against 3. (and even if 3 was possible and desirable with a radical rethink, please note that I ACTUALLY SUGGESTED 2. and do not argue against 3 like you would argue against me and my suggestion because you falsely imply I want 3... I realize that 3. is too late now, also it is a more difficult thing to argue against. In addition, 3. is very radical since it goes against some typical wrong pattern of existing multiple accounts, correctly labeled with different emails or such. And I never said those websites should not set these email fields for the users in the pass manager for simplicity, even if the pass manager label is actually the responsibility of the user). Let us see your last answer block, statement by statement:
B: "human-comprehensible labels are still needed for human end-users to understand and what each passkey is for"
C: "your original ask is based on a false premise" , "if they were optional, then the client UI would have to have more steps than if they were set" , "the client would have to ask the user for one if the RP doesn't"
D: "The RP is better equipped than the client to choose and remember a suitable "account label""
E: "I fully agree that choosing suitable values for user.name and user.displayName in a username-less application is difficult"
Please RE-THINK, I still have some hopes:
|
And I am not happy that this thread was closed! It is very hostile towards open discussions. |
Your points are valid, but it's essential to recognize diverse user behaviors and needs. People often manage multiple accounts for various reasons: personal, work, testing, and more. While single accounts might work for some, many users appreciate the flexibility of managing different accounts efficiently. Comparisons to bank accounts or digital identity accounts don't fully reflect the web service context, where varying roles and purposes call for multiple accounts.
I do have multiple accounts at one bank. The core issue you've raised seems to be more about the UX design around the passkey management process, rather than the necessity of name labels themselves. Instead of focusing solely on the name labels, perhaps a better approach would be to consider streamlining the user interface. For instance, if there's only one account associated with a passkey, the name selector could be skipped, and the user could be directly prompted to enter their passkey. On the other hand, if multiple accounts are detected, the interface could show the account selector to help users choose the appropriate account. By shifting the emphasis to refining the user interface and experience, we can address your concerns while still maintaining the necessary labeling for passkey differentiation. This approach could potentially lead to a more intuitive and user-friendly interaction, catering to both the single-account and multi-account scenarios. |
@r-jo while some of your points are valid you could have gone about this way better. Posting huge amounts of text, downvoting people who respond (literally the very people who are the WebAuthn spec members) and yourself being somewhat disrespectful (even hostile as you call it) never ever works to persuade anyone who is in a position to back your ideas. Also as others said the security implications of some of what you're proposing (eg. not having a challenge) are high and show a lack of understanding (on your part) of the spec. Further, users should be allowed to create multiple accounts - imagine if you could only have one Google account with your security key and you need to delete it (and your account?) to make another. It's up to you as a RP to work through multiple accounts not the spec. I agree some of the UX is not the best yet (eg. Sign-in when you the user hasn't set a key with that device) and many users are definitely confused by passkeys - it would better to have a single issue for these. |
hi
so the RPs should write one-account logic without usernames and yes it would be great to have this by google etc... do you have more apple IDs? it is just like email is not always anonym and you want anonym accounts etc... or cheat with drive space... then you need an alias email for the same account and google may give you 3x15gb... not more |
I'm going to mostly ignore the end of 3. for obvious reasons except to say that of course there are benefits in pushing WebAuthn for all of the players you mention; but there are huge benefits for users too both in security and in ease of use (the UX needs work as we all point out). Also what's not clear about how discoverable creds are created? It's not some conspiracy... you can create your own authenicator and get it FIDO certified. If you also want something more secure for your app and that still uses WebAuthn then derive keys using the PRF extension (unfortunately not available on all OS/client/authenticator combos) and hold the final login until these have been derived, set and the data decrypted (ie. E2EE). More than happy to share code if you're interested. And yep some of it is defintely "hacky" when trying to go usernameless and anon but ironically this actually gives your users greater privacy. Also I'm sure you've heard of the Signal Protocol - that's probably what you're looking for but it is very complex and probably easy to make a mistake. Like I said, some of what you're saying is great albeit mashed up with some topics that no-one wants to discuss, at least on GitHub. PS. you have "...not be mandatory (rp, CHALLENGE either) ..." in the issue title and also mentioned it. |
hey, of course webauthn can be implemented great, I enter my google account on a windows machine with my fingerprint, vow (on my linux pc hmmm...) the question is the broader design and whether it will be (should be) widespread, will 50%+ web domains implement it? of course not, because it has the flaws I discussed... the biggest problem is that a ruling solution requires the secret to be backupable (like bitcoin BIP39 or something)... or else the whole thing is federated again (apple, google, pass manager) and nobody wants to (and nobody should want to) be dependent of the pass manager completely... the secrets must be exportable... that is my opinion and if only 10% of people think so, no web domain or service will implement only passkeys in this form... and what is actually the big advantage of passkeys IF there is a backupable secret key anyways? you should have understood that there always be some backupable secret key because why should I add passkeys if I already use a recovery key (if the user wants it, on paper, if the user wants it easy in pass manager with some local disk encrypted backup etc...) and the browser can do ECDSA too, just like passkeys? the only thing is missing is biometrics. I would have never implemented passkeys if there is a better way for biometrics on the web. the trade off is you DO have a readable backup but you hopefully rarely or never really use it... if you create passkeys this way, there will be other solutions and why would I complicate my life with passkeys? I can do it in the browser (now without biometrics because webauthn has monopoly) but my REAL SMALL problem is that you do not even consider minimal changes like making username fields NOT required... you do not even discuss what is right what is not right... you do not even seem to understan that the whole webauthn logic is usernameless, you did it this way and then required 2 username fields...? come on! I do not want to circumvent it, I do not want to hack it, I want to write 5-10 lines in js with the really important fields, I want to know from the interface and specs which fields are really important... and that is it... the UX cannot improve on BAD LOGIC! what should a UX writer do if a fied is REQUIRED? then they have to do something with the string inside, even if it is ""... the fact that people want to put "" is a proof that something is smelly (should not be required field.... if the field is not required, the UX implementer HAS to create an if-else... if it is not there, vow, then no field... then they think about it, vow, if it is not there, one account, no multiple account, we do not need 80% of UX stuff here... just sign in to xyz.com with your passkey, that is it! if a second account is created with a different id, then we prompt the user to manage the username labels because logically it is NOT authentication logic by passkeys but pass manager multi-account labeling logic... I can change this label on android now and I can sign in... PS: I do not have the time but at one point challenge is crucial (the random server challenge that is signed over) at another point there is some challenge we never do anything with, as far as I can remember it has something to do with attestation that is not happening 99,9999% so we have to generate a random something that has no use... it may only be bad if an RP gives a non-random something... if we do not need it, we should not be made to create it, it is obvious... again, if someone needs it, it can be optional and if there is no challenge, the party that actually does something with it and has more security knowledge than an average RP creates a random something... |
some questions:
so tell me, why do we need to create in js a random number for this, if there is practically no attestation logic we want or even if we want, apple simply does not implement it? why is it REQUIRED? I mean all you actually need are the code below, and PLENTY of other stuff you must include with blanks or default values that 99,9999% will use but are not default in the specs... the real deal is generating the PID on server, giving by creation, choosing algo, then by get give a random challenge and check the signature later on server with the public key... it would also be nice if someone who actually wants to be this widespread provided the MOST simple code needed, without libraries... I mean I even had to write derToRaw() functions etc... getting info out of signature is a nightmare... it could be EXTREMELY SIMPLE code on client and server... it is not that complicated, I did it in js and java, but I can tell you now that an avergae RP will not want this and even if wanted, not capable, and not because it is that complicated but because the very simple stuff was made overly complicated with design horrors... I mean next time a good test: gather 10 RPs and if they cannot do this in a day and have a joyful face at the end of the day and practically no questions, THEN it is simply NOT OK yet... I mean you can write NOTEs in the specs... I could make this working in 2 weeks alone, with wonderful understandable specs for the 99,9999% of RPs... but actually I think even if usernames and other shit disappeared and good notes and good example codes, this is the SMALLER part where I wanted to help you with my actual RP implementer experience... the BIGGER problem is backup... I think you should find a backupable format and derive ECDSA keys from them, there is an RFC for it and of course you just have to check out parts of bitcoin stuff:
|
If you don't make it required people won't do it. It allows a registration to enforce that the registration we are being sent is genuine and related to the caller that initiated the registration call. It prevents replays.
This is why RP's allow you to register multiple credentials. You aren't backing up a single private key. You enroll multiple keys, and can individually revoke them in the case of loss.
This is why you use libraries like https://docs.rs/webauthn-rs/0.4.8/webauthn_rs/ which does everything for you and has been through security audits to ensure properly handling of credentials. There are genuine issues in the Webauthn space, but they are not the ones you are raising here. I think this conversation has gone far enough though. |
You can see the challenge check in the registration even if it's not signed by an attester as a mandatory CSRF token. It still has its use even-though it's not signed! |
Description
PublicKeyCredentialUserEntity has mandatory fields by create(): name and displayName even if there is an anonym user id which is given to the server as "user handle" after a get() and what we can and should use for possibly private-as-possible user identification.
These fields should not be mandatory and OS UX should be much simpler if these fields are not used. For simplicity and privacy it is possible not to use phone numbers, emails or user names. OS should create a ux: Creating passkey for xyz.com web domain (which will be synced to your Apple/Google/Microsoft/Third Party pass manager).
I think there is a username fetish which can be tied to passwords that are going to be replaced with device based security (even if private keys are synced and stored, passkey is rather device based if I understand well). With passwords you could log in from everywhere and though you do not really need usernames if the pass is long enough, it was personal and intuitive and now people seem to think it is a must (which is not the case).
We actually do not need usernames anymore. The new way is to have a personal protected OS account even if the device is common. You protect it with biometrics and PIN. The user is tied to devices (actually OS accounts) that (s)he should own. We can use access tokens and crypto keys to create an implicit account and only if the user wants some more robust recovery, we can give a recovery key (a long password without username) or even better as I recon: a passkey which is synced and stored in the pass manager. For normal people it will be Apple and Google pass manager which is ok because those who dont care, save everything via Apple or Gmail anyways. Those who care (gmx, protonmail, 3rd party pass manager etc), can have the option for a third party pass manager as I see (os api).
Again: the user identity is actually the normally 1-3 personal protected os account (and efforts should be made that people create own os account on common devices). The implicit account can be verified via session management and subtle crypto (netflix pushed it and netflix uses it too), actually the same way as by passkeys: private key in browser indexed db non extractable key, public key on server. Of course clearing the browser is equivavalent to device loss, so at the right point, preferably with passkeys users can create explicit accounts where the private key is stored in a pass manager.
I feel some confusion because I do want the same user id/handle and in the specs you see: "the user handle ought not be a constant value...". Well I do not want a user (=user of 1,2,3 devices/os accounts) to create more than 1 account. I think it is again a perversion from the old times. I need one google account actually and if Google makes it possible, I can create more email adresses inside(!) where I switch easily. Nobody needs more than 1 google account but we create burner accounts because every *** website wants our email adress and it can be personal (our name). It is not private against Google that we create more accounts, it is private against web services who want our email adress.
I do not want to fight the system but I want to point out that actually the normal behavior would be to have private anonym accounts without username, email, phone number and add these information if and only if needed (I would add my phone number to Google for recovery since I might recover with my real identity through the phone company but actually 90% of web domains dont need email, phone or usernames).
I think it would be nice to give websites at least the possibility to offer truly private accounts easily without this complexity. However, with this API I have to write something like: xyz.com user as username and citizen of xyz.com as display name and the whole OS UX is overcomplicated. I will never use username or display name, I will use the anonym user id/handle.
In addition, for simplicity, rp and challenge fields should not be mandatory, either. Perfectly fine to use window.location.hostname and if OS needs a random value, they are more than capable to create for themselves if I do not create any... even better because I have no idea if it is needed and 16 or 32 bytes etc. is better or the whole thing is totally unimportant.
Related Links
https://w3c.github.io/webauthn/#dictdef-publickeycredentialuserentity
The text was updated successfully, but these errors were encountered: