-
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
Syncing Platform Keys, Recoverability and Security levels #1640
Comments
Regarding the security characteristic, for me there are 4 important aspects:
|
I would add two more questions to the list, @rlin1:
|
@rlin1 / @arshadnoor I have some answers but not all to above questions. And probably it's best that individual platform/Authenticator answers them individually. Also, I am not sure whether above comments are from RP's perspective or from FIDO alliance certification perspective or both. I am still looking for RPs who say that it absolutely address their recovery scenarios vs it can work if done with following changes vs it will not work at all. |
@akshayku This is a huge and looming issue for mobile devices. I didn't quite got what a "synced" credential is. Do you mean that it would require private key export? I hope not. A possible solution is syncing FIDO metadata like user has a key for mybank.com which can be enrolled at https://enroll.mybank.com. If a new device is to be used, the key will not be found and the user could be asked to use the original device to initiate a secure cloning request. A "manual" cloning concept is currently used by 5 million Swedes for "bootstrapping" their mobile BankID which are used by bank as well as government services. In the case the user has lost all keys/devices I have no idea what to do except start over although synced FIDO metadata could (maybe) make the enrollment and KYC somewhat simpler. |
@cyberphone There is a technology preview by Apple which uses a secret/private key synchronization mechanism to synchronize PublicKeyCredentials (including private key) across devices. A single registered credential could be used on any Apple device. AFAIK this has never been forbidden by WebAuthn, Apple is just the first large-scale authenticator to indicate intent to implement this sort of behavior. It does surface questions around what should happen when the RP security posture does not accept such behavior. |
A method described in Apple’s Platform Security guide, to great extent. https://support.apple.com/guide/security/secure-keychain-syncing-sec0a319b35f/1/web/1 |
@rmondello my understanding is that there is a caveat however: the supported API for keychain (e.g kSecAttrSynchronizable) and the Apple Platform Security guide have not yet been updated to reflect the addition of these synchronized asymmetric keys. |
For native application, especially for Apple ecosystem, there is an option for RPs to indicate whether allowing key backup (syncing) or not. As a RP side, it would be helpful to leverage platform level key syncing since it just works without introducing complex KYC scenario. We prefer to have an option for this. |
@Kieun This is fine but it will undoubtedly lead to a fractured FIDO ecosystem. Fixing it seems close to impossible. TPMs needed almost 20 years to get any (visible) use for consumers. Although politically and technically difficult, I would early on have considered some kind of portable "master secret". However, the window of opportunity have already passed. |
A WebAuthn parameter for RPs to signal whether syncing keys is permissible was previously discussed in #969. That was closed with the note:
Also noted there is that if syncing keys is not acceptable to an RP, then that RP must by necessity enforce attestation by allow-list anyway. So a parameter could at most optimize the user experience, but doesn't really introduce any new capability. |
Worth noting also that solutions like Apple's keychain syncing (mentioned above by @dwaite and @rmondello) are ultimately password based. So although such solutions can help prevent RPs from requiring users to create new passwords, it doesn't eliminate passwords altogether.
(emphasis my own) And further, in some sense it makes the root password (in this case an iCloud password) all the more vulnerable, since the attacker's prize for compromising it is all that much bigger. |
@certainlyNotHeisenberg I believe it is meant to be two-factor (possession and knowledge based) for circle membership, hence the unhighlighted part of the two signatures in this particular step. I'll let others more versed elaborate that point if they desire, such as if there is a device attestation to restrict circle membership. |
I have some idea that I'm playing with in my head to try and create a secure recovery flow in case of total loss of all authenticators, basically it relies upon asymmetric encryption signatures. Upon registration the clients browser creates a public private key pair, it shows the user the private key in the form of a seed phrase (same as crypto wallets) and tells the user to store it safely, after the user is confirming that he stored it, the public key is saved by the RP for a future recovery scenario, and the private key is deleted. When the user triggers the recovery flow, the RP will send a randomly generated message to the client, the client will be prompted to provide his seed phrase (private key) and the clients browser will use it to sign the message provided by the RP, then it will send the signed message to the RP where it will be verified by the public key associated with the account, if the signature is valid we can be certain that the correct and only private key was used. After that the user will get the ability to perform a new attestation and create a new credential, when he is done all the old credentials will be deleted, and he will be shown a new recovery seed phrase for future recovery scenarios. (making it a one time use recovery phrase) I find that this approach is a safe option since it is resistant to RP database breaches as acquiring the public key will not help the attacker, the private key is generated on the client side and doesn't leave it, so it is resistant to man in the middle attacks. The only security issues I can come up with this approach is that it is not resistant to phishing attacks/social engineering attacks + the user will need to store it safely otherwise it is open to theft attacks. I'm still trying to find a way to invalidate phishing/social engineering attacks with this approach. so far I didn't find a way. Looking forward for your feedbacks on this idea. |
You never indicated if in this model the seed phrase is bound to the client or not (i.e. can it be used from any machine/browser or only the one from which the original keypair was generated). If it is bound to the device, then what advantage does this offer over the current platform authenticator approach, and how does account recovery work on loss of device? If it is not bound to the client, then you have the same phishing and remote attack vector issues as with any shared secret approach. If you would like to understand why WebAuthn is considered phishing resistant today, I've written an article about it here. Either way I'm not convinced yet that this approach brings something new to the problem space, but happy to be proven wrong! |
I think that @MeydanOzeri's proposal could be made phishing resistant if combined with ideas from our recovery extension. What's currently missing is that the user's private key be tied to a particular origin, so that the browser can verify that the RP is authorized to exercise that private key. This of course leads to a new problem: the user doesn't want to perform the setup and store one private key for each individual RP, right? But this could also be solved using asynchronous remote key generation (ARKG). I think this could even work without any changes to RP code or the WebAuthn API, something like this:
I'll need to think a bit more on it, but the idea seems quite interesting:
I can't easily think of a way to preserve the "single-use" aspect of it, but that seems to me like a very minor problem compared with the advantages. Maybe a bigger problem is that so far, ARKG is intrinsically tied to elliptic curve cryptography and thus not quantum resistant. |
The issue here is that this process is wayyyyy too complex for most people to be able to manage. I couldn't imagine trying to communicate this to my brother who is a carpenter and have him successfully able to create this recovery material, let alone using it to retrieve a key. For example, "just export the recovery credentials" really glosses over a lot of complexity. Where will a user export it to? How will they preserve that? On a USB stick, which is a lossy medium? While this whole process is technically very cool, and interesting, I think that it's really overlooking the experience of an everyday user to achieve this reliably. Please when you come up with a process like this, step back and talk it through with non-technical folk and see if they can follow it. because that's your audience here. If I can't communicate this process to my brother, or my neighbours, then it won't work at scale. Thanks, |
Well, yeah, we're discussing possible technical solutions. Packaging for end users is important, yes, but premature at this point. But know that we do keep in mind that it needs to be possible in the end. For example:
For the smoothest user experience, the browser could just sync it along with the user's other preferences, if the browser has cloud sync features. Or it could be exported as a textual "key phrase" to print or write down on paper just like the private key in @MeydanOzeri's proposal. Or any number of other possibilities, as the keys in question don't need to be kept secret. |
If you leave user experience to the end, you'll potentially design a system that technically is excellent but you can't make usable. Why not design a usable system first and think about that, and then fix in how it will work technically? Or at least, consider both at the same time? User experience isn't an after thought, it needs to be at least equally considered here. |
I can speak from and perspective of 3 RPs, both commercial (including banking) and government. This is an important issue for workforce (not consumer) authentication — the places where hardware tokens have had market penetration.
Being able to require a single-device key that cannot be extracted from the device is a basic requirement. It is highly disappointing that FIDO2 platform implementations have been regressing from hardware-protected keys to cloud. On laptops this will drive continued use of separate hardware keys but on mobile this practice really undermines the ability to use FIDO2 for high-security applications. Worse yet, on iOS 16, if the user disables cloud backup of their keychain, iOS actually refuses to enroll a new passkey at all. That’s just crazy to me. |
From TPAC 2024: This issue was for awareness purpose and no longer required given the reality of passkeys today. Closing this. |
There are various user combinations and RP security needs which makes it tricky to have a unified solution as well as solve recoverability. Sometimes, goals become contradictory. Like RP has a legitimate need for hardware bound keys but that conflicts with user's need to be able to login to the RP when that device is lost. It becomes easier when there is one other device that user has, but to support full device loss scenario, it becomes really difficult.
All the RP scenarios can be solved by hardware bound keys from both platform or security keys.
User scenario 1 and 2, requires syncing which don't really match RP's needs for it's scenario 1 and 2. That is where the problem is. To address this conflict, a two key solution is proposed in #1546. Main idea behind that proposal is to have second key which is device bound and does not sync. So that when a user comes to a new device, a new device bound key is generated and RP will know that this assertion comes from a new device and then it can run it's risk analysis. This device key is per RP specific and is not shared among RPs. This is a compromise and may not work for every RP. Especially for highly sensitive RPs like banks, governments etc.
There are few important points to two key solution:
There is another problem with full device loss scenario. Platform specific recovery logic to recover an account in total device loss scenario scenario is mostly opaque for some good reasons. But in some cases it will fallback to the SMS and/or local device passwords/PINs. Which may be against the unphishability goal of webauthn and RP's requirements. But RP has no say in this in current proposals.
W.r.t security, I think there are various levels below in decreasing order.
In this whole flow, one question arises. Why not give RP the choice to select what security they want at registration time. The problem with that proposal is that worry that every RP will think that they need highest security and user will suffer when they lost their own device in recovery scenario. Hence there is a current desire to pick up a reasonable middle ground without RP's choice. But things can change if enough people swing one way or another.
For us(Microsoft) as an RP, we always wanted only hardware bound keys earlier. Now we are debating whether Option 2 and 3 can work or not. That alone with require a lot of explaining and persuasion in enterprise use case and things are not settled yet. Option 4 will not probably work for us.
I am interested in other RPs stance on this. Where do they stand and what are their real needs.
The text was updated successfully, but these errors were encountered: