-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vault export implementation. New crate `bitwarden-exporters` which defines it's own data structure, isolating it from the other code areas. It primarily focuses on converting a data model to csv and json. Currently all data has to be decrypted independently of what is required for the export which is an area of improvement for the future.
- Loading branch information
Showing
19 changed files
with
1,685 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[package] | ||
name = "bitwarden-exporters" | ||
version = "0.1.0" | ||
authors = ["Bitwarden Inc"] | ||
license-file = "LICENSE" | ||
repository = "https://github.com/bitwarden/sdk" | ||
homepage = "https://bitwarden.com" | ||
description = """ | ||
Internal crate for the bitwarden crate. Do not use. | ||
""" | ||
keywords = ["bitwarden"] | ||
edition = "2021" | ||
rust-version = "1.57" | ||
exclude = ["/resources"] | ||
|
||
[dependencies] | ||
chrono = { version = ">=0.4.26, <0.5", features = [ | ||
"clock", | ||
"serde", | ||
"std", | ||
], default-features = false } | ||
csv = "1.3.0" | ||
serde = { version = ">=1.0, <2.0", features = ["derive"] } | ||
serde_json = ">=1.0.96, <2.0" | ||
thiserror = ">=1.0.40, <2.0" | ||
uuid = { version = ">=1.3.3, <2.0", features = ["serde"] } |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Bitwarden Exporters | ||
|
||
This is an internal crate for the Bitwarden SDK do not depend on this directly and use the | ||
[`bitwarden`](https://crates.io/crates/bitwarden) crate instead. | ||
|
||
This crate does not follow semantic versioning and the public interface may change at any time. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
{ | ||
"encrypted": false, | ||
"folders": [ | ||
{ | ||
"id": "942e2984-1b9a-453b-b039-b107012713b9", | ||
"name": "Important" | ||
} | ||
], | ||
"items": [ | ||
{ | ||
"id": "25c8c414-b446-48e9-a1bd-b10700bbd740", | ||
"folderId": "942e2984-1b9a-453b-b039-b107012713b9", | ||
"organizationId": null, | ||
"collectionIds": null, | ||
"name": "Bitwarden", | ||
"notes": "My note", | ||
"type": 1, | ||
"login": { | ||
"username": "[email protected]", | ||
"password": "asdfasdfasdf", | ||
"uris": [ | ||
{ | ||
"uri": "https://vault.bitwarden.com", | ||
"match": null | ||
} | ||
], | ||
"totp": "ABC", | ||
"fido2Credentials": [] | ||
}, | ||
"favorite": true, | ||
"reprompt": 0, | ||
"fields": [ | ||
{ | ||
"name": "Text", | ||
"value": "A", | ||
"type": 0, | ||
"linkedId": null | ||
}, | ||
{ | ||
"name": "Hidden", | ||
"value": "B", | ||
"type": 1, | ||
"linkedId": null | ||
}, | ||
{ | ||
"name": "Boolean (true)", | ||
"value": "true", | ||
"type": 2, | ||
"linkedId": null | ||
}, | ||
{ | ||
"name": "Boolean (false)", | ||
"value": "false", | ||
"type": 2, | ||
"linkedId": null | ||
}, | ||
{ | ||
"name": "Linked", | ||
"value": null, | ||
"type": 3, | ||
"linkedId": 101 | ||
} | ||
], | ||
"passwordHistory": null, | ||
"revisionDate": "2024-01-30T14:09:33.753Z", | ||
"creationDate": "2024-01-30T11:23:54.416Z", | ||
"deletedDate": null | ||
}, | ||
{ | ||
"id": "23f0f877-42b1-4820-a850-b10700bc41eb", | ||
"folderId": null, | ||
"organizationId": null, | ||
"collectionIds": null, | ||
"name": "My secure note", | ||
"notes": "Very secure!", | ||
"type": 2, | ||
"secureNote": { | ||
"type": 0 | ||
}, | ||
"favorite": false, | ||
"reprompt": 0, | ||
"passwordHistory": null, | ||
"revisionDate": "2024-01-30T11:25:25.466Z", | ||
"creationDate": "2024-01-30T11:25:25.466Z", | ||
"deletedDate": null | ||
}, | ||
{ | ||
"id": "3ed8de45-48ee-4e26-a2dc-b10701276c53", | ||
"folderId": null, | ||
"organizationId": null, | ||
"collectionIds": null, | ||
"name": "My card", | ||
"notes": null, | ||
"type": 3, | ||
"card": { | ||
"cardholderName": "John Doe", | ||
"expMonth": "1", | ||
"expYear": "2032", | ||
"code": "123", | ||
"brand": "Visa", | ||
"number": "4111111111111111" | ||
}, | ||
"favorite": false, | ||
"reprompt": 0, | ||
"passwordHistory": null, | ||
"revisionDate": "2024-01-30T17:55:36.150Z", | ||
"creationDate": "2024-01-30T17:55:36.150Z", | ||
"deletedDate": null | ||
}, | ||
{ | ||
"id": "41cc3bc1-c3d9-4637-876c-b10701273712", | ||
"folderId": "942e2984-1b9a-453b-b039-b107012713b9", | ||
"organizationId": null, | ||
"collectionIds": null, | ||
"name": "My identity", | ||
"notes": null, | ||
"type": 4, | ||
"identity": { | ||
"title": "Mr", | ||
"firstName": "John", | ||
"middleName": null, | ||
"lastName": "Doe", | ||
"address1": null, | ||
"address2": null, | ||
"address3": null, | ||
"city": null, | ||
"state": null, | ||
"postalCode": null, | ||
"country": null, | ||
"company": "Bitwarden", | ||
"email": null, | ||
"phone": null, | ||
"ssn": null, | ||
"username": "JDoe", | ||
"passportNumber": null, | ||
"licenseNumber": null | ||
}, | ||
"favorite": false, | ||
"reprompt": 0, | ||
"passwordHistory": null, | ||
"revisionDate": "2024-01-30T17:54:50.706Z", | ||
"creationDate": "2024-01-30T17:54:50.706Z", | ||
"deletedDate": null | ||
} | ||
] | ||
} |
Oops, something went wrong.