• Adam Langley's avatar
    webauthn: add support for caBLE over USB. · 02daf76f
    Adam Langley authored
    This change adds desktop-side, disabled-by-default, preliminary support
    for communicating with phones over USB so that they can act as a
    security key. This requires phone-side changes too that are forthcoming.
    
    Android supports an “accessory” mode[1] that allows USB communication with
    apps on the phone. This involves sending vendor commands to the device
    to request that it switch into this mode and then watching the USB bus
    for the device to reappear in the new configuration. Once that's
    complete, data can be exchanged.
    
    There's no good way, however, of knowing which USB devices are phones.
    And it seems unwise to blast vendor commands at every attached USB
    device each time we start a WebAuthn transaction. Therefore this is only
    attempted for devices that are connected during the transaction. We do,
    however, remember which accessory devices we previously configured and
    can use them immediately if still connected.
    
    In the future, the UI could plausibly allow the user to select the
    device from a list rather than connect it. Although I'm unsure whether
    that's actually useful.
    
    [1] https://source.android.com/devices/accessories/aoa
    
    BUG=1002262
    
    Change-Id: Ia58632d89c83a60559b59146d69bd2638a597f59
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2310193
    Commit-Queue: Adam Langley <agl@chromium.org>
    Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
    Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
    Cr-Commit-Position: refs/heads/master@{#795034}
    02daf76f
android_accessory_discovery.h 4.54 KB