Commit 94ee46d
Switch to fido-authenticator from Nitrokey for virtual HID device (#143)
A few things happening here. Please excuse the mess of a commit-history.
Best to ignore it and squash 😅
- Removed solo-key and switched to fido-authenticator (for both ctap1
and ctap2)
- Removed top-level Cargo-workspace, as we only have one crate now
- Removed the basically unused `hid-device-tests` feature
- Adjusted github CI to also run the webauthn_hid example
Implementation details:
- The trussed-ecosystem is a bit of a mess, so very special versions are
required for this to work. So we have to patch crates.io in the
Cargo.toml file. This is based on the way fido-authenticator is using it
in it's testsuite.
- Introduced a new `VirtHidDevice` that is only a stub without the
feature flag to avoid the cfg-checks all over the place, and have them
bundled in one file, instead.
- `libwebauthn/src/transport/virt/pipe.rs` was copied from
fido-authenticator, which in turn copied it from trussed. I kept the
original pointer to trussed in the header.
- `libwebauthn/src/transport/virt/device.rs` was copied from
fido-authenticator and slightly modified (see below). Both files are
MIT, so including it with source-links should be fine, I think?
- Used certificate and key are copied from nitrokey-3-firmware (also
MIT). We could potentially look into generating them ourselves, instead.
Maybe even during compilation, to avoid inclusion of binary files in
git.
- fido-authenticator is using it with a RAM-storage implementation,
which is lightweight, but not suitable for our usage, as we want to run
our examples, that chain multiple commands and expect state to be kept.
Due to the code structure of trussed, RAM-storage would have been wiped
with each command, so I opted for a simple temporary filesystem storage
instead, which gets removed, when the virtual device is dropped.
Not yet done (probably something for future PRs):
- Make all examples work with the virtual device. Most of the examples
don't dynamically adjust their command usage (e.g. extensions) based on
the capability of the device, but do a battery of commands hardcoded.
Some of those fail due to lack of support in the virtual device.
- Create an extensive testsuite that runs a lot of variations to cover
as much of the feature set as possible.
---------
Co-authored-by: Alfie Fresta <afresta@noentropy.org>1 parent dd194a0 commit 94ee46d
File tree
26 files changed
+1802
-546
lines changed- .github/workflows
- libwebauthn
- examples
- src
- proto/ctap1
- tests
- transport
- hid
- virt
- data
- solo-virtual-key
- src
26 files changed
+1802
-546
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
This file was deleted.
0 commit comments