1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

encrypted json export option for user and orgs (#726)

* encrypted json export option for user and orgs

* move org id to base export component
This commit is contained in:
Kyle Spearrin 2020-12-04 09:58:26 -05:00 committed by GitHub
parent 5e95a8565c
commit 512b9e0a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 4 deletions

2
jslib

@ -1 +1 @@
Subproject commit abb54f007305eabd77996623dd20cbe45345e82a
Subproject commit 93a3053f54bb654e689962543a07573b4c090515

View File

@ -16,8 +16,6 @@ import { EventType } from 'jslib/enums/eventType';
templateUrl: '../../tools/export.component.html',
})
export class ExportComponent extends BaseExportComponent {
organizationId: string;
constructor(cryptoService: CryptoService, i18nService: I18nService,
platformUtilsService: PlatformUtilsService, exportService: ExportService,
eventService: EventService, private route: ActivatedRoute) {

View File

@ -69,6 +69,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
const result = await this.platformUtilsService.showDialog(
this.i18nService.t('updateEncryptionKeyWarning') + ' ' +
this.i18nService.t('updateEncryptionKeyExportWarning') + ' ' +
this.i18nService.t('rotateEncKeyConfirmation'), this.i18nService.t('rotateEncKeyTitle'),
this.i18nService.t('yes'), this.i18nService.t('no'), 'warning');
if (!result) {

View File

@ -3,13 +3,16 @@
<h1>{{'exportVault' | i18n}}</h1>
</div>
<p>{{'exportMasterPassword' | i18n}}</p>
<app-callout type="warning">{{'exportWarningDesc' | i18n}}</app-callout>
<app-callout type="warning" *ngIf="!encryptedFormat">{{'exportWarningDesc' | i18n}}</app-callout>
<app-callout type="warning" *ngIf="encryptedFormat && !organizationId">{{'encExportWarningDesc' | i18n}}
</app-callout>
<div class="row">
<div class="form-group col-6">
<label for="format">{{'fileFormat' | i18n}}</label>
<select class="form-control" id="format" name="Format" [(ngModel)]="format">
<option value="json">.json</option>
<option value="csv">.csv</option>
<option value="encrypted_json">.json (Encrypted)</option>
</select>
</div>
</div>

View File

@ -13,6 +13,8 @@ import { ExportComponent as BaseExportComponent } from 'jslib/angular/components
templateUrl: 'export.component.html',
})
export class ExportComponent extends BaseExportComponent {
organizationId: string;
constructor(cryptoService: CryptoService, i18nService: I18nService,
platformUtilsService: PlatformUtilsService, exportService: ExportService,
eventService: EventService) {

View File

@ -793,6 +793,9 @@
"exportWarningDesc": {
"message": "This export contains your vault data in an unencrypted format. You should not store or send the exported file over unsecure channels (such as email). Delete it immediately after you are done using it."
},
"encExportWarningDesc": {
"message": "This export encrypts your data using your account's encryption key. If you ever rotate your account's encryption key you should export again since you will not be able to decrypt this export file."
},
"exportMasterPassword": {
"message": "Enter your master password to export your vault data."
},
@ -2786,6 +2789,9 @@
"updateEncryptionKeyWarning": {
"message": "After updating your encryption key, you are required to log out and back in to all Bitwarden applications that you are currently using (such as the mobile app or browser extensions). Failure to log out and back in (which downloads your new encryption key) may result in data corruption. We will attempt to log you out automatically, however, it may be delayed."
},
"updateEncryptionKeyExportWarning": {
"message": "Any encrypted exports that you have saved will also become invalid."
},
"subscription": {
"message": "Subscription"
},