[AC-1070] Enforce master password policy on login #2714
Merged
shane-melton merged 18 commits intomasterfrom Apr 17, 2023
Merged
[AC-1070] Enforce master password policy on login #2714shane-melton merged 18 commits intomasterfrom
shane-melton merged 18 commits intomasterfrom
Conversation
The additional API endpoint is required to avoid forcing a full sync call before every login for master password policy enforcement on login.
3d49ccd to
728bd87
Compare
The response model is used by both the Identity and Api projects.
728bd87 to
f639a8e
Compare
…s master password policies
f639a8e to
bdfe85a
Compare
- Update BaseRequestValidator - Update AccountsController for /verify-password endpoint - Update VerifyMasterPasswordResponseModel to accept MasterPasswordPolicyData
eliykat
requested changes
Mar 9, 2023
src/Core/Models/Api/Response/MasterPasswordPolicyResponseModel.cs
Outdated
Show resolved
Hide resolved
src/Core/Models/Data/Organizations/Policies/MasterPasswordPolicyData.cs
Outdated
Show resolved
Hide resolved
5 tasks
- Use User object instead of Guid - Remove TODO message - Use `PolicyRepository.GetManyByTypeApplicableToUserIdAsync` instead of filtering locally
- Remove default values from both models - Add missing `RequireLower` - Fix mismatched properties in `CombineWith` method - Make properties nullable in response model
eliykat
reviewed
Mar 10, 2023
Member
eliykat
left a comment
There was a problem hiding this comment.
LGTM but I'll wait until I've reviewed the client PR before approving.
|
SonarCloud Quality Gate failed.
|
eliykat
previously approved these changes
Apr 7, 2023
eliykat
approved these changes
Apr 17, 2023
Member
eliykat
left a comment
There was a problem hiding this comment.
Re-approving after updating from master.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









Type of change
Objective
Provides the server requirements for the client PR for AC-1070.
GET /policiesendpoint that returns all organization policies that apply to the authorized user. It is used by the CLI when a weak master password is detected during login and they are used to validate that the new password meets requirements.MasterPasswordPolicyfield as a custom response to the Identity Server token and 2FA responses. It is used by clients to evaluate a user's master password client side while the password is still in working memory of the login component/command.VerifyMasterPasswordResponseModelresponse to thePOST /accounts/verify-passwordendpoint that includes any enabled master password policy for the user. To be used when an authenticated user is unlocking their vault and avoids making an additional network request for master password policies for every vault unlock.Before you submit
dotnet format --verify-no-changes) (required)