-
Notifications
You must be signed in to change notification settings - Fork 296
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
Implementing OpenSK-based FIDO2 emulator for QEMU #485
Comments
May I ask if you have a specific goal in mind? Is QEMU the purpose like in #288, or do you want a desktop OpenSK? Let me elaborate a bit on our current work in progress. We noticed that OpenSK is more testable and more broadly usable if its logic was separate from the platform it runs on. With that in mind, we started splitting everything TockOS-related into Once that is finished, you will be able to support a new platform by adding a new Since you were asking for "beyond prototype", I assume you mean that you want to create a PR that we would eventually merge. Cleanest and easiest would be for us to first finish the CTAP library, and then merging your new |
QEMU, mostly. I've experimented with running desktop version of OpenSK (on Linux, using /dev/uhid), but I don't see the point, security-wise, of running authenticator on the same host system with user agent. Maybe only for testing/development? [...]
Great! I've implemented storage which stores its contents in host-OS-based file: https://github.com/egor-duda/OpenSK/tree/hostenv-file-storage [...]
Absolutely, thanks for detailed response! |
Testing is definitely a plus. One real world example (that doesn't necessairly require file storage) of desktop security key implementations might be Chrome's WebAuthn debugger.
The maintenance question still applies. Changing the storage API would be a bit harder. But I agree this is something we will find useful eventually. Maybe @ia0 wants to jump in here wrt storage? |
Regarding storage, the proposed implementation is a valid idea (adding a file-based |
I'm not sure if it's possible to make pure file-based storage without memory buffer using current API?
|
I see. That's actually a good reason to change the API then. I was considering it for other reasons (in particular make it compatible with |
Although for test/debug purposes I don't see objections to a storage serialized on drive, for a "normal" usage, I'd prefer to see the file at least encrypted and if possible using a key derived from hardware unique IDs for security reasons. Otherwise the storage end up being nothing more than a cookie jar that could be stolen by a malware while the promise of FIDO is to resist a remote attacker. |
The idea is to have file-backed storage residing on the host OS, on which QEMU is running, whereas user agent runs on the guest, accessing authenticator via virtual QEMU device. Presumably, malware shouldn't be able to escape from guest VM and access any data on host OS. If malware somehow succeeds in reaching host OS, then I don't think file encryption would be of much help. If malware gets non-root access to host OS, then normal OS permission protection should be enough. If malware escapes from guest and gets root-level access to host OS, then it would be able to get decrypted storage from memory of running authenticator application. |
Some thoughts on transports in FIDO. Generally, the WebAuthn transport we would use is this internal. However, CTAP only mentions HID, NFC and BLE. Since WebAuthn allows it, I believe we should be okay to use it regardless. The intention I read into the specification is: If you don't use special hardware, implement it any way you like. If you want the security key to look like a HID (or other) device, we might have to approach that differently. The question is at what level you want to exchange data. |
Closing this as a duplicate of #288 . |
I've made a quick-and-dirty prototype of virtual FIDO2 authenticator for QEMU using OpenSK application. The purpose is similar to #288, but instead of creating a CTAP library and linking it into QEMU, I've patched QEMU to add a fido2 device, which uses socket-connected chardev. Then I've modified main OpenSK application to listen on a unix socket and, after connection from QEMU, to process all CTAP requests/responses via that socket connection.
To go beyond prototype, I suppose I have to:
Obviously, all this new NonEmbeddedEnv stuff should not be compiled in when building token-targeted version of an application.
Is this a viable plan?
The text was updated successfully, but these errors were encountered: