Repository navigation
Conversation
`deadbolt import` detects a database by its KDBX signature and sends the daemon its path with the database's own passphrase (DEADBOLT_KDBX_PASSPHRASE, or asked on a terminal), plus --key-file when it needs one. keepass-rs opens KDBX 3.1 (what Passbolt exports) and 4.x; the importer maps an entry to a login, a group to a tag, TimeOtp-* fields to an otp field, other custom fields to extra ones, counts and leaves out attachments, and skips the recycle bin. The daemon opens the file, the way it receives every other export's text, and the mapping runs beside theirs. The daemon protocol goes to 39 for the new command.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
deadbolt import database.kdbx(Passbolt's export included).The CLI detects the KDBX signature and sends
Command::ImportKeepasswith thefile's path, the database's own passphrase (
DEADBOLT_KDBX_PASSPHRASE, orasked on a terminal) and
--key-filewhen it needs one. The daemon opens thefile with keepass-rs and maps it beside the other exports:
Work/AWS), the root groupis the database's name and is not a tag
TimeOtp-Secret-Base32withTimeOtp-Algorithm/-Length/-Periodbecomesthe
otpfield as anotpauth://URI (KeePassXC'sotpfield is used as itis); a value deadbolt cannot read is kept as an extra field, counted
DAEMON_PROTOCOL_VERSIONgoes to 39Why the daemon opens the file: the other imports send text because their
containers are a zip, JSON or CSV. A
.kdbxis a typed database, and thepassphrase already crosses the socket for
unlock. Opening it in the daemonkeeps the mapping where every other export's mapping lives, and keeps binary
out of the wire.
Tested against a real Passbolt export (KDBX 3.1, AES-KDF, 329 entries, 31 TOTP):
The 8 are duplicates by the vault's existing
keyrule (a login's URL host,name, username and password), not by the mapper.
cargo test -p deadbolt-cli import::keepass(7 tests), clippy with-D warningson cli/proto/engine, andscripts/file-size.share clean.Blocked on sseemayer/keepass-rs#406. keepass 0.18.5 panics on an empty
<ExpiryTime>, which Passbolt writes on every entry that never expires:#406 reads it as the epoch baseline. This is a draft until 0.18.6 is out: then
the dependency (
keepass = "0.18.5") needs no change at all. I ran the wholeflow above with that fix applied.