1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00
bitwarden-server/test/Api.Test/Controllers
Shane Melton f2fad5513d
[AC-1070] Enforce master password policy on login (#2714)
* [EC-1070] Add API endpoint to retrieve all policies for the current user

The additional API endpoint is required to avoid forcing a full sync call before every login for master password policy enforcement on login.

* [EC-1070] Add MasterPasswordPolicyData model

* [EC-1070] Move PolicyResponseModel to Core project

The response model is used by both the Identity and Api projects.

* [EC-1070] Supply master password polices as a custom identity token response

* [EC-1070] Include master password policies in 2FA token response

* [EC-1070] Add response model to verify-password endpoint that includes master password policies

* [AC-1070] Introduce MasterPasswordPolicyResponseModel

* [AC-1070] Add policy service method to retrieve a user's master password policy

* [AC-1070] User new policy service method

- Update BaseRequestValidator
- Update AccountsController for /verify-password endpoint
- Update VerifyMasterPasswordResponseModel to accept MasterPasswordPolicyData

* [AC-1070] Cleanup new policy service method

- Use User object instead of Guid
- Remove TODO message
- Use `PolicyRepository.GetManyByTypeApplicableToUserIdAsync` instead of filtering locally

* [AC-1070] Cleanup MasterPasswordPolicy models

- Remove default values from both models
- Add missing `RequireLower`
- Fix mismatched properties in `CombineWith` method
- Make properties nullable in response model

* [AC-1070] Remove now un-used GET /policies endpoint

* [AC-1070] Update policy service method to use GetManyByUserIdAsync

* [AC-1070] Ensure existing value is not null before comparison

* [AC-1070] Remove redundant VerifyMasterPasswordResponse model

* [AC-1070] Fix service typo in constructor
2023-04-17 07:35:47 -07:00
..
AccountsControllerTests.cs [AC-1070] Enforce master password policy on login (#2714) 2023-04-17 07:35:47 -07:00
CollectionsControllerTests.cs [AC-1110] add deleteAnyCollection permission to bulk delete (#2766) 2023-03-10 12:53:22 -05:00
ConfigControllerTests.cs All feature state access through config API (#2785) 2023-03-10 08:11:11 -05:00
GroupsControllerTests.cs [EC-1003] feat: remove externalId from PUT/POST (#2589) 2023-02-06 10:27:40 +01:00
OrganizationConnectionsControllerTests.cs [EC-826] Merge license sync feature branch to master (#2587) 2023-01-31 07:42:10 +10:00
OrganizationDomainControllerTests.cs [SG-147] Organization Domain Claiming Feature (#2704) 2023-02-15 14:26:41 -05:00
OrganizationsControllerTests.cs [PM-1188] Server owner auth migration (#2825) 2023-04-14 13:25:56 -04:00
OrganizationSponsorshipsControllerTests.cs Run formatting (#2230) 2022-08-29 16:06:55 -04:00
OrganizationUsersControllerTests.cs Run formatting (#2230) 2022-08-29 16:06:55 -04:00
SendsControllerTests.cs Fix bug #2317: add deletion date validation for file Sends (#2342) 2022-12-13 20:30:01 +01:00