1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-31 23:21:22 +01:00
Commit Graph

784 Commits

Author SHA1 Message Date
Bernd Schoolmann
0716858212
Merge branch 'main' into km/userkey-rotation-v2 2025-01-31 19:49:57 +01:00
Bernd Schoolmann
49a6a82894
Fix tests 2025-01-31 19:38:40 +01:00
Justin Baur
408ddd9388
Scaffold Events Integration Tests (#5355)
* Scaffold Events Integration Tests

* Format
2025-01-31 11:08:07 -05:00
Jimmy Vo
bd394eabe9
[pm-16528] Fix entity framework query (#5333) 2025-01-31 09:50:14 -06:00
Todd Martin
e43a8011f1
[PM-17709] Send New Device Login email for all new devices (#5340)
* Send New Device Login email regardless of New Device Verification

* Adjusted tests

* Linting

* Clarified test names.
2025-01-31 10:46:09 -05:00
Bernd Schoolmann
b8e8d27e75
Fix formatting 2025-01-31 12:49:58 +01:00
Bernd Schoolmann
159cb21c69
Merge branch 'main' into km/userkey-rotation-v2 2025-01-31 12:30:00 +01:00
Bernd Schoolmann
39bb255b02
Update test/Core.Test/KeyManagement/UserKey/RotateUserAccountKeysCommandTests.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2025-01-31 12:29:49 +01:00
Bernd Schoolmann
0ca2caa7cf
Add tests for invalid kdf types 2025-01-31 12:28:26 +01:00
renovate[bot]
23dce58103
[deps] Billing: Update xunit to 2.9.3 (#5289)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-30 10:58:14 -05:00
Bernd Schoolmann
8f9252decb
Merge branch 'main' into km/userkey-rotation-v2 2025-01-30 16:01:14 +01:00
Bernd Schoolmann
e95e4a20e6
Improve test 2025-01-30 15:05:01 +01:00
Bernd Schoolmann
09587622f4
Add EF test 2025-01-30 14:18:18 +01:00
Bernd Schoolmann
0567da745c
Add tests 2025-01-29 19:31:19 +01:00
Bernd Schoolmann
f462ef2ab5
Fix test 2025-01-29 15:47:33 +01:00
Bernd Schoolmann
2495d07a21
Add tests and enable nullable on masterpasswordunlockdatamodel 2025-01-29 15:17:51 +01:00
Bernd Schoolmann
b96bfadf38
Merge branch 'km/userkey-rotation-v2' of github.com:bitwarden/server into km/userkey-rotation-v2 2025-01-29 14:03:43 +01:00
Jimmy Vo
6d7bdb6ec0
Ac/pm 17217/add use policy check for accept endpoint(#5324) 2025-01-28 12:23:15 -05:00
Bernd Schoolmann
2fe3c27b0b
Remove whitespace 2025-01-28 14:03:54 +01:00
Bernd Schoolmann
58b984f5f2
Merge branch 'main' into km/userkey-rotation-v2 2025-01-28 12:30:04 +01:00
Bernd Schoolmann
a9391328a3
Fix test 2025-01-28 12:20:46 +01:00
Bernd Schoolmann
cd40987ca6
Add tests 2025-01-28 11:59:38 +01:00
Bernd Schoolmann
4b7667a45f
Improve test 2025-01-28 11:54:06 +01:00
Bernd Schoolmann
ff44902fe1
Update tests 2025-01-27 20:27:01 +01:00
Bernd Schoolmann
ba489dbdbe
Cleanup 2025-01-27 18:41:42 +01:00
Bernd Schoolmann
26175b71e8
Update request models 2025-01-27 18:39:46 +01:00
renovate[bot]
5310f63514
[deps] Billing: Update coverlet.collector to 6.0.4 (#5219)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com>
2025-01-27 09:17:18 -05:00
Bernd Schoolmann
5dd74dbcb3
Implement userkey rotation v2 2025-01-27 14:49:35 +01:00
Rui Tomé
9e718d7336
[PM-15637] Add Email Notification Templates and Logic for Device Approval Requests (#5270)
* Add device approval notification email templates

* Add DeviceApprovalRequestedViewModel for device approval notifications

* Add method to send device approval requested notification email

* Send email notification to Organization Admins when adding a new admin approval auth request

* Add tests for device approval notification email sending in AuthRequestServiceTests

* fix(email-templates): Remove unnecessary triple braces from user name variable in device approval notification emails

* Add feature flag for admin notifications on device approval requests

* Add logging for skipped admin notifications on device approval requests
2025-01-27 10:59:46 +00:00
Rui Tomé
3908edd08f
[PM-12489] Extract OrganizationService.DeleteAsync and OrganizationService.InitiateDeleteAsync into commands (#5279)
* Create organization deletion command with logic extracted from OrganizationService

* Add unit tests for OrganizationDeleteCommand

* Register OrganizationDeleteCommand for dependency injection

* Refactor organization deletion logic to use IOrganizationDeleteCommand and remove legacy IOrganizationService.DeleteAsync method

* Add organization deletion initiation command and refactor service usage

* Enhance organization deletion commands with detailed XML documentation

* Refactor organization command registration to include sign-up and deletion methods
2025-01-27 10:58:08 +00:00
Alex Morask
f140c7f6c1
[PM-11730] Remove feature flag: AC-2476-deprecate-stripe-sources-api (#5201)
* Removed feature flag

* Run dotnet format

* Fix integration tests
2025-01-24 13:38:35 -05:00
Graham Walker
99a1dbbe02
PM-16261 move ImportCiphersAsync to the tools team (#5245)
* PM-16261 move ImportCiphersAsync to the tools team and create services using CQRS design pattern

* PM-16261 fix renaming methods and add unit tests for succes and bad request exception

* PM-16261 clean up old code from test
2025-01-24 10:57:44 -06:00
Patrick-Pimentel-Bitwarden
275f7ceb27
Auth/pm 17233/tests for multiple users on single device for web approvals (#5316)
* test(test-device-repository): [PM-17233] Add Test Case for Critical Bug Found in Device Repository - Added new test case for previously found bug.
2025-01-23 11:21:28 -05:00
renovate[bot]
e8cd86e5f6
[deps] Billing: Update xunit.runner.visualstudio to v3 (#5183)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
2025-01-23 12:51:57 +01:00
Rui Tomé
edb74add50
[PM-14243] Free organization limit is not enforced when editing user (#5155)
* Enforce free organization limit when updating user

* Add test for throwing error on accepting admin user joining multiple free organizations

* Add test for throwing BadRequest when free organization admin attempts to sign up for another free organization

* Fix user ID handling in UpdateOrganizationUserCommand for free organizations

* Rename parameter 'user' to 'organizationUser' in UpdateUserAsync method for clarity
2025-01-21 10:15:02 +00:00
Rui Tomé
04e5626c57
[PM-16777] Fix exception when bulk restoring revoked users who never accepted invitations (#5224)
* Fix null handling for UserId in Two Factor Authentication checks

* Add tests for restoring users with and without 2FA policies
2025-01-20 14:59:10 +00:00
Thomas Rittson
0c29e9227c
Remove provider-export-permission feature flag (#5263)
* also remove old CipherService and CollectionService methods
  only used by old export code
2025-01-17 08:28:23 +10:00
Jonas Hendrickx
cc2128c97a
[PM-16979] Avoid returning BillingTaxIdTypeInterferenceError when an … (#5252)
* [PM-16979] Avoid returning BillingTaxIdTypeInterferenceError when an empty tax id string is passed

* tests

* fix tests
2025-01-15 10:05:27 -05:00
Kyle Spearrin
aa0b35a345
[PM-15608] Create more KDF defaults for prelogin (#5122)
* kdf defaults on null map to email hash

* cleanup code. add some randomness as well

* remove null check

* fix test

* move to private method

* remove random options

* tests for random defaults

* SetDefaultKdfHmacKey for old test
2025-01-10 15:54:53 -05:00
Jared McCannon
730f83b425
Fixing misspelling. made changes to domain claim email. (#5248) 2025-01-10 14:19:52 -06:00
Jonas Hendrickx
45d2c5315d
[PM-14894] Drop Tax Rate tables - Stage 1 (#5236) 2025-01-10 16:39:02 +01:00
Rui Tomé
fbfabf2651
[PM-15547] Fix two-factor authentication revocation logic and update related tests (#5246)
* Fix two-factor authentication revocation logic and update related tests

* Refine test for RevokeNonCompliantOrganizationUserCommand to assert single user revocation
2025-01-10 14:45:09 +00:00
Bernd Schoolmann
8a68f075cc
Remove block legacy users feature flag (#5212) 2025-01-10 11:55:40 +01:00
Ike
ce2ecf9da0
[PM-12995] Create UI elements for New Device Verification in Admin Portal (#5165)
* feat(NewDeviceVerification) :
- Added constant to constants in Bit.Core because the cache key format needs to be shared between the Identity Server and the MVC project Admin.
- Updated DeviceValidator class to handle checking cache for user information to allow pass through.
- Updated and Added tests to handle new flow.
- Adding exception flow to admin project. Added tests for new methods in UserService.
2025-01-09 18:10:54 -08:00
Maciej Zieniuk
1988f1402e
Repeating pattern values for BitAutoData attribute (#5167)
* Repeating pattern values for BitAutoData attribute

* nullable enabled, added documentation

* execute test method even if no repeating pattern data provided (empty array).

* RepeatingPatternBitAutoDataAttribute unit tests
2025-01-10 00:43:24 +01:00
Shane Melton
0605590ed2
[PM-14380] Add GET /tasks/organization endpoint (#5149)
* [PM-14380] Add GetManyByOrganizationIdStatusAsync to SecurityTaskRepository

* [PM-14380] Introduce IGetTasksForOrganizationQuery

* [PM-14380] Add /tasks/organization endpoint

* [PM-14380] Add unit tests

* [PM-14380] Formatting

* [PM-14380] Bump migration script date

* [PM-14380] Bump migration script date
2025-01-09 12:40:12 -08:00
Shane Melton
a99f82dddd
[PM-14378] SecurityTask Authorization Handler (#5039)
* [PM-14378] Introduce GetCipherPermissionsForOrganization query for Dapper CipherRepository

* [PM-14378] Introduce GetCipherPermissionsForOrganization method for Entity Framework

* [PM-14378] Add integration tests for new repository method

* [PM-14378] Introduce IGetCipherPermissionsForUserQuery CQRS query

* [PM-14378] Introduce SecurityTaskOperationRequirement

* [PM-14378] Introduce SecurityTaskAuthorizationHandler.cs

* [PM-14378] Introduce SecurityTaskOrganizationAuthorizationHandler.cs

* [PM-14378] Register new authorization handlers

* [PM-14378] Formatting

* [PM-14378] Add unit tests for GetCipherPermissionsForUserQuery

* [PM-15378] Cleanup SecurityTaskAuthorizationHandler and add tests

* [PM-14378] Add tests for SecurityTaskOrganizationAuthorizationHandler

* [PM-14378] Formatting

* [PM-14378] Update date in migration file

* [PM-14378] Add missing awaits

* [PM-14378] Bump migration script date

* [PM-14378] Remove Unassigned property from OrganizationCipherPermission as it was making the query too complicated

* [PM-14378] Update sproc to use Union All to improve query performance

* [PM-14378] Bump migration script date
2025-01-09 12:14:24 -08:00
Jared McCannon
fd195e7cf3
Forgot to remove compliant users from the list. (#5241) 2025-01-09 14:13:29 -06:00
Conner Turnbull
6771f79597
Updated LicensingService to be a singleton again and moved IFeatureService up a frame in the call stack (#5238) 2025-01-09 12:40:16 -05:00
Jared McCannon
e754ae4729
[PM-10319] - Send 2FA Email when policy enabled (#5233)
* Correcting which email is sent when enabling 2FA policy.

* Fixing the test.
2025-01-09 09:35:40 -06:00