1
0
mirror of https://github.com/bitwarden/server synced 2025-12-06 00:03:34 +00:00
Commit Graph

6157 Commits

Author SHA1 Message Date
Kyle Denney
58eae7a220 [PM-24552] - Remove code for pm-19956-require-provider-payment-method-during-setup (#6196)
* [PM-24552] - remove code for feature flag

* pr gate: removing unused and redundant usings/qualifiers
2025-08-20 14:11:15 -05:00
Nik Gilmore
22420f595f [PM-20130] Update SecurityTasksNotification email templates (#6200) 2025-08-20 10:35:51 -07:00
Brandon Treston
cf94438150 [PM-22586/PM-22587] Remove feature flagged logic (#6194)
* remove feature flagged logic

* remove feature flag

* remove OrganizationService.ImportAsync and tests

* remove unused function
2025-08-20 11:10:06 -04:00
cd-bitwarden
3cad054af1 [SM-1274] Adding Project Events (#6022)
* Adding new logging for secrets

* fixing secrest controller tests

* fixing the tests

* Server side changes for adding ProjectId to Event table, adding Project event logging to projectsController

* Rough draft with TODO's need to work on EventRepository.cs, and ProjectRepository.cs

* Undoing changes to make projects soft delete, we want those to be fully deleted still. Adding GetManyTrashedSecretsByIds to secret repo so we can get soft deleted secrets, getSecrets in eventsController takes in orgdId, so that we can check the permission even if the secret was permanently deleted and doesn' thave the org Id set. Adding Secret Perm Deleted, and Restored to event logs

* db changes

* fixing the way we log events

* Trying to undo some manual changes that should have been migrations

* adding migration files

* fixing test

* setting up userid for project controller tests

* adding sql

* sql

* Rename file

* Trying to get it to for sure add the column before we try and update sprocs

* Adding code to refresh the view to include ProjectId I hope

* code improvements

* Suggested changes

* suggested changes

* trying to fix sql issues

* fixing swagger issue

* Update src/Core/SecretsManager/Repositories/Noop/NoopSecretRepository.cs

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* Suggested changes

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2025-08-20 10:24:17 -04:00
Matt Andreko
7a6fa5a457 Revert "Temporarily hold sarif uploads (#6166)" (#6222) 2025-08-20 09:39:11 -04:00
Stephon Brown
9face76417 [PM-22980] Organization name not updated in Stripe when organization name is changed (#6189)
* tests: add tests for UpdateAsync change

* fix: update Stripe customer object update

* refactor: replace CustomerService objects with stripeAdapter

* refactor: simplify controller logic

* fix: mark businessname and it's function obsolete for future use

* fix: pr feedback remove business name check

* refactor: remove unused functions in organizationservice
2025-08-20 09:27:05 -04:00
renovate[bot]
3169c5fb85 [deps]: Update github-action minor (#5865)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Amy Galles <9685081+AmyLGalles@users.noreply.github.com>
Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
2025-08-20 12:19:12 +02:00
Brandon Treston
c189e4aaf5 [PM-22104] Migrate default collection when org user is removed (#6135)
* migrate default collection to a shared collection when users are removed

* remove redundant logic

* fix test

* fix tests

* fix test

* clean up

* add migrations

* run dotnet format

* clean up, refactor duplicate logic to sproc, wip integration test

* fix sql

* add migration for new sproc

* integration test wip

* integration test wip

* integration test wip

* integration test wip

* fix integration test LINQ expression

* fix using wrong Id

* wip integration test for DeleteManyAsync

* fix LINQ

* only set DefaultUserEmail when it is null in sproc

* check for null

* spelling, separate create and update request models

* fix test

* fix child class

* refactor sproc

* clean up

* more cleanup

* fix tests

* fix user email

* remove unneccesary test

* add DefaultUserCollectionEmail to EF query

* fix test

* fix EF logic to match sprocs

* clean up logic

* cleanup
2025-08-19 14:12:34 -04:00
cyprain-okeke
29d6288b27 Add the expiration date (#6191) 2025-08-19 15:53:54 +01:00
Stephon Brown
ae1e9a2aed [PM-24556] Remove Code for PM-21383 Get Provider Price from Stripe (#6217)
* refactor: remove flag in controller

* tests: remove flag use in test

* refactor: remove flag constant
2025-08-18 15:25:40 -04:00
Daniel García
6971f0a976 Update Swashbuckle and improve generated OpenAPI files (#6066)
* Improve generated OpenAPI files

* Nullable

* Fmt

* Correct powershell command

* Fix name

* Add some tests

* Fmt

* Switch to using json naming policy
2025-08-18 18:40:50 +02:00
Jimmy Vo
03327cb082 [PM-24278] Fix sproc to return UserId (#6203) 2025-08-18 11:12:42 -04:00
Alex Morask
bd133b936c [PM-22145] Tax ID notifications for Organizations and Providers (#6185)
* Add TaxRegistrationsListAsync to StripeAdapter

* Update GetOrganizationWarningsQuery, add GetProviderWarningsQuery to support tax ID warning

* Add feature flag to control web display

* Run dotnet format'
2025-08-18 09:42:51 -05:00
Ike
8a36d96e56 [PM-22739] Add ClaimsPrincipal Extension
feat: add ClaimsPrincipal Extension
test: add tests
2025-08-15 10:06:40 -04:00
Rui Tomé
41f82bb357 [PM-23116/PM-23117] Remove deprecated feature flag MembersGetEndpointOptimization (#6179)
* Refactor OrganizationUserRepositoryTests: Swap GetManyByOrganizationWithClaimedDomainsAsync_vNext with GetManyByOrganizationWithClaimedDomainsAsync and remove outdated test

* Refactor GetOrganizationUsersClaimedStatusQuery: Remove unused IFeatureService dependency and simplify domain claimed status retrieval logic.

* Refactor OrganizationUserUserDetailsQuery: Remove unused IFeatureService dependency and streamline user details retrieval methods.

* Refactor OrganizationUserRepository: Remove deprecated GetManyByOrganizationWithClaimedDomainsAsync_vNext method and its implementation

* Remove deprecated feature flag MembersGetEndpointOptimization
2025-08-15 10:14:38 +01:00
Todd Martin
4bad008085 chore(comments): [PM-24624] Add more comments to AutoProvisionUserAsync
* Comments in auto-provisioning logic.

* More clarifications.

* Changed method name.

* Updated response from method.

* Clarified message.
2025-08-14 12:08:41 -04:00
Daniel James Smith
4b751e8cbf Add feature flag for chromium importer feature (#6193)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-08-14 14:43:30 +00:00
Rui Tomé
c30c0c1d2a [PM-12492] Create ResendOrganizationInviteCommand (#6182)
* Add IResendOrganizationInviteCommand and ResendOrganizationInviteCommand implementation

* Add unit tests for ResendOrganizationInviteCommand to validate invite resend functionality

* Refactor Organizations, OrganizationUsers, and Members controllers to use IResendInviteCommand for invite resending functionality

* Fix Organizations, OrganizationUsers, and Members controllers to replace IResendInviteCommand with IResendOrganizationInviteCommand

* Remove ResendInviteAsync method from IOrganizationService and its implementation in OrganizationService to streamline invite management functionality.

* Add IResendOrganizationInviteCommand registration in OrganizationServiceCollectionExtensions
2025-08-14 15:02:00 +01:00
Matt Andreko
4e6a036f22 Temporarily hold sarif uploads (#6166) 2025-08-14 09:30:12 -04:00
Ike
43d753dcb1 [PM-20592] [PM-22737] [PM-22738] Send grant validator (#6151)
**feat**: create `SendGrantValidator` and initial `SendPasswordValidator` for Send access grants  
**feat**: add feature flag to toggle Send grant validation logic  
**feat**: add Send client to Identity and update `ApiClient` to generic `Client`  
**feat**: register Send services in DI pipeline  
**feat**: add claims management support to `ProfileService`  
**feat**: distinguish between invalid grant and invalid request in `SendAccessGrantValidator`

**fix**: update parsing of `send_id` from request  
**fix**: add early return when feature flag is disabled  
**fix**: rename and organize Send access scope and grant type  
**fix**: dotnet format

**test**: add unit and integration tests for `SendGrantValidator`  
**test**: update OpenID configuration and API resource claims

**doc**: move documentation to interfaces and update inline comments  

**chore**: add TODO for future support of `CustomGrantTypes`
2025-08-13 18:38:00 -04:00
Rui Tomé
87877aeb3d [PM-24414] Remove CollectionType property from the public CollectionResponseModel (#6180) 2025-08-13 15:01:51 +01:00
Nick Krantz
f88baba66b [PM-23580] Security Task Metrics (#6164)
* add metrics endpoint for an organization to return completed and total security tasks

* refactor metrics fetch to use sql sproc for efficiency rather than having to pull all security task data

* add separate response model for security task metrics endpoint

* Pascal Case to match existing implementations

* refactor org to organization for consistency with other methods

* alter security task endpoint:
- remove "count" from variable naming
- update sproc naming

* remove enablement check

* replace orgId with organizationId
2025-08-13 08:23:22 -05:00
Thomas Rittson
9022ad2360 [PM-20140] Prevent accidental bulk removal of users without a Master Password (#6173) 2025-08-12 10:21:29 +10:00
Todd Martin
3c5de319d1 feat(2fa): [PM-24425] Add email on failed 2FA attempt
* Added email on failed 2FA attempt.

* Added tests.

* Adjusted email verbiage.

* Added feature flag.

* Undid accidental change.

* Undid unintentional change to clean up PR.

* Linting

* Added attempted method to email.

* Changes to email templates.

* Linting.

* Email format changes.

* Email formatting changes.
2025-08-11 16:39:43 -04:00
Vijay Oommen
5b67abba31 [PM-24641] Remove prompt Id from onyx requests (#6183) 2025-08-11 12:08:56 -05:00
Rui Tomé
e042572cfb [PM-24582] Bugfix: exclude admins and owners from default user collection creation on confirmation (#6177)
* Update the OrganizationUserController integration Confirm tests to handle the Owner type

* Refactor ConfirmOrganizationUserCommand to simplify side-effect handling in organization user confirmation.
Update IPolicyRequirementQuery to return eligible org user IDs for policy enforcement.
Update tests for method signature changes and default collection creation logic.
2025-08-11 16:36:40 +01:00
Github Actions
e88c9b3525 Bumped version to 2025.8.0 2025-08-11 14:28:57 +00:00
Rui Tomé
9d05105dc0 [PM-23981] Fix DefaultUserCollection filtering in organization user updates (#6161)
* Refactor UpdateOrganizationUserCommand to validate and filter out DefaultUserCollections during user updates.

* Enhance UpdateOrganizationUserCommandTests to filter out DefaultUserCollections during user updates, ensuring only shared collections are processed. Updated test logic to reflect new filtering behavior.

* Add integration test for updating organization user with existing default collection. The test verifies successful updates to user permissions, group access, and collection access, ensuring correct handling of shared and default collections.

* Refactor UpdateOrganizationUserCommand to separate the collection validation and DefaultUserCollection filtering

* Refactored integration test setup/assertion for clarity
2025-08-07 11:12:45 +01:00
Vijay Oommen
e61a5cc83a PM-24509 remove limit field (#6169) 2025-08-06 14:59:53 -05:00
Vince Grassia
d74c71c1d0 Fix attachments container (#6165) 2025-08-06 14:44:01 -04:00
Jared Snider
000d1f2f6e refactor(DeviceValidator): [Auth/PM-24362] Misc improvements (#6152)
* PM-24362 - DeviceValidator - (1) refactor name of NewDeviceOtpRequest --> RequestHasNewDeviceVerificationOtp (2) Move auth request rejection check above normal NDV check and remove auth request check from NDV check

* PM-24362 - Update DeviceValidatorTests + add new scenario
2025-08-06 10:18:57 -04:00
Vince Grassia
25a54b16f7 Fix Dockerfiles that had BUILDPLATFORM specified for App Stages (#6162) 2025-08-05 17:36:04 -04:00
Addison Beck
14899eb883 set version to 2025.7.3 (#6160) 2025-08-05 17:28:27 +00:00
Rui Tomé
7454430aa1 [PM-22241] Add DefaultUserCollectionName support to bulk organization user confirmation (#6153)
* Implement GetByOrganizationAsync method in PolicyRequirementQuery and add corresponding unit tests

* Refactor ConfirmOrganizationUserCommand for clarity and add bulk support

* Update ConfirmOrganizationUserCommandTests to use GetByOrganizationAsync for policy requirement queries

* Add DefaultUserCollectionName property to OrganizationUserBulkConfirmRequestModel with encryption attributes

* Update ConfirmUsersAsync method to include DefaultUserCollectionName parameter in OrganizationUsersController

* Add EnableOrganizationDataOwnershipPolicyAsync method to OrganizationTestHelpers

* Add integration tests for confirming organization users in OrganizationUserControllerTests

- Implemented Confirm_WithValidUser test to verify successful confirmation of a single user.
- Added BulkConfirm_WithValidUsers test to ensure multiple users can be confirmed successfully.

* Refactor organization user confirmation integration tests to also test when the organization data ownership policy is disabled

* Refactor ConfirmOrganizationUserCommand to consolidate confirmation side effects handling

- Replaced single and bulk confirmation side effect methods with a unified HandleConfirmationSideEffectsAsync method.
- Updated related logic to handle confirmed organization users more efficiently.
- Adjusted unit tests to reflect changes in the collection creation process for confirmed users.

* Refactor OrganizationUserControllerTests to simplify feature flag handling and consolidate test logic

- Removed redundant feature flag checks in Confirm and BulkConfirm tests.
- Updated tests to directly enable the Organization Data Ownership policy without conditional checks.
- Ensured verification of DefaultUserCollection for confirmed users remains intact.

* Refactor OrganizationUserControllerTests to enhance clarity and reduce redundancy

- Simplified user creation and confirmation logic in tests by introducing helper methods.
- Consolidated verification of confirmed users and their associated collections.
- Removed unnecessary comments and streamlined test flow for better readability.
2025-08-05 15:34:13 +01:00
Matt Andreko
11cc50af6e Update scan workflow to use centralized reusable component (#6127) 2025-08-05 09:50:36 -04:00
aj-bw
9081c205b1 [BRE-1058] fix alpine race condition (#6156)
* alpine race condition during shutdown fix

* change catch to only be for relevant task cancelled, added a debug log

* test commit for build and test

* remove testing comment
2025-08-05 09:20:54 -04:00
Github Actions
1c2bccdeff Bumped version to 2025.8.0 2025-08-04 17:26:39 +00:00
Stephon Brown
2908ddb759 [PM-22692] Fix Secrets Manager Seat and ServiceAccount Limit Bug (#6138)
* test: add new test harnesses

* feat: update autoscale limit logic for SM Subscription Command

* fix: remove redundant helper methods

* fix: add periods to second sentence of templates
2025-08-01 14:40:43 -04:00
Vijay Oommen
5485c12445 PM-24367 add personal_id to onyx api call (#6154) 2025-08-01 09:43:37 -05:00
Brant DeBow
ccedefb8b8 [PM-17562] Update logs to use custom categories (#6145)
* [PM-17562] Update logs to use custom categories

* Added tests to verify hardcoded names match the real type
2025-08-01 08:46:00 -04:00
Jimmy Vo
6f4a0c4a61 [PM-15052] Add RevokeOrganizationUserCommand (#6111) 2025-07-31 11:27:53 -04:00
Jimmy Vo
de13932ffe [PM-22108] Add PolicyDetails_ReadByOrganizationId proc (#6019) 2025-07-31 11:24:39 -04:00
Jimmy Vo
ff5659cc0f Add bulk default collection creation method (#6075) 2025-07-31 11:24:16 -04:00
Jared McCannon
86ce3a86e9 [PM-20452] - Offloading Stripe Update (#6034)
* Adding job to update stripe subscriptions and increment seat count  when inviting a user.

* Updating name

* Added ef migrations

* Fixing script

* Fixing procedures. Added repo tests.

* Fixed set stored procedure. Fixed parameter name.

* Added tests for database calls and updated stored procedures

* Fixed build for sql file.

* fixing sproc

* File is nullsafe

* Adding view to select from instead of table.

* Updating UpdateSubscriptionStatus to use a CTE and do all the updates in 1 statement.

* Setting revision date when incrementing seat count

* Added feature flag check for the background job.

* Fixing nullable property.

* Removing new table and just adding the column to org. Updating to query and command. Updated tests.

* Adding migration script rename

* Add SyncSeats to Org.sql def

* Adding contraint name

* Removing old table files.

* Added tests

* Upped the frequency to be at the top of every 3rd hour.

* Updating error message.

* Removing extension method

* Changed to GuidIdArray

* Added xml doc and switched class to record
2025-07-31 07:54:51 -05:00
Thomas Rittson
88dd977848 [PM-23921] [BEEEP] Add IOrganizationRequirements for each permission (#6105)
* Add BasePermissionRequirement and implement it for each permission

* Add tests
2025-07-31 11:22:06 +10:00
Thomas Rittson
cfcb24bbc9 Update swagger description (#6140) 2025-07-31 10:17:33 +10:00
Jared Snider
88463c1263 pm-24210-v3 (#6148) 2025-07-30 19:26:33 -04:00
aj-bw
574f7cba67 script syntax fix (#6146) 2025-07-30 15:48:03 -04:00
Jared Snider
64bf17684a pm-24210-v2 (#6144) 2025-07-30 14:23:01 -04:00
Ike
b5991776f4 pm-24208 (#6143)
* pm-24208
2025-07-30 12:49:48 -04:00