-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Use DBus interface to unlock with hardware key (YubiKey) #8017
Description
Summary
Using the dbus interface, it is possible to unlock a database either using a passphrase only or a passphrase together with a key file. However I'm missing to be able to unlock my database, which is secured by a passphrase and a YubiKey.
Examples
Instead of calling org.keeepassxc.MainWindow.openDatabase(fileName=…, pw=…) either call org.keeepassxc.MainWindow.openDatabase(fileName=…, pw=…, hw=true) to use the first hardware key available (most of the time, only one should be connected for most of the people) or org.keeepassxc.MainWindow.openDatabase(fileName=…, pw=…, hw=<ID>) to select the hardware key by its id (shown by KeePassXC, e.g. YubiKey [<ID>] Challenge Response - Slot 2 - Press). If the concept if slots is applicable to other keys as well, it could be introduced as another parameter or by concatenating it to the id, e.g. <ID>:<SLOT>.
Context
I want to build a script which would be able to unlock my database nearly automatically by retrieving my database passphrase using my TPM or another secret service (I'm not sure yet how to make this in a secure enough way) when inserting my YubiKey, so I would just need to press the button on my YubiKey to open my database.