danstiner / rust-u2f

U2F security token emulator written in Rust
Apache License 2.0
288 stars 43 forks source link

Compatibility with openconnect #75

Closed jpd527 closed 2 years ago

jpd527 commented 2 years ago

This might be too niche, but would it be possible to use this for establishing VPN connections requiring U2F? Currently on Ubuntu 20.04 LTS using openconnect. Alternatively, would it be possible to have a CLI command to generate a OTP? (Or does this already exist and I missed it?) Thanks

danstiner commented 2 years ago

I believe openconnect and other VPNs use TOTP/HOTP (https://www.infradead.org/openconnect/token.html), so this tool will not help as it only emulates a USB U2F device.

For TOTP/HOTP you should probably be using a separate device to generate the OTP codes, either a hardware key like a Yubikey or an app like Lastpass/1Password on your phone. The best way to do this depends on your threat model and sorry but I don't think it makes sense as a feature of this tool, not without substantial work to save secrets somewhere more secure than your accounts keychain.