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

6083 Commits

Author SHA1 Message Date
Vijay Oommen
776f959813 [PM-24641] Remove prompt Id from onyx requests (#6183)
(cherry picked from commit 5b67abba31)
v2025.8.0
2025-08-13 13:06:29 -04:00
Todd Martin
3b23f45cba 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.

(cherry picked from commit 3c5de319d1)
2025-08-11 17:27:01 -04: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
Jared Snider
531af410f9 pm-24210 (#6142) 2025-07-30 12:18:27 -04:00
Rui Tomé
5816ed6600 [PM-23141] Fix: Users unable to edit ciphers after being confirmed into organization (#6097)
* Refactor ConfirmOrganizationUserCommand to push registration after DB save

* Assert device push registration handling in ConfirmOrganizationUserCommandTests
2025-07-30 12:00:48 +01:00
Ruyut
2b0a639b95 fix: remove the duplicate name field (#6133) 2025-07-30 09:28:51 +00:00
Brant DeBow
a84e5554fb [PM-17562] Refactor event integration methods / declarations in ServiceCollectionExtensions (#6118)
* [PM-17562] Refactor event integration methods / declarations in ServiceCollectionExtensions

* Refactored ServiceCollectionExtensions to use TryAdd and still launch unique listeneer services

* Updated unit tests to match new generic format for Listeners

* Fix method spacing

* Update README to reflect new integration setup in ServiceCollectionExtensions

* Move interfaces to I prefix; fix typo in subscription

* Fix reference to IIntegrationListenerConfiguration
2025-07-29 11:22:21 -04:00
Rui Tomé
43372b7168 [PM-20010] Fix purge logic to skip claimed user check for organization vault (#6107)
* Implement unit tests for PostPurge method in CiphersController to handle various scenarios

* Refactor PostPurge method in CiphersController to use Guid for organizationId parameter and update related unit tests

* Refactor PostPurge method in CiphersController to skip checking if user is claimed if its purging the org vault
2025-07-29 16:17:16 +01:00
aj-bw
47237fa88f add missing tzdata library (#6136) 2025-07-29 10:41:03 -04:00
Rui Tomé
b00e689ff6 [PM-22558] Update IOrganizationUserRepository.ReplaceAsync to preserve existing access to collections of the type DefaultUserCollection (#6037)
* feat: exclude DefaultUserCollection from GetManyByOrganizationIdWithPermissionsAsync

Updated EF implementation, SQL procedure, and unit test to verify that default user collections are filtered from results

* Update the public CollectionsController.Get method to return a NotFoundResult for collections of type DefaultUserCollection.

* Add unit tests for the public CollectionsController

* Update ICollectionRepository.GetManyByOrganizationIdAsync to exclude results of the type DefaultUserCollection

Modified the SQL stored procedure and the EF query to reflect this change and added a new integration test to ensure the functionality works as expected.

* Refactor CollectionsController to remove unused IApplicationCacheService dependency

* Update IOrganizationUserRepository.GetDetailsByIdWithCollectionsAsync to exclude DefaultUserCollections

* Update IOrganizationUserRepository.GetManyDetailsByOrganizationAsync to exclude DefaultUserCollections

* Undo change to GetByIdWithCollectionsAsync

* Update integration test to verify exclusion of DefaultUserCollection in OrganizationUserRepository.GetDetailsByIdWithCollectionsAsync

* Clarify documentation in ICollectionRepository to specify that GetManyByOrganizationIdWithAccessAsync returns only shared collections belonging to the organization.

* Update IOrganizationUserRepository.ReplaceAsync to preserve existing access to collections of the type DefaultUserCollection
2025-07-29 15:04:45 +01:00
Rui Tomé
6dea40c868 [PM-23987] Fix saving to default collections by updating collection lookup (#6122)
* Refactor ICollectionRepository.GetManyByOrganizationIdAsync logic to include default user collections

* Add stored procedure Collection_ReadSharedCollectionsByOrganizationId to retrieve collections by organization ID, excluding default user collections.

* Add GetManySharedCollectionsByOrganizationIdAsync method to ICollectionRepository and its implementations to retrieve collections excluding default user collections.

* Add unit test for GetManySharedCollectionsByOrganizationIdAsync method in CollectionRepositoryTests to verify retrieval of collections excluding default user collections.

* Refactor controllers to use GetManySharedCollectionsByOrganizationIdAsync for retrieving shared collections

* Update unit tests to use GetManySharedCollectionsByOrganizationIdAsync for verifying shared collections retrieval

* Revert CiphersController.CanEditItemsInCollections to use GetManyByOrganizationIdAsync for retrieving organization collections

* Update stored procedures to retrieve only DefaultUserCollection by modifying the WHERE clause in Collection_ReadSharedCollectionsByOrganizationId.sql and its corresponding migration script.

* Update EF CollectionRepository.GetManySharedCollectionsByOrganizationIdAsync to filter collections by SharedCollection

* Update OrganizationUserRepository.GetManyDetailsByOrganizationAsync_vNext to only include Shared collections

* Update comments in stored procedure and migration script to clarify filtering for SharedCollections only
2025-07-29 15:04:00 +01:00
Rui Tomé
52ef3ef7a5 [PM-19195] Remove deprecated stored procedures (#6128) 2025-07-29 14:22:09 +01:00
aj-bw
3f508cd43b add read actions (#6137) 2025-07-29 11:58:17 +02:00
renovate[bot]
df61bd5ccd [deps] Tools: Update aws-sdk-net monorepo (#6131)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-29 11:25:44 +02:00
Maciej Zieniuk
abfb3a27b1 [PM-23242] Added UserDecryption with MasterPasswordUnlock as part of /sync response (#6102)
* Added MasterPasswordUnlock to UserDecryptionOptions as part of identity response

* Added UserDecryption with MasterPasswordUnlock as part of /sync response
2025-07-28 09:38:15 -07:00
Maciej Zieniuk
59e7bc7438 Added MasterPasswordUnlock to UserDecryptionOptions as part of identity response (#6093) 2025-07-28 17:34:42 +02:00
aj-bw
d407c164b6 BRE-917 Update to Alpine base (#5976)
* testing-wolfi

* testing alpine

* fix gosu download

* fix Admin dockerfile

* update dockerfiles

* alpine-compatible-entrypoint-script-for-api-test

* make-entrypoint-scripts-alpine-compatible

* testing nginx with alpine

* cleaning up comments from dockerfile from testing

* restore accidentally deleted icon

* remove unused file

* pin alpine, update apk add no cache

* remove comments from testing

* test shadow implementtaion for entrypoints

* add shadow package, revert entrypoints, change from bash to shell for entry

* add icu to setup container, update helpers to use shell

* update migrator utility

* add missing krb5 libraries
2025-07-28 10:56:20 -04:00
Alex Morask
db4beb47f7 Enable disabled provider on successful update payment method invocation (#6129) 2025-07-28 09:26:11 -05:00
Github Actions
cff34b9194 Bumped version to 2025.7.2 2025-07-28 14:21:49 +00:00
Justin Baur
7e80e01747 [PM-21948] Warn on deprecated logging methods (#6101)
* Add warnings and scaffold tests

* Do some private reflection

* Add tests for warnings

* Add explainer comment

* Remove Reference to Azure CosmosDb Sink

* Don't warn on old file location

* Update test names

* Add syslog test

* dotnet format

* Add lazy syslog fix

* Add longer wait for file

* Make syslog test local only

* Switch to shortened URL
2025-07-25 17:44:51 -04:00
Brandon Treston
04d66a54a4 register MasterPasswordPolicyRequirementFactory (#6125) 2025-07-25 15:55:34 +00:00
Brandon Treston
571111e897 [PM-18239] Master password policy requirement (#5936)
* wip

* initial implementation

* add tests

* more tests, fix policy Enabled

* remove exempt statuses

* test EnforcedOptions is populated

* clean up, add test

* fix test, add json attributes for deserialization

* fix attribute casing

* fix test

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2025-07-25 10:14:16 -04:00
Alex Morask
c503ecbefc [PM-21827] Implement mechanism to suspend currently unpaid providers (#6119)
* Manually suspend provider and set cancel_at when we receive 'suspend_provider' metadata update

* Run dotnet format'
2025-07-24 11:50:09 -05:00
Ike
05398ad8a4 [PM-22736] Send password hasher (#6112)
* feat: 
  - Add SendPasswordHasher class and interface
  - DI for SendPasswordHasher to use Marker class allowing us to use custom options for the SendPasswordHasher without impacting other PasswordHashers.
* test: Unit tests for SendPasswordHasher implementation
* doc: docs for interface and comments

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
2025-07-24 12:49:15 -04:00
Stephon Brown
76d1a2e875 [PM-23287] Enable Provider When Subscription Is Paid (#6113)
* test : add tests for provider update

* feat: add provider update logic and dependencies

* fix: remove duplicate dependencies

* refactor: updated switch logic for helper method

* test: add feature flag to tests

* feat: add feature flag for changes
2025-07-24 11:46:16 -04:00
cyprain-okeke
2cf7208eb3 [PM 21897]Add Manual Enable/Disable Override for Providers in Admin Portal (#6072)
* Add the changes for the enable provider

* remove the wanted permission added

* Added a unit testing for the updateAsync
2025-07-24 16:12:25 +01:00
Alex Morask
2d1f914eae [PM-24067] Check for unverified bank account in free trial / inactive subscription warning (#6117)
* [NO LOGIC] Move query to core

* Check for unverified bank account in free trial and inactive subscription warnings

* Run dotnet format

* fix test

* Run dotnet format

* Remove errant file
2025-07-24 09:59:23 -05:00