1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00
bitwarden-server/test/Core.Test
Jake Fink 989603ddd3
[Pm 3797 Part 2] Add emergency access rotations (#3434)
## 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-->
See #3425 for part 1 and background.

This PR adds emergency access to the rotation. All new code is hidden behind a feature flag.

The Accounts controller has also been moved to Auth ownership.

## 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-->

* **file.ext:** Description of what was changed and why
* **AccountsController.cs:** Moved to Auth ownership. Emergency access validation was added (as well as initializing empty lists to avoid errors).
* **EmergencyAccessRotationValidator.cs:** Performs validation on the provided list of new emergency access keys.
* **EmergencyAccessRepository.cs:** Adds a method to rotate encryption keys. This is added to a list in the `RotateUserKeyCommand` that the `UserRepository` calls so it doesn't have to know about all the domains.

## Before you submit

- Please check for formatting errors (`dotnet format --verify-no-changes`) (required)
- If making database changes - make sure you also update Entity Framework queries and/or migrations
- 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
2023-12-05 12:05:51 -05:00
..
AdminConsole [AC-1784] Revert changes made on assigning Manage permission to collections (#3501) 2023-12-04 12:41:03 +00:00
Auth [Pm 3797 Part 2] Add emergency access rotations (#3434) 2023-12-05 12:05:51 -05:00
AutoFixture [AC-1751] AC Team code ownership moves: OrganizationUser (part 1) (#3487) 2023-11-30 07:04:56 +10:00
Entities [AC-1283] AC Team code ownership moves: Organization (pt 2) (#3486) 2023-11-29 15:31:15 -06:00
Helpers Run formatting (#2230) 2022-08-29 16:06:55 -04:00
Models Ignore expired licenses in tests to check overall validity (#3495) 2023-12-01 06:49:49 +10:00
OrganizationFeatures [AC-1882] Fixed Brittle SM Unit Tests (#3510) 2023-12-04 15:28:41 -05:00
Resources Run formatting (#2230) 2022-08-29 16:06:55 -04:00
SecretsManager/AutoFixture [AC-1512] Feature: Secrets Manager Billing - round 2 (#3119) 2023-08-04 21:51:12 +00:00
Services [AC-1784] Revert changes made on assigning Manage permission to collections (#3501) 2023-12-04 12:41:03 +00:00
Tokens Run formatting (#2230) 2022-08-29 16:06:55 -04:00
Tools [AC-1287] AC Team code ownership moves: Policies (1/2) (#3383) 2023-11-22 16:07:37 -05:00
Utilities [AC-1708] Teams Starter Plan (#3386) 2023-11-03 22:26:47 +00:00
Vault [AC-1872] Manage permission on importing data is placed behind FC feature flag (#3496) 2023-12-01 15:19:08 +00:00
ConstantsTests.cs [PM-3565] Enforce higher minimum KDF (#3304) 2023-12-05 17:21:46 +01:00
Core.Test.csproj Remove moq (#3166) 2023-08-10 17:03:42 +02:00
packages.lock.json Bumped version to 2023.12.0 (#3519) 2023-12-05 10:55:20 -05:00
TempDirectory.cs Run formatting (#2230) 2022-08-29 16:06:55 -04:00