1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-21 11:35:34 +01:00
bitwarden-browser/libs
Jake Fink a62f8cd652
[PM-3797] Client changes to use new key rotation process (#6881)
## Type of change

<!-- (mark with an `X`) -->

```
- [ ] Bug fix
- [ ] New feature development
- [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other
```

## Objective

<!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding-->
Final Client changes for Key Rotation Improvements. 

- Introduces a new `KeyRotationService` that is responsible for owning rotation process.
- Moves `Send` re-encryption to the `SendService` (`KeyRotationService` shouldn't have knowledge about how domains are encrypted).
- Moves `EmergencyAccess` re-encryption to the `EmergencyAccessService`.
- Renames `AccountRecoveryService` to `OrganizationUserResetPasswordService` after feedback from Admin Console


## Code changes

<!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes-->
<!--Also refer to any related changes or PRs in other repositories-->

Auth
- **emergency-access-update.request.ts:** New request model for domain updates that includes Id
- **emergency-access.service.ts:** Moved `EmergencyAccess` re-encryption to the `EmergencyAccessService`. Add deprecated method for legacy key rotations if feature flag is off
- **key-rotation.service/api/spec/module:** New key rotation service for owning the rotation process. Added api service, module, and spec file.
- **update-key.request.ts:** Moved to Auth ownership. Also added new properties for including other domains.
- **migrate-legacy-encryption.component.ts:** Use new key rotation service instead of old component specific service. Delete old service.
- **change-password.component.ts:** Use new key rotation service.
- **settings.module.ts:** Import key rotation module.

Admin Console
- **organization-user-reset-password.service.ts/spec:** Responsible for re-encryption of reset password keys during key rotation. Added tests.
- **organization-user-reset-password-enrollment.request.ts:** New request model for key rotations
- **reset-password.component.ts:** Update `AccountRecoveryService` to `OrganizationUserResetPasswordService`
- **enroll-master-password-reset.component.ts:** Update `AccountRecoveryService` to `OrganizationUserResetPasswordService`

Tools
- **send.service/spec.ts:** Responsible only for re-encryption of sends during key rotation. Added tests.

Other
- **api.service.ts:** Move `postAccountKey` to `KeyRotationApiService`
- **feature-flag.enum.ts:** add new feature flag

## Screenshots

<!--Required for any UI changes. Delete if not applicable-->

## Before you submit

- Please add **unit tests** where it makes sense to do so (encouraged but not required)
- If this change requires a **documentation update** - notify the documentation team
- If this change has particular **deployment requirements** - notify the DevOps team
- Ensure that all UI additions follow [WCAG AA requirements](https://contributing.bitwarden.com/contributing/accessibility/)
2023-12-22 10:31:24 -05:00
..
.vscode Multi root workspace tweaks (#2858) 2022-06-13 21:39:36 -05:00
admin-console create team owned libs for billing, admin-console, platform (#7233) 2023-12-15 09:02:21 -05:00
angular [PM-4239] When viewing an item with a passkey, passkey is not announced by screenreader (#7154) 2023-12-21 10:54:54 -05:00
auth [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00
billing create team owned libs for billing, admin-console, platform (#7233) 2023-12-15 09:02:21 -05:00
common [PM-3797] Client changes to use new key rotation process (#6881) 2023-12-22 10:31:24 -05:00
components [CL-159] add bottom border to bit-banner (#7230) 2023-12-19 17:23:13 -05:00
exporter [PM-3565] Enforce higher minimum KDF (#6440) 2023-12-05 10:55:12 -05:00
importer [PM-4077] safeincloud multiple url fix (#6394) 2023-12-14 16:40:51 +00:00
node [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00
platform create team owned libs for billing, admin-console, platform (#7233) 2023-12-15 09:02:21 -05:00
shared create team owned libs for billing, admin-console, platform (#7233) 2023-12-15 09:02:21 -05:00
tools [PM-4266] Create folder for tools owned features (#6761) 2023-11-02 14:10:28 +01:00
vault [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00