Rui Tome
102c8adf61
Refactor UserService to integrate IPolicyRequirementQuery for two-factor authentication policy checks
2025-05-21 15:49:32 +01:00
Rui Tome
73bf74dac4
Add TwoFactorPoliciesForActiveMemberships property to RequireTwoFactorPolicyRequirement and corresponding unit tests for policy retrieval based on user status
2025-05-21 15:48:46 +01:00
Rui Tome
1b0632ae52
Remove redundant vNext tests
2025-05-21 10:55:15 +01:00
Rui Tome
a0ffcc81cb
Update RestoreOrganizationUserCommand to use IPolicyRequirementQuery for two-factor authentication policies checks
2025-05-21 10:38:44 +01:00
Rui Tome
30490ca383
Implement CanBeRestored method in RequireTwoFactorPolicyRequirement to determine user restoration eligibility based on two-factor authentication status; add corresponding unit tests for various scenarios.
2025-05-20 17:29:54 +01:00
Rui Tome
ec81ed786a
Enhance ConfirmOrganizationUserCommand to validate two-factor authentication policy based on feature flag; refactor validation logic and update related tests for improved policy handling.
2025-05-20 16:51:15 +01:00
Rui Tome
02cbdd64a4
Refactor AcceptOrgUserCommand to enforce two-factor authentication policy based on feature flag; update validation logic and tests accordingly.
2025-05-20 16:50:33 +01:00
Rui Tome
f4bfa0baf0
Implement CanAcceptInvitation and CanBeConfirmed methods in RequireTwoFactorPolicyRequirement; update tests to reflect new logic for two-factor authentication policy handling.
2025-05-20 16:47:52 +01:00
Rui Tome
06a5888c7b
Update ConfirmOrganizationUserCommand to use RequireTwoFactorPolicyRequirement to check for 2FA requirement
2025-05-20 11:19:46 +01:00
Rui Tome
7d817f82af
Merge branch 'main' into ac/pm-18238/add-requiretwofactorpolicyrequirement
...
# Conflicts:
# src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/AcceptOrgUserCommand.cs
2025-05-20 10:25:45 +01:00
Graham Walker
818934487f
PM-18939 refactoring send service to 'cqrs' ( #5652 )
...
* PM-18939 refactoring send service to 'cqrs'
* PM-18939 fixing import issue with sendValidationService
* PM-18939 fixing code based on PR comments
* PM-18339 reverting to previous code in test
* PM-18939 adding XMLdocs to services
* PM-18939 reverting send validation methods
* PM-18939 updating code to match main
* PM-18939 reverting validateUserCanSaveAsync to match main
* PM-18939 fill our param and return sections of XMLdocs
* PM-18939 updating XMLdocs based on PR comments
* Update src/Core/Tools/SendFeatures/Commands/Interfaces/IAnonymousSendCommand.cs
Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
* Update src/Core/Tools/SendFeatures/Commands/Interfaces/INonAnonymousSendCommand.cs
Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
* Update src/Core/Tools/SendFeatures/Commands/Interfaces/INonAnonymousSendCommand.cs
Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
* Update src/Core/Tools/SendFeatures/Services/Interfaces/ISendStorageService.cs
Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
* PM-18939 adding commits to change tuple to enum type
* PM-18939 resetting stream position to 0 when uploading file
* PM-18939 updating XMLdocs based on PR comments
* PM-18939 updating XMLdocs
* PM-18939 removing circular dependency
* PM-18939 fixing based on comments
* PM-18939 updating method name and documentation
---------
Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
2025-05-19 22:59:30 -05:00
Alex Morask
7b3e2a80f4
[PM-21092] Set tax exemption to reverse charge for non-US business-use customers ( #5812 )
...
* Set automatic tax to enabled and tax exempt to reverse where applicable when ff is on
* Fix and add tests
* Run dotnet format
* Run dotnet format
* PM-21745: Resolve defect
* PM-21770: Resolve defect
* Run dotnet format'
2025-05-19 14:53:48 -04:00
Ike
a07cce26f3
[PM-19444] Emergency access device verification email fix ( #5833 )
...
* fix: turn off New Device Verification when emergency access takeover is exercised; Also some Docs
* test: add tests for EmergencyAccessService
2025-05-19 11:59:15 -04:00
Brandon Treston
b3f7265129
[PM-21727] Add feature to plan and license constructor ( #5834 )
...
* add feature to plan
* add license to ctor for old license file creation method
2025-05-16 17:30:51 -04:00
Brandon Treston
cbf49b915b
[PM-11622] Implement UseOrganizationDomains ( #5822 )
...
* implement UseOrganizationDomains
* fix undefined error
2025-05-16 12:51:22 -04:00
cyprain-okeke
51e489ac9d
[PM 21081][Defect] Admin Sponsored Families not working in Self Host after uploading license file ( #5818 )
...
* Resolve the licence issue
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* resolve the pr comment
* Remove unnecessary directives
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
---------
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2025-05-16 16:05:47 +01:00
Patrick-Pimentel-Bitwarden
8d2629fe58
Auth/pm 17111/add browser to list of approving clients ( #5825 )
...
* refactor(update-auth-approving-clients): [PM-17111] Add Browser to List of Approving Clients - Refactored how it works to fit different priorities.
2025-05-16 09:50:32 -04:00
bitwarden-charlie
67f745ebc4
chore/SRE-583 Deprecate usage of Auth-Email Header ( #5709 )
...
* chore/SRE-583 Deprecate usage of Auth-Email Header
* SRE-583 cleanup function and references
* SRE-583 cleanup tests
---------
Co-authored-by: sneakernuts <671942+sneakernuts@users.noreply.github.com>
2025-05-16 07:45:04 -06:00
Jordan Aasen
97fbf21977
[PM-20543] - remove restrict-provider-access feature flag ( #5700 )
...
* remove restrict-provider-access feature flag
* remove feature flag
* re-add flag
* remove unnecessary tests
* fix bad merge
* fix bad merge
* remove RestrictProviderAccess key
2025-05-15 14:00:48 -07:00
Brandon Treston
81bff5e5cf
[PM-11622] use organization domains ( #5560 )
...
* DBO changes
* Add migration scripts
* wip
* wip
* wip
* add EF migrations
* run dotnet format
* cleanup
* revert business logic
* wip
* add update statement to mssql migration script
* fix user service tests
* increment license, add UseOrganizationDomains
* add migration helpers to seed initial value from UseSso
* clean up
* cleanup
* fix mssql migrations
* fix license version and test
* fix file names
* fix license json
* add missing property to license test
* rename file
* fix migrations
* fix migration
* add WHERE to helper scripts
* separate schema/data migrations
* restore comment
* Merge conflict
* fix migrations
* add new property to migration
* wip
* fix file names
* fix file name
2025-05-15 10:42:51 -04:00
Jared Snider
9ebe165871
fix(RegistrationViaOrgInviteWelcomeEmail): [Auth/PM-21428] Registration via Org Invite should send welcome email even if reference data isn't provided ( #5796 )
2025-05-14 11:13:32 -04:00
Patrick-Pimentel-Bitwarden
dd2ea41b74
Auth/pm 17111/add browser to list of approving clients ( #5792 )
...
* feat(update-auth-approving-clients): [PM-17111] Add Browser to List of Approving Clients - Initial changes.
* feat(update-auth-approving-clients): [PM-17111] Add Browser to List of Approving Clients - Updated tests.
* test(update-auth-approving-clients): [PM-17111] Add Browser to List of Approving Clients - Strengthened tests.
2025-05-13 15:43:11 -04:00
Vijay Oommen
4195baf1c5
[PM-20980] Add a note to freshdesk ticket when no user is found ( #5768 )
2025-05-13 09:05:22 -05:00
Alex Morask
53f7d9655e
[PM-20087] [PM-21104] Preview tax amount for organization trial initiation ( #5787 )
...
* [NO LOGIC] [PM-21104] Organize Core.Billing tax code
* Add PreviewTaxAmountCommand and expose through TaxController
* Add PreviewTaxAmountCommandTests
* Run dotnet format
2025-05-13 09:28:31 -04:00
Alex Morask
082bfa3c6a
[PM-21257] Revert MaxProjects license changes, limit MaxProjectsQuery to cloud-only for 2-person organizations ( #5776 )
...
* Revert "Add SmMaxProjects to OrganizationLicense (#5678 )"
This reverts commit 7fe022e26fce3c3f032757e832df50e9478e6658.
* Use PricingClient in MaxProjectsQuery and limit to cloud-only (free 2-person)
2025-05-13 08:51:36 -04:00
Thomas Rittson
a1b22e66e5
[PM-14613] Remove account deprovisioning feature flag ( #5676 )
...
* Remove flag
* Remove old tests
* Remove old xmldoc referencing the flag
* Remove old emails
2025-05-13 07:17:54 +10:00
cyprain-okeke
e4359f071c
[PM-21097] Fix: Prevent admin-added sponsored families from appearing in individual vault settings ( #5767 )
...
* Changes to resolve sponsorship showing in individual vault
* Resolve the failing unit test
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Resolve the failing test
* Resolve the failing test
* Resolve the failing test
* fix make IsAdminInitiated nullable
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Add the isAdminInitiated property
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Resolve the database error
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Resolve the failing unit test
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Resolve the scan error
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Resolve the database issue
* resolve the database build error
* Resolve the database build error
* Resolve the synchronization issue
---------
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2025-05-12 18:21:07 +01:00
Justin Baur
15b498184f
Resolve platform warnings ( #5798 )
...
* Installation Repository tests
* Formatting
* Remove extra LastActivityDate property
* Remove exclusion
2025-05-09 16:03:09 -04:00
Justin Baur
0075a15485
[PM-18064] Resolve billing warnings ( #5797 )
...
* Resolve Billing warnings
* Remove exclusions
* Format
2025-05-09 13:43:50 -04:00
Ike
ead5bbdd2a
[PM-21281] Email TOTP sent twice when user only has Email MFA enabled ( #5782 )
...
* fix: addressed bug where email token is sent twice,
* test: updating tests to have correct DI and removing test for automatic email of TOTP.
2025-05-09 12:13:01 -04:00
Ike
3f95513d11
[PM-19029][PM-19203] Addressing UserService
tech debt around ITwoFactorIsEnabledQuery
( #5754 )
...
* fix : split out the interface from the TwoFactorAuthenticationValidator into separate file.
* fix: replacing IUserService.TwoFactorEnabled with ITwoFactorEnabledQuery
* fix: combined logic for both bulk and single user look ups for TwoFactorIsEnabledQuery.
* fix: return two factor provider enabled on CanGenerate() method.
* tech debt: modfifying MFA providers to call the database less to validate if two factor is enabled.
* tech debt: removed unused service from AuthenticatorTokenProvider
* doc: added documentation to ITwoFactorProviderUsers
* doc: updated comments for TwoFactorIsEnabled impl
* test: fixing tests for ITwoFactorIsEnabledQuery
* test: updating tests to have correct DI and removing test for automatic email of TOTP.
* test: adding better test coverage
2025-05-09 11:39:57 -04:00
Todd Martin
80e7a0afd6
chore(captcha): [PM-15162] Remove captcha enforcement and issuing of bypass token
...
* Remove captcha enforcement and issuing/verification of bypass token
* Removed more captcha logic.
* Removed logic to enforce failed login attempts
* Linting.
* Fixed order of initialization.
* Fixed merge conflicts
* Renamed registration finish response for clarity
* Remove unnecessary mailService references.
2025-05-09 10:44:38 -04:00
Justin Baur
2918d46b62
Resolve Vault warnings ( #5786 )
...
- Also remove extra exclusions
2025-05-09 10:12:43 -04:00
Todd Martin
3989e3b26b
chore(feature-flag): [PM-8671] Remove new-device-verification feature flag
...
* Completed grouping of feature flags by team.
* Completed grouping feature flags by team.
* Remove email delay feature flag
* Removed feature flag
* Fixed reference.
* Remove flag after merge.
* Removed flag from server.
* Removed feature flag from server
* Remove new device verification feature flag.
* Removed unnecessary using.
* Remove feature flag from Constants
2025-05-09 09:37:16 -04:00
Oscar Hinton
5f7e2b8a81
[PM-21075] Initial database seeder ( #5703 )
...
Adds a database seeder which can be used standalone using a CLI for seeding your local development environment, or used in unit tests to seed complex scenarios.
---------
Co-authored-by: Robert Y <rkac@bitwarden.com>
2025-05-09 15:00:26 +02:00
Thomas Rittson
5b3d3d6e20
CommandResult and ValidationResult tweaks ( #5772 )
...
* Simplify and align CommandResult and ValidationResult.
In particular, 1 error per Failure/Invalid.
* Move these files to a common namespace
* Remove unused code
2025-05-09 10:46:49 +10:00
Rui Tome
e8a8d5c8c7
Enhance AcceptOrgUserCommand to use IPolicyRequirementQuery for two-factor authentication validation
2025-05-08 15:31:52 +01:00
Rui Tome
d696bfdc30
Add RequireTwoFactorPolicyRequirement and its factory with unit tests
...
* Implemented RequireTwoFactorPolicyRequirement to enforce two-factor authentication policies.
* Created RequireTwoFactorPolicyRequirementFactory to generate policy requirements based on user status.
* Added unit tests for the factory to validate behavior with various user statuses and policy details.
2025-05-08 15:29:31 +01:00
Justin Baur
e4a93b24f1
Resolve AC warnings ( #5785 )
2025-05-08 08:15:27 -05:00
Justin Baur
1228fe51c8
Resolve auth warnings ( #5784 )
2025-05-08 07:49:16 -04:00
Graham Walker
10fcff58b2
PM-19715 & PM-19712 Move Files to DIRT ownership on Server ( #5769 )
...
* PM-19715 PM-19711 moving reports to dirt directory and adding dirt as codeowners
* PM-19715 creating two sub folders for reports and events
* PM-19714 changing dirt paths for codeowners
* PM-19714 fixing codeowners file
* PM-19714 fixing codeowners
* PM-19714 moving hibpController to dirt ownership
* PM-19715 moving controller
2025-05-06 10:48:40 +02:00
Alex Morask
7fe022e26f
Add SmMaxProjects to OrganizationLicense ( #5678 )
...
* Add SmMaxProjects to OrganizationLicense
* Run dotnet format
2025-05-05 09:48:43 -04:00
Brant DeBow
4b49b04409
[PM-17562] Revert event route optimization ( #5766 )
2025-05-05 08:05:38 -04:00
Brant DeBow
75a2da3c4b
[PM-17562] Add support for extended properties on event integrations ( #5755 )
...
* [PM-17562] Add support for extended properties on event integrations
* Clean up IntegrationEventHandlerBase
* Respond to PR feedback
2025-05-05 08:04:59 -04:00
Conner Turnbull
077d0fa6d7
Resolved an issue where autoscaling always happened ( #5765 )
2025-05-02 12:53:06 -04:00
Alex Morask
2d4ec530c5
[PM-18955] Implement OrganizationWarningsQuery
( #5713 )
...
* Add GetWarnings endpoint to OrganizationBillingController
* Add OrganizationWarningsQueryTests
2025-05-01 17:13:10 -04:00
Thomas Rittson
41001fefae
Support use of organizationId parameter in authorization ( #5758 )
2025-05-02 07:00:48 +10:00
cyprain-okeke
dc5db5673f
[PM-17775] ( #5699 )
...
* Changes to allow admin to send F4E sponsorship
* Fix the failing unit tests
* Fix the failing test
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Merge Changes with pm-17777
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Add changes for autoscale
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Return the right error response
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Resolve the failing unit test
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
---------
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2025-05-01 16:35:51 +01:00
Brandon Treston
8ecd9c5fb3
[PM-19332] Create InitPendingOrganizationCommand ( #5584 )
...
* wip
* implement CommandResult
* remove auth handler
* fix import
* remove method from OrganizationService
* cleanup, add tests
* clean up
* fix auth in tests
* clean up comments
* clean up comments
* clean up test
2025-05-01 10:07:19 -04:00
cyprain-okeke
07a2c0e9d2
[PM-18569]Add admin sponsored families to organization license ( #5569 )
...
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* Add `Notes` column to `OrganizationSponsorships` table
* Add feature flag to `CreateAdminInitiatedSponsorshipHandler`
* Unit tests for `CreateSponsorshipHandler`
* More tests for `CreateSponsorshipHandler`
* Forgot to add `Notes` column to `OrganizationSponsorships` table in the migration script
* `CreateAdminInitiatedSponsorshipHandler` unit tests
* Fix `CreateSponsorshipCommandTests`
* Encrypt the notes field
* Wrong business logic checking for invalid permissions.
* Wrong business logic checking for invalid permissions.
* Remove design patterns
* duplicate definition in Constants.cs
* initial commit
* Merge Change with pm-17830 and use the property
* Add the new property to download licence
* Add the new property
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Remove the unsed failing test
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Remove unused method
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
---------
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
Co-authored-by: Jonas Hendrickx <jhendrickx@bitwarden.com>
2025-04-28 19:21:52 +01:00