1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-21 02:11:54 +01:00
bitwarden-browser/apps/web/src
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
..
404 [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00
app [PM-3797] Client changes to use new key rotation process (#6881) 2023-12-22 10:31:24 -05:00
connectors [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00
images [PM-1222] Store passkeys in Bitwarden vault (#4715) 2023-10-17 15:34:44 -04:00
locales Autosync the updated translations (#7333) 2023-12-22 11:26:18 +01:00
scss [PM-4222] Make importer UI reusable (#6504) 2023-10-19 11:17:23 +02:00
utils Platform/pm 19/platform team file moves (#5460) 2023-06-06 15:34:53 -05:00
.nojekyll Move web to apps/web and bitwarden_license/bit-web 2022-06-02 11:55:37 +02:00
404.html [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00
app-id.json Move web to apps/web and bitwarden_license/bit-web 2022-06-02 11:55:37 +02:00
browserconfig.xml Move web to apps/web and bitwarden_license/bit-web 2022-06-02 11:55:37 +02:00
favicon.ico Move web to apps/web and bitwarden_license/bit-web 2022-06-02 11:55:37 +02:00
global.d.ts Move web to apps/web and bitwarden_license/bit-web 2022-06-02 11:55:37 +02:00
index.html [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00
main.ts Cleanup src folder for web and move ts code into src/app per angular convention (#3127) 2022-07-25 15:13:54 +02:00
manifest.json Move web to apps/web and bitwarden_license/bit-web 2022-06-02 11:55:37 +02:00
polyfills.ts [BEEEP] [PM-4043] Remove date-input-polyfill (#6372) 2023-09-22 10:33:46 +00:00
theme.js Move web to apps/web and bitwarden_license/bit-web 2022-06-02 11:55:37 +02:00
translation-constants.ts [CSA-27] Use new dependency-free locale service for WebAuthN translations (#4557) 2023-02-04 09:23:42 -05:00
version.json Move web to apps/web and bitwarden_license/bit-web 2022-06-02 11:55:37 +02:00