Coder Social home page Coder Social logo

WebUSB compatible? about opensk HOT 4 CLOSED

trustkeysolutions avatar trustkeysolutions commented on July 28, 2024
WebUSB compatible?

from opensk.

Comments (4)

jmichelp avatar jmichelp commented on July 28, 2024

The FIDO HID page is locked down by operating systems for security reasons. The fact that you can't connect to a security key using WebUSB is working as intended.

from opensk.

kaczmarczyck avatar kaczmarczyck commented on July 28, 2024

What do you intend to achieve through WebUSB? We have a --vendor-hid flag on develop for this purpose, and it allows you to run non-FIDO commands through WebUSB.

from opensk.

trustkeysolutions avatar trustkeysolutions commented on July 28, 2024

My goal for utilizing WebUSB is to facilitate seamless communication between a web application and the user's FIDO device. By leveraging WebUSB, I was trying to see if we can improve user experience with a more straightforward device setup and management process via the browser instead of a desktop app.

Thanks for the info on --vendor-hid flag. This flag indeed allows running non-FIDO commands through WebUSB, which could be useful for our application. However, my current focus is primarily on implementing FIDO-related functionality, but sounds like this is a dead-end.

That said, we will keep the --vendor-hid flag in mind for future development stages, especially when expanding our application to support non-FIDO features or when working with vendor-specific commands. Thanks, again.

from opensk.

kaczmarczyck avatar kaczmarczyck commented on July 28, 2024

Warning to all future users that come here: The following advice is dangerous if done wrong, please read to the end.

If you don't mind patching the OpenSK logic (and use the develop branch that is currently worked on), it's not hard to allow FIDO commands over vendor HID. The switch that is responsible is here:

Channel::MainHid(_) => self.process_fido_command(env, command, channel),

Remove the match over channel, always call process_fido_command and OpenSK allows FIDO calls over WebUSB.

There is a reason why we don't allow this, though: Anyone with WebUSB access can then freely send CTAP requests to your device. That includes silent authentication, which means any website could impersonate the user cross origin. I strongly suggest you don't do that, but instead have an authenticated vendor command. FIDO's security model relies on the browser being trustworthy, and therefore opening a hole to circumvent the browser is a bad idea.

Doing some management over the vendor HID channel should be fine though. For example, we send signed upgrades through that channel. The signature guarantees that we can't be impersonated.

from opensk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.