-
Notifications
You must be signed in to change notification settings - Fork 54
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
sign browser key iff biometrics/os account passcode verified (mimic passkeys in the browser and build on its implementations in browsers/OS) #350
Comments
Nice idea. However, I am not sure user verification should be coupled with web crypto. future web biometrics API: existing web crypto api: |
Hey 👋 I might be missing something but can't you do something like what you want today by combining the WebAuthn and Web Crypto APIs? E.g. something like if (await navigator.credentials.get(...)) {
await crypto.subtle.sign(...);
} Also, from the perspective of the web app, wouldn't you want to verify the assertion from the token first, rather than trusting the OS/browser blindly? I'm not sure that the assertion is very valuable otherwise, as the client can always fake it. So indeed I also think it would be better to keep these APIs separate. |
Hi, thanks for responding. Webauthn works with a pass manager and it is actually quite complex, I want to stay on browser level without any pass manager complexity and still have the extra access to biometrics / PIN to strengthen "browser key" signing which is possible today thanks to web crypto (I think Netflix pushed this and that is why we can stay signed in by Netflix in our browsers...) Now native apps and webauthn have access to os account verification of users, I would like to break this monopoly of webauthn for more alternatives and competition. I understand you, but I think you still consider the old webauthn, creating device bound keys. However, with the passkey "reality" of Apple-Google-Microsoft that hijacked webauthn, the main characteristic is that keys are created, stored and synced on pass manager level, which might be too much complexity for some use cases. That is why here, with my suggestion, I am aiming for real device bound (rather browser in the os account) private keys AND(!) getting the second factor of os account ownership proof (biometrics, PIN). Some discussion about passkey evolution: By webauthn, using navigator.credentials.get() the pass manager residing in the os account has the private key, the pass manager signs over the server challenge as authenticator (if and only if the human proves the ownership of the os account with biometrics or PIN or other os account unlock method). The problem simply put: a pass manager is added complexity and not even everyone is willing to, or mentally equipped using a pass manager. From the web app perspective, if I am not mistaken, this webauthn javascript call is the only (coupled) way to trigger os account verification and get information whether the real owner is using the device (more precisely os account). @prime2358: I think we could and should have a way to do os account verification uncoupled from anything else from a web app if native apps can, but it would be a very long way to start a distinct web standard for this, I believe, while extending web crypto with the actual use case of getting this verification information from the os would be the much faster and easier way to go. In addition, we could ride along with the current existing implementations(!) of webauthn in browsers and pass managers and even operating systems, making it easier "selling" this not that much work to browser implementors. What I suggested would be:
It is actually how webauthn started with "device" bound private keys, but there was no good answer to losing all devices and then "passkey" emerged from the ashes of former webauthn. The imagined authentication flow and use case would be:
I call this device based account and security and I believe we are going in this direction (see Apple, Google signed in devices overview in the security part of their accounts, very cool). I have plenty of problems with passkeys though and I would prefer a browser key - recovery key model. The problem with passkeys:
So browser keys equipped with acces to biometrics / PIN + some recovery keys is better. |
We definitely need alternative ways to access biometrics / PIN authentication success / failure (!) from the web. Webauthn is extremely overcomplicated and the passkey "reality" of webauthn feels like an Apple kind of "solution". It may work if we all lived in the Apple World and we all used Apple Pass Management (or Google World or Microsoft World). I agree that some independent biometrics api would be cool but who will start and manage the web standard, especially if Apple, Google and Microsoft are now all-in on webauthn? It may take years that they realize or admit that the passkey system is another flop... Is it even possible to push a whole web standard without the blessing of Apple / Google? Especially with implicit access to device biometrics? 99% of operating systems are that of Apple, Google, Microsoft, Safari, Chrome and Edge are AGM. So I vote for pushing for alternatives HERE, because the IDEA and LOGIC of device + biometrics / PIN authentication and using ECDSA or the like is really great and I believe it is the way to go. But not necessarily with the passkey & webauthn way of implementing this idea & logic. Competition is always good! Since creating and keeping private keys in the browser and utilize ECDSA for browser authentication was made possible by web crypto (many thanks for that!), it seems to me the right place to extend this with biometrics / PIN here. I already have the logic built into my system. Now, I would just need to call the new sign() function if I need a 2 factor authentication for more sensitive things. Very neat and smooth. Differentiating between stronger and weaker "device unlock" features is also crucial. I just upped my parents security (at least one of them did not resist the password manager) and demonstrated my father that it was 3 seconds for me to steal the "very complicated" figure he drew and if someone does this in a restaurant or elsewhere and then steal his phone, this someone can have access to: Google account, Google Password Manager, Gmail, SMS and can change: Google and all financial passwords without even knowing them, since all of them can be changed via email + sms. A strong device unlock is crucial nowadays. I would never use a weak one for sensitive things. A weak one is ok on client, offline, a strong one is definitely needed for server stuff. Adding biometrics check (or rather strong device unlock checks) to the signing process is actually a very neat way to provide an extremely simple alternative to webauthn: we could be sure that not just the device (browser) that has the private key signed over the challenge but the owner of the device. I already use private keys in the browser ("browser key") and I would be very happy if it was coupled with biometrics / PIN check! |
Thanks. Some synergy would be great, how exactly this "device unlock" access should be achieved here. What I wrote was a first thought and I would be happy if in the coming weeks other people would "vet" it. I have a lot of work right now, but I thought I write a quick reply: if we want to push this, it would be really great to get some deeper or more technical considerations / insights from others, not just "it would be great" in web crypto or it would be great independently in some other magic web standard :) Of course I appreciate support, but realistically we have a very long way to go, and a crucial step is to get some concrete design on the table :) |
On second thought, it would still be best to create an independent biometrics check: We could use it for encryption / decryption or anything else. |
Hey 👋 I just want to respond to one small part here:
and
Different Web APIs aren't (and shouldn't be) in competition with each other. They are all shipped together within a single product, so it doesn't make sense for them to be. If you feel that WebAuthn is insufficient for some use case, you should contribute to the spec there. If you think it's too difficult to use, you could also propose or create a library to make it easier to use. But starting over with a new built-in API for very similar functionality, under the WebCrypto umbrella, is not the right way to go as it will make the web platform as a whole more complicated, not less. |
Web crypto is browser level crypto. In case of authentication, to stay on browser level, we have to use web crypto with unextractable private keys in indexed db. In this sense now I have to choose between: browser level without biometrics access or pass manager level with biometrics access. A native app can opt out of a pass manager and use biometrics for its purposes, not a web app. In addition, we could use biometrics to support other web crypto functions too, like I proposed here: #352 I do not want another web api to compete with webauthn: strong authentication via ECDSA like cryptography where keys are stored, managed, synced in third party pass managers. I understand twiss but also r-jo. Stay on browser level, but utilize biometrics checks for signing or encryption / decryption. If a native financial app checks biometrics and shows some local data or contacts the server and overwrites some data on server, why is it more secure than when a known browser is called to perform a biometrics check in a secure session? Trusted native apps (browser is a native app) performing os level biometric calls. |
competition is always good but of course I understand what you mean with single product webauthn is not difficult, it is only needlessly complicated, I already implemented it (did you? try... an experience...)
nothing to contribute there, like you told me contribute to the pyramids or rather the jungle... it is done, it is what it is I do not want to start over, I wanted a competing authentication solution where those who make the actual real work (implementations) have practically nothing to do however, I wanted an extension of a web crypto use case (ECDSA like private key stored in indexed db to authenticate browser) with similar biometric access like webauthn (if there was made possible, why not here) plenty of people implemented this since netflix pushed this API, we have an authentication logic that utilizes browser stored private keys... with a simple extra function we could write some if-else logic and an extra word and have an extra 2nd step of biometrics the competing ideas would be using webcrypto extended with biometrics OR passkeys with the extra complexity of private key management on platform/pass manager whatever, tracking syncing or not syncing and 3-4 platform implementations, managing users who store passkeys on 4 platforms... in addition, everybody has a recovery logic like passwords so you have a web crypto implementation and a password like implementation and you are supposed to add passkeys and maintain this complexity without getting rid of passwords and other complexity, why? only because this is the only way to access biometrics from a web app and the idea of device posession + biometrics with ecdsa crypto is really cool we could achieve this same cool factor just extanding web crypto signing with biometrics I read #352 But I am really sure that either like proposed at 352 or coupling signing / decryption functions with biometrics (just like webauthn get() couples) would be a very nice and neat way of utilizing the modern biometrics capabilities that will be present in nearly 100% of devices in 5-10 years. What do we want to do with biometrics? I do not want to force people with traditional passwords without pass manager to type their passwords each and every time so that their kid could not take a look or whatever. I can now only utilize biometrics from the web via webauthn call, passkeys and pass managers. In this case we can reach webauthn level security with proposed function, utilizing biometric re-authentication from the browser coupled with web crypto proof of private key possession. Actually that was not even my use case and here we could just use an unextracable decryption key. So indeed, it is not webauthn, webauthn cannot be used for this (not even for signing since on deeper level than browser), it is a web crypto extension and although I understan the cooperative way of designing one thing right, the problem is we will know which one was more right only afterwards, moreover, each may have its use case. Like there is passwords, federated, passkeys in the credential api, still nobody uses them for browser level stuff, we use web crypto for browser level stuff and web crypto does not have biometrics access :( |
Rather than trying to add WebAuthn-related things to WebCrypto, or adding WebCrypto-related things to WebAuthn, I would encourage you to think about what could be a way that the APIs can be used together in a way that achieves what you want. Or, if it's not possible today, what could be the minimal thing to add in order to make that possible. Adding duplicate functionality from WebAuthn into Web Crypto just because you don't like the WebAuthn API is really not the right path. Those things should be discussed in the WebAuthn Working Group instead, as I wrote in #352 (comment). |
Can you elaborate on why is anybody trying to add "WebAuthn-related things" and where is "duplicate functionality"? You state these things but they are simply not true in my opinion. It is only in your head which does not make it true. The browser is not an authenticator, a pass manager is an authenticator or a security key. What we want here is to use the browser without added complexity to store private keys. It is NOT possible via webauthn and it will never be. But it is possible with web crypto, a main use case! Please read use cases, number one! Biometrics would be a second factor to existing web crypto(!) approach where we use the simplicity of a user agent to create, store and manage keys instead of "authenticators" that are pass managers. If you call webauthn create or get, you will get the complexity of a pass manager and security keys in real life. In your dreams it might be a place that offers the browser as an authenticator but you can forget it. It is 100% web crypto API extension if we want a 2nd factor to existing web crypto API functionality. If you do not want to work in the web standards group just push everything elsewhere then please quit. And dont say false arguments. "2. Use Cases 2.1. Multi-factor Authentication |
Hi,
Above mentioned transition of webauthn leaves space for web crypto to step up one little step with biometrics.
The original idea of webauthn with local private keys could be easily mimiced with a little web crypto extension.
It could be as simple as one simple function which could reuse the browser / os implementations from passkeys:
signIfUserVerified(algorithm, privateKey, dynamicChallenge, osVerificationOption)
where
I am not sure what webauthn implementations do, it could be possible for the sake of simplicity that we do not define any verification options at all. I found these links for apple, google, microsoft and it seems to be eclectic. Browsers as native apps may try to differentiate according to platforms. Like a weak face unlock is not strong but fingerprints, passcodes are... the implementations may change in the future, there may remain only strong ways... I would think for server side challenges we could use STRONG, for client side challenges ANY.
https://developer.apple.com/documentation/localauthentication/lapolicy/deviceownerauthentication
https://source.android.com/docs/security/features/biometric
https://learn.microsoft.com/en-us/windows/win32/api/winbio/nf-winbio-winbioverify
The browser would sign over the challenge with private key if and only if the os account owner verifies its identity with biometrics or by any means (passcode). If it is a privacy issue, if for any reasons the identification failed (not possible, no biometrics, failed identification) it could just return null. No device capability sniffing.
Biometrics or device passcode verification by the OS would add a second factor to existing crypto key usage.
With server side storage of the public key and server side generation of the random challange it would be pretty secure.
As an extra, storing the public key on the client there could be implemented a client side biometrick lock of sensitive data/features.
It could be used in offline web apps (pwa) too.
As an example lets say Netflix that already utilizes crypto keys and you are always logged in, builds a pwa. It may download some films for offline usage and you can watch them in a train with bad wifi. It would be neat if netflix could require you to identify fast with your touch or face if you do sensitive things like removing devices, logging out or take a look at user data. For things that the server has to grant authorization, one can use a server generated challenge and verification combined with biometrics. For things like seeing offline data that might be sensitive a client side challenge would do the job (I mean the use case here is that someone that does not want to steal your device cannot see or do funny stuff easily, not hyper-hacker-cracker-security).
It would require from browser/OS a very little part of what webauthn already does and nothing more than what web crypto already does.
The text was updated successfully, but these errors were encountered: