fido-alliance / how-to-fido

How To FIDO
https://fido-alliance.github.io/how-to-fido/HowToFIDO.html
52 stars 10 forks source link

Ideal Recommendations #7

Open akshayku opened 4 years ago

akshayku commented 4 years ago

Different platforms are at different stages of implementing the webauthn and CTAP specs.

There have been issues and solutions suggested for non-resident keys behavior on Windows. Resident keys and ClientPIN is not supported on Android. Etc etc.

However, instead of trying to fit in deployments due to current limitations, we should prepare this document for a long term webauthn standard on how to adopt FIDO for years to come.

There may be more, we need to have the discussion around it.

christiaanbrand commented 4 years ago

Creating resident keys during create() call for platform authenticators

Agreed with this.

Whether or not, exclude list should be provided during create() call

Yes, we should think about this. Probably makes sense to have this as you suggest.

Whether RPs should depend on local storage to remember credentialIDs.

I don't know about this. This is the exact way that RPs are used to doing things in native apps (where biometrics are strictly used for reauth). If a credential is only for reauth, I think it makes sense to use local storage to know whether it's there (it creates the cleanest experience). Yes, if the user is in "another browser" they'll need to "opt in again" (and ideally the credential shouldn't get overwritten as sbweeden and I have discussed before), but this seems like an edge case. Having a user select from a list of accounts during re-auth sounds like subpar UX.

balfanz commented 4 years ago

Hi @akshayku - a couple of thoughts:

sbweeden commented 4 years ago

The problem with using the excludeCredentials list during UVPA registration is that the user agent cannot locally detect ahead of time whether or not the platform authenticator already has a credential for this userid/rpid combination (such as one created by another user agent on the same platform). If a credential already exists, the user experience is poor (an error). To deliver a great user experience you are therefore forced to not use the excludeCredentials list.

After that an RP then has to deal with the subsequent nuances of different platform authenticator behaviour that happens when setting rk=false during credential creation. Currently Microsoft (and more recently Apple) have one set of behaviours, and Google (Chrome on Mac and Android) have a different set of behaviours. These differences break the consistency of the pattern.

akshayku commented 4 years ago

Hi @balfanz

I would like this doc to be an easy-to-use "recipe book" that can be used against current implementations. That's one of the reasons the use case that needs Level 2 features is pushed into an Appendix for now. If and when Level 2 is prevalent, and support for resident keys is everywhere, etc., then we can amend the doc.

Resident keys is in Level 1 and not a Level 2 thing. I was expecting that we are developing the document with future in mind and how things will play once we have compatibility in terms of implementation so that RP only have to follow one guide.

If we want this document to be used against current implementations, there cannot be a single recommendation as no single recommendation fully works across all the platforms.

I am OK splitting the document into platform specific recommendations we you are thinking very short term.

In terms of proposing changes to the doc, like using the exclude-list, using local storage, etc., I would like us to use this framework:

I am OK proposing the changes. On Windows, I don't want to recommend non-resident keys behavior as moving them in the future to usernameless flows is not easy. Problem is asking RPs to redevelop the solution in say 6 months when you support resident keys. Many RPs are not that fast.

As noted above, my version of single recommendation will not work on Android and I don't see a way around that problem apart from platform specific recommendations.

I am OK making the PRs with the changes. Let me know.

christiaanbrand commented 4 years ago

Akshay, can you help by spelling out the user journey for RPs who want to use platform based resident credentials on Windows today? Since the credentials will only remain "on device" I'm not sure there's much value beyond the re-authentication use case right now. Once you're logged in and create the credentials, the RP doesn't need FIDO to do usernameless. The user is already logged in. They can just store the username in a cookie. Google accounts work this way today. Once you "sign out" you still see a list of all your previously signed in accounts and can sign back in instantly, without needing to enter a username. None of this needs FIDO, right? And it works on all platforms.

akshayku commented 4 years ago

My vision is to have cross-browser usernameless, passwordless logins. Reauth as well as bootstrapping using platform credentials.

Here is the flow for first time login on browser 1

Subsequent Logins on different browser

Challenges vs benefits

christiaanbrand commented 4 years ago

So, if I understand correctly, you're addressing two shortcomings of the current proposal (which boils down to the same technical issue: no cookie present).

What you're proposing makes sense, but I still have a hard time recommending this as a solution as the user will inevitably move to another machine at some point, and they won't be able to log in there at all (unless they had a backup mechanism to get into their account, which they could have used also in the case where the cookies weren't present).

Therefore, unless the user also has a security key (with resident credentials) or another form of x-platform credential (maybe using PaaSK/caBLE) I don't think we should be recommending this use case today as RPs are likely to just completely shoot themselves in the foot.

Does this make sense?

akshayku commented 4 years ago

Yes. Kind of.

The problem is once we create a platform credential as non-resident/non-discoverable, we cannot change that at later stage when we want to have a usernameless flows.

RPs will eventually want to go for usernameless passwordless scenarios for external security keys. More so for using phone as external authenticator via caBLE. So if I want to use phone for usernameless cross platform scenarios eventually, you should think about creating those credentials as discoverable.

sbweeden commented 4 years ago

So, if I understand correctly, you're addressing two shortcomings of the current proposal (which boils down to the same technical issue: no cookie present).

  • The first one is a user that wants to move between browsers (I think this is more of an edge case, but okay).

Hey @christiaanbrand what about the use case of a browser based app and a native mobile app from the same RP on the same device that want to share a single credential registration. Do you think that is also an edge case?

christiaanbrand commented 4 years ago

Good point. I'm happy to say that RPs should probably create platform keys as "discoverable" for forward-compatibility (even though it won't make much of a difference today). Will someone kick off a PR for that?

Kieun commented 4 years ago

@sbweeden As far as remember, Android has been supporting sharing credentials between the web app and native app (which is associated to the same rpId) by leveraging the digital asset link. My thoughts about usernameless (without any ambient credential) flow is still the same. It's better for us to provide authentication flow without any user identification first from usability perspective.

maxhata commented 4 years ago

Concerning the use case of same device/different clients , I am wondering how such a use case like the following be handled based on the reauthentication-cookie model.

Use Case:

A user has bootstrapped login for RP1 and RP2 on a browser based on the reauthentication model using the UVPA on the device (thereby cookies are stored in the browser). The user has logged in to RP1 first using FIDO and by clicking a button in the RP1's site, the user is directed to the RP2 application on the same device that runs a web component of the browser (e.g., Chrome --> Android System WebView). The user needs to login to RP2 from the application.

Question:

I am wondering how the reauthentication model works for such a web component from the application.

Will the cookies stored in Chrome be shared with Android System WebView so that the reauthentication model will work for FIDO ? Or will the user need to use an already-registered-to-RP2 security key to bootstrap signing in for the application? Or, will the the digital asset link solve the problem?

At any rate, this is one of the main use cases for mobile service deployments and many RPs want to know how to do it.

Kieun commented 4 years ago

One thing I want to mention about platform authenticator is that the credentials should be discoverable to all browsers (webview or others) supporting Webauthn on the same machine. Thus, such credential can be used from cross-browsers or cross-browser modes whether the credential is discoverable or not. Some platforms are supporting this and some are not.

If FIDO community's ultimate goal is to go username-less flow and platforms eventually support PaaK, we should create resident key for platform authenticator from now. If not, RP will suffer hard time to provide great UX for the transition. And this will solve such edge cases like cross-browsers or cross-browser modes.