Commit Graph

6713 Commits

Author SHA1 Message Date
Rui Tome
30e386d69d Update InitPendingOrganizationRequest to allow optional collection name
- Modified the CollectionName property to be nullable, allowing for no collection to be created if the value is null or empty.
- Enhanced documentation to clarify the optional nature of the CollectionName parameter.
2026-01-30 16:40:45 +00:00
Rui Tome
bb42cc73dc Update documentation in IInitPendingOrganizationCommand to clarify organization initialization process
- Revised the summary comment to specify that the method initializes a pending organization created via the Bitwarden Portal on behalf of a Reseller.
- Added a reference to the ResellerClientOrganizationSignUpCommand for better context.
- Emphasized the confirmation of the first owner during the initialization process.
2026-01-30 16:30:14 +00:00
Rui Tome
dc18834aed Implement InitPendingOrganizationValidator for improved organization initialization validation
- Introduced IInitPendingOrganizationValidator interface and its implementation to encapsulate validation logic for organization initialization.
- Refactored InitPendingOrganizationCommand to utilize the new validator for token validation, user email matching, organization state checks, and policy enforcement.
- Enhanced dependency injection in OrganizationServiceCollectionExtensions to include the new validator.
- Added comprehensive unit tests for the validator to ensure robust validation logic and error handling.
2026-01-30 16:28:53 +00:00
Rui Tome
fd8044ce2a Add remarks to IInitPendingOrganizationCommand for clarity on organization initialization
- Enhanced the documentation for the InitPendingOrganizationCommand interface by adding remarks to clarify the role of the user initializing the organization.
- Explained the default state assumptions during validation, emphasizing that no policies are enforced at this stage.
2026-01-30 14:22:21 +00:00
Rui Tome
278ee76f7f Enhance InitPendingOrganizationCommand for null safety and error handling
- Removed nullable disable directive to enable null safety checks.
- Added a null check for the organization retrieval, throwing a BadRequestException if not found.
- Updated validation methods to return nullable Error types, improving error handling in the organization initialization process.
2026-01-30 14:10:11 +00:00
Rui Tome
36f2a6878d Revert "Refactor BuildVerifyUserEmailAction to accept User entity instead of user ID"
This reverts commit 71047bee2a.
2026-01-30 11:32:59 +00:00
Rui Tome
71047bee2a Refactor BuildVerifyUserEmailAction to accept User entity instead of user ID
- Updated IUserRepository and its implementations to change the parameter of BuildVerifyUserEmailAction from Guid userId to User user.
- Modified related repository methods in Dapper and Entity Framework to utilize the User entity for email verification.
- Adjusted tests to reflect the new method signature, ensuring proper functionality and integration with the updated user verification process.
2026-01-29 17:19:37 +00:00
Rui Tome
7ed77176e2 Refactor organization user acceptance tests to utilize feature flags
- Converted existing tests to use [Theory] with [InlineData] for feature flag variations.
- Updated assertions to reflect expected status codes based on feature flag state.
- Enhanced user confirmation checks to ensure proper linking and email verification after acceptance.
- Improved test coverage for organization initialization scenarios with and without collections.
2026-01-29 17:09:21 +00:00
Rui Tome
7bafe60d01 Refactor InitPendingOrganizationCommand to streamline organization initialization process
- Introduced methods for preparing organization and organization user for initialization.
- Replaced direct calls to repository methods with a new action-based approach for executing multiple database updates in a single transaction.
- Enhanced test cases to validate the new initialization logic and ensure proper handling of organization states.
2026-01-29 17:08:22 +00:00
Rui Tome
7333eb89f6 Add integration tests for ExecuteOrganizationInitializationUpdatesAsync 2026-01-29 17:07:16 +00:00
Rui Tome
b285ce4349 Refactor organization initialization methods in IOrganizationRepository and implementations
- Introduced BuildUpdateOrganizationAction method to create an action for updating organization properties during initialization.
- Replaced the InitializePendingOrganizationAsync method with ExecuteOrganizationInitializationUpdatesAsync to handle multiple update actions in a single transaction.
- Updated Dapper and Entity Framework implementations to support the new action-based approach for organization initialization, enhancing transaction management and code clarity.
2026-01-29 17:05:51 +00:00
Rui Tome
0e5213cbbb Add BuildConfirmOrganizationUserAction method to IOrganizationUserRepository and implementations in OrganizationUserRepository classes
- Introduced a new method in IOrganizationUserRepository to build an action for confirming an organization user.
- Implemented the method in both Dapper and Entity Framework OrganizationUserRepository classes to handle user confirmation and status updates.
- Enhanced the functionality to support transaction execution for database operations.
2026-01-29 17:02:46 +00:00
Rui Tome
23034681cc Add BuildCreateDefaultCollectionAction method to ICollectionRepository and implementations in CollectionRepository classes
- Introduced a new method in ICollectionRepository to build an action for creating a default collection with user access.
- Implemented the method in both Dapper and Entity Framework CollectionRepository classes to handle collection creation and user access assignments.
- Enhanced the functionality to support transaction execution for database operations.
2026-01-29 17:01:45 +00:00
Rui Tome
f2dba98f67 Add BuildVerifyUserEmailAction method to IUserRepository and implementations in UserRepository classes
- Introduced a new method in IUserRepository to create an action for verifying user emails.
- Implemented the method in both Dapper and Entity Framework UserRepository classes to update the email verification status of users.
- Ensured that the method checks if the user's email is already verified before updating.
2026-01-29 17:00:44 +00:00
Rui Tome
a819fa2a4d Create database update action delegate for organization initialization. 2026-01-29 16:59:07 +00:00
Rui Tome
e86fee6588 Merge branch 'main' into ac/pm-28795/refactor-org-acceptinit 2026-01-29 11:19:42 +00:00
Matt Bishop
d9e849a44d Resolve conflict with Docker ownership (#6913) 2026-01-28 17:02:22 -05:00
Patrick-Pimentel-Bitwarden
f29fd4d9c2 fix(logging): [PM-28877] Remove Config for PII Logging (#6885)
* fix(logging): [PM-28877] Remove Config for PII Logging - Removed all references to logging being set to true even in dev environment.

* fix(logging): [PM-28877] Remove Config for PII Logging - Fixed up with a better understanding of the original ask.

* fix(logging): [PM-28877] Remove Config for PII Logging - Removed all show pii.
2026-01-28 15:18:55 -05:00
Vijay Oommen
bfefd27a38 PM-30538 Add feature flag for Milestone 11 DIRT (#6916) 2026-01-28 13:57:06 -06:00
Jared
b1b6fcdbd2 Update email and text templates for Domain Claimed by Organization no… (#6897)
* Update email and text templates for Domain Claimed by Organization notification

- Changed the heading to "What this means for you" for clarity.
- Revised bullet points to better reflect user experience and responsibilities within the organization.
- Updated the phrasing of the help article reference for consistency.

* Fix HandlebarsMailService claimed domain email
2026-01-28 13:16:35 -05:00
Jared McCannon
ddbaffad59 [PM-28627] Create Default Collection Restore (#6879)
* Add default collection name to call stack for restore user command

* Committing feature flag and request model.

* Added tests

* fix for tests.

* added empty string to test

* figured out the mystery commit.

* added vnext onto method name.

* updating tests and command to include feature flag

* moved event call

* last few changes.

* opting for null instead of empty string.
2026-01-28 09:05:29 -06:00
renovate[bot]
369514c055 [deps] Platform: Update LaunchDarkly.ServerSdk to 8.11.0 (#6907)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-28 09:59:31 -05:00
renovate[bot]
142ffe7b1b [deps]: Update sigstore/cosign-installer action to v4 (#6502)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-28 09:42:11 -05:00
Brandon Treston
a677eb9b39 remove feature flagged logic (#6901) 2026-01-28 09:31:49 -05:00
Matt Bishop
52397b81ab Have AppSec own Checkmarx config (#6912) 2026-01-28 09:18:36 -05:00
John Harrington
fa06fe41ab [PM-30920] Server changes to encrypt send access email list (#6867)
* models, entity, and stored procs updated to work with EmailHashes with migrations

* configure data protection for EmailHashes

* update SendAuthenticationQuery to use EmailHashes and perform validation

* respond to Claude's comments and update tests

* fix send.sql alignment

Co-authored-by: mkincaid-bw <mkincaid@bitwarden.com>

---------

Co-authored-by: Alex Dragovich <46065570+itsadrago@users.noreply.github.com>
Co-authored-by: mkincaid-bw <mkincaid@bitwarden.com>
2026-01-28 07:13:25 -07:00
Todd Martin
2c39e336e0 chore(flags): [PM-31326] Rename ipc-channel-framework feature flag 2026-01-28 08:25:46 -05:00
Todd Martin
4403e036fd chore(flags): Add pm-30529-webauthn-related-origins feature flag 2026-01-27 16:46:43 -05:00
Matt Gibson
edf694b8d4 Use Scene result for SingleUserScene (#6909)
* Scenes should return resulting data in the result object

The result is for data that cannot be known by the client requesting the scene and the mangle map used for mangling input values to enable parallelizing tests

* Fix filenames

* SingleUserScene now has a return value of various created User data

* 1/100 too frequent for false test failures
2026-01-27 21:55:04 +01:00
Maciej Zieniuk
f578dab94f user reset password key can be empty string (#6871) 2026-01-27 21:38:09 +01:00
Dave
03fcdc2852 feat(account-switching) [PM-5594]: Add Safari account-switching feature flag. (#6829) 2026-01-27 14:26:07 -05:00
Thomas Rittson
80eec2df85 [PM-23768] Public API - add restore and revoke member endpoint (#6859)
* Add restore and revoke to public api

* Follow naming conventions

* Use POST instead of PUT

* hello claude

* Update test names

* Actually fix test names

* Add JsonConstructor attr

* Fix test
2026-01-27 12:11:15 -06:00
Jared McCannon
898904a673 Renamed for clarity (#6902) 2026-01-27 09:03:06 -06:00
renovate[bot]
67f8cbf5b3 [deps]: Update anchore/scan-action action to v7.2.3 (#6905)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-27 15:37:01 +01:00
renovate[bot]
440f5dc0da [deps]: Update github/codeql-action action to v4.31.10 (#6906)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-27 15:36:13 +01:00
renovate[bot]
2a458807a5 [deps] Vault: Update AngleSharp to 1.4.0 (#5868)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nick Krantz <125900171+nick-livefront@users.noreply.github.com>
2026-01-26 12:04:23 -06:00
Alex Morask
5104ec5f98 [PM-31040] Add logging to bank account setup process (#6898)
* Add logging to bank account setup process

* Missed test file constructor
2026-01-26 11:46:08 -06:00
Github Actions
afb087161a Bumped version to 2026.1.1 2026-01-26 15:59:06 +00:00
Oscar Hinton
46a4c09b81 Add desktop-migration-milestone-4 flag (#6881) 2026-01-26 16:36:10 +01:00
Anders Åberg
40e293117d PM-2035: PRF Unlock (#6401)
* Initial refactor

* Add WebauthnPRFOptions to syncResponse

* MAYBE: Use KM owned ResponseModel?

* REVERT ^- Keep using PrfUnlockOptions for simplicity

This reverts commit 5a34e7dfa8.

* UserDecryptionOptions: Only send one credential

* format

* Update UserDecryptionOptions.cs

* format

* Added feature flag (#6600)
2026-01-26 07:18:42 -08:00
Rui Tomé
c8124667ee [PM-28842] Add validation to prevent excessive master password policy values (#6807)
* Enhance MasterPasswordPolicyData with validation attributes

Added data annotations for MinComplexity and MinLength properties to enforce validation rules. MinComplexity must be between 0 and 4, and MinLength must be between 12 and 128.

* Implement model validation in PolicyDataValidator and enhance error handling

Added a ValidateModel method to enforce validation rules for policy data. Updated error messages to provide clearer feedback on validation failures. Enhanced unit tests to cover new validation scenarios for MinLength and MinComplexity properties.

* Update PoliciesControllerTests to reflect new validation rules for MinComplexity and MinLength

Modified test cases to use updated values for MinComplexity (4) and MinLength (128). Added new tests to verify that excessive values for these properties return BadRequest responses. Ensured consistency across integration tests for both Admin and Public controllers.

* Enhance MasterPasswordPolicyData with XML documentation for properties

Added XML documentation comments for MinComplexity and MinLength properties to clarify their purpose and constraints. This improves code readability and provides better context for developers using the model.

* Add unit tests for PolicyDataValidator to validate minLength and minComplexity rules

Implemented new test cases to verify the behavior of the ValidateAndSerialize method in PolicyDataValidator. Tests cover scenarios for minimum and maximum values, as well as edge cases for invalid inputs, ensuring robust validation for MasterPassword policy data.
2026-01-26 11:38:06 +00:00
Conner Turnbull
d8379d3474 Updated devcontainer configs, fixed migration variable bug, added DEV_CERT_CONTENTS to .env.example (#6891) 2026-01-23 19:43:32 -05:00
Justin Baur
866ba6609d PM-31106: Dev container improvements (#6651)
* Add rust feature

* Give the community create command the non-interactive treatment

* Add ability to load custom root CA

* Update .devcontainer/community_dev/postCreateCommand.sh

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* Update .devcontainer/community_dev/postCreateCommand.sh

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-01-23 16:23:45 -05:00
Vijay Oommen
80d05eef07 PM-30879 added feature flag for huntress (#6883) 2026-01-23 13:36:27 -06:00
Todd Martin
8cf05d8c67 Group server minor and patch npm dependencies for Auth (#6865)
* Group minor and patch npm dependencies for Auth.

* Remove comment.
2026-01-23 12:08:04 -05:00
Vijay Oommen
b623e381b4 PM-30799 added validation for DomainName (#6856) 2026-01-23 08:34:19 -06:00
Robyn MacCallum
867e61694b Add NotificationUndeterminedCipherScenarioLogic feature flag (#6884)
* Add NotificationUndeterminedCipherScenarioLogic feature flag

* Remove whitespace
2026-01-23 09:05:58 -05:00
renovate[bot]
b360d6a00a [deps]: Update github-action minor (#6868)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2026-01-23 11:43:05 +00:00
Rui Tomé
bfe2e7717d [PM-30615] Fix Public API List Collections returning Default Collections (#6841) 2026-01-23 11:07:56 +00:00
Rui Tome
75402194a6 refactor: Introduce InitPendingOrganizationRequest model and update InitPendingOrganizationVNextAsync method
- Created InitPendingOrganizationRequest to encapsulate parameters for initializing a pending organization.
- Refactored InitPendingOrganizationVNextAsync method to accept the new request model instead of multiple parameters.
- Updated OrganizationUsersController to use the new request model for improved readability and maintainability.
- Adjusted related tests to accommodate the new request structure.
2026-01-23 11:02:27 +00:00