feat: encrypted vault export & import (CSV) - #89
Merged
DenizAltunkapan merged 1 commit intoJul 1, 2026
Conversation
Add POST /api/vault/export and POST /api/vault/import (issue Vault-Web#81). Export is encrypted by default under a separate export password; a plaintext CSV requires explicit confirmation. Import auto-detects the encrypted envelope vs. a plaintext CSV and maps common column headers from other managers (Bitwarden, KeePass), recreating categories by name. Passwords are stored through the existing vault encryption path. Closes Vault-Web#81
GabrielBBaldez
requested review from
DenizAltunkapan and
MaximilianRau04
as code owners
June 30, 2026 22:10
DenizAltunkapan
approved these changes
Jul 1, 2026
DenizAltunkapan
left a comment
Member
There was a problem hiding this comment.
@GabrielBBaldez very good work
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.
What
Adds vault export and import (#81):
POST /api/vault/exportandPOST /api/vault/import.Behaviour
name,username,password,url,notes,categorylayout, and import maps common headers from other managers (Bitwardenlogin_username/login_uri/folder, KeePassTitle/Group, …) so a vault can be brought in without hand-editing.Acceptance criteria
Notes
.kdbxis intentionally left for a follow-up — the issue lists CSV as an acceptable fallback, and a binary KeePass format is better handled separately.VWENC1:+ base64(iterations | salt | iv | ciphertext); a wrong export password is reported distinctly from a corrupt file.Tests
Unit tests cover the CSV round-trip (commas, quotes, embedded newlines), the password-based encrypt/decrypt (round-trip, wrong password, malformed envelope), and the full export → import round-trip including category creation and interop headers. The new request DTOs are added to the existing
toStringsecrecy test so the export/import passwords never leak into logs.Closes #81