Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-1270] Throw error when removing master password reset policy with TDE enabled #2964

Merged

Conversation

r-tome
Copy link
Contributor

@r-tome r-tome commented May 26, 2023

Type of change

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

Objective

If an organization has “trusted device” as their decyption method for SSO, show an error message if an admin tries to turn off the master password reset policy or tries to remove auto-enrollment.

Code changes

  • src/Core/Services/Implementations/PolicyService.cs: If the saved policy is of the "Master Password" type, we verify if TDE is activated for that organization and generate an error if it is the case.
  • test/Core.Test/Services/PolicyServiceTests.cs: Unit tests to verify the implementation

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

…enabled and the user is trying to turn off the master password reset policy or tries to remove auto-enrollment
…er password reset policy or removing auto-enrollment
@r-tome r-tome marked this pull request as ready for review May 26, 2023 11:09
@r-tome r-tome requested a review from a team May 26, 2023 11:09
@eliykat
Copy link
Member

eliykat commented May 31, 2023

(Looks good otherwise)

@r-tome r-tome requested a review from eliykat June 1, 2023 08:18
Copy link
Member

@eliykat eliykat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding tests!

@r-tome r-tome removed the needs-qa label Jun 7, 2023
@r-tome r-tome merged commit 746dec6 into master Jun 7, 2023
@r-tome r-tome deleted the PM-1270-error-when-removing-master-password-reset-policy branch June 7, 2023 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants