cd-bitwarden
2bca8b1f07
Updating SM to Sm, and adding more view refreshes
2025-11-05 21:50:36 -05:00
cd-bitwarden
7db2a840e6
Merge branch 'main' into SM-1571-DisableSMAdsForUsers
2025-10-28 14:10:57 -04:00
Oscar Hinton
653de07bd7
[PM-23493] Generic mailer proposal ( #5958 )
...
This implements a new Mailer service which supersedes the `HandlebarsMailService`. It allows teams to create emails without having to extend a generic service.
The `IMailer` only contains a single method, `SendEmail`, which sends an instance of `BaseMail`.
2025-10-28 15:55:36 +01:00
Alex Morask
62a0936c2e
[PM-25183] Update the BitPay purchasing procedure ( #6396 )
...
* Revise BitPay controller
* Run dotnet format
* Kyle's feedback
* Run dotnet format
* Temporary logging
* Whoops
* Undo temporary logging
2025-10-28 09:31:59 -05:00
Stephon Brown
ff4b3eb9e5
[PM-27123] Account Credit not Showing for Premium Upgrade Payment ( #6484 )
...
* feat(billing): add PaymentMethod union
* feat(billing): add nontokenized payment method
* feat(billing): add validation for tokinized and nontokenized payments
* feat(billing): update and add payment method requests
* feat(billing): update command with new union object
* test(billing): add tests for account credit for user.
* feat(billing): update premium cloud hosted subscription request
* fix(billing): dotnet format
* tests(billing): include payment method tests
* fix(billing): clean up tests and converter method
2025-10-23 14:47:23 -04:00
cd-bitwarden
7c930b7294
Merge branch 'main' into SM-1571-DisableSMAdsForUsers
2025-10-23 10:00:46 -04:00
Brant DeBow
69f0464e05
Refactor Azure Service Bus to use the organization id as a partition key ( #6477 )
...
* Refactored Azure Service Bus to use the organization id as a partition key
* Use null for partition key instead of empty string when organization id is null
2025-10-23 08:08:09 -04:00
Nik Gilmore
76de64263c
[PM-22992] Check cipher revision date when handling attachments ( #6451 )
...
* Add lastKnownRevisionDate to Attachment functions
* Add lastKnownRevisionDate to attachment endpoints
* Change lastKnownCipherRevisionDate to lastKnownRevisionDate for consistency
* Add tests for RevisionDate checks in Attachment endpoints
* Improve validation on lastKnownRevisionDate
* Harden datetime parsing
* Rename ValidateCipherLastKnownRevisionDate - removed 'Async' suffix
* Cleanup and address PR feedback
2025-10-22 16:19:43 -07:00
cd-bitwarden
69b8586081
Merge branch 'main' into SM-1571-DisableSMAdsForUsers
2025-10-22 17:13:43 -04:00
Alex Morask
6a3fc08957
[PM-26793] Fetch premium plan from pricing service ( #6450 )
...
* Fetch premium plan from pricing service
* Run dotnet format
2025-10-22 14:13:16 -05:00
Stephon Brown
0a7e6ae3ca
Billing/pm 27217/update secrets manager test fix ( #6478 )
...
* fix(billing): Add comments for clarity
* fix(billing): Update generated properties for test
2025-10-22 13:42:56 -04:00
cd-bitwarden
f2388e6dc1
Merge branch 'main' into SM-1571-DisableSMAdsForUsers
2025-10-22 12:28:04 -04:00
cd-bitwarden
1f1b1037a4
Adding new item to organization license
2025-10-22 12:07:01 -04:00
Rui Tomé
3866bc5155
[PM-23134] Update PolicyDetails sprocs for performance ( #6421 )
...
* Add integration tests for GetByUserIdWithPolicyDetailsAsync in OrganizationUserRepository
- Implemented multiple test cases to verify the behavior of GetByUserIdWithPolicyDetailsAsync for different user statuses (Confirmed, Accepted, Invited, Revoked).
- Ensured that the method returns correct policy details based on user status and organization.
- Added tests for scenarios with multiple organizations and non-existing policy types.
- Included checks for provider users and custom user permissions.
These tests enhance coverage and ensure the correctness of policy retrieval logic.
* Add UserProviderAccessView to identify which organizations a user can access as a provider
* Refactor PolicyDetails_ReadByUserId stored procedure to improve user access logic
- Introduced a Common Table Expression (CTE) for organization users to streamline the selection process based on user status and email.
- Added a CTE for providers to enhance clarity and maintainability.
- Updated the main query to utilize the new CTEs, improving readability and performance.
- Ensured that the procedure correctly identifies provider access based on user permissions.
* Refactor OrganizationUser_ReadByUserIdWithPolicyDetails stored procedure to enhance user access logic
- Introduced a Common Table Expression (CTE) for organization users to improve selection based on user status and email.
- Updated the main query to utilize the new CTEs, enhancing readability and performance.
- Adjusted the logic for identifying provider access to ensure accurate policy retrieval based on user permissions.
* Add new SQL migration script to refactor policy details queries
- Created a new view, UserProviderAccessView, to streamline user access to provider organizations.
- Introduced two stored procedures: PolicyDetails_ReadByUserId and OrganizationUser_ReadByUserIdWithPolicyDetails, enhancing the logic for retrieving policy details based on user ID and policy type.
- Utilized Common Table Expressions (CTEs) to improve query readability and performance, ensuring accurate policy retrieval based on user permissions and organization status.
* Remove GetPolicyDetailsByUserIdTests
* Refactor PolicyRequirementQuery to use GetPolicyDetailsByUserIdsAndPolicyType and update unit tests
* Remove GetPolicyDetailsByUserId method from IPolicyRepository and its implementations in PolicyRepository classes
* Revert changes to PolicyDetails_ReadByUserId stored procedure
* Refactor OrganizationUser_ReadByUserIdWithPolicyDetails stored procedure to use UNION instead of OR
* Reduce UserEmail variable size from NVARCHAR(320) to NVARCHAR(256) for consistency in stored procedures
* Bump date on migration script
2025-10-22 13:20:53 +01:00
Alex Morask
9c51c9971b
[PM-21638] Stripe .NET v48 ( #6202 )
...
* Upgrade Stripe.net to v48.4.0
* Update PreviewTaxAmountCommand
* Remove unused UpcomingInvoiceOptionExtensions
* Added SubscriptionExtensions with GetCurrentPeriodEnd
* Update PremiumUserBillingService
* Update OrganizationBillingService
* Update GetOrganizationWarningsQuery
* Update BillingHistoryInfo
* Update SubscriptionInfo
* Remove unused Sql Billing folder
* Update StripeAdapter
* Update StripePaymentService
* Update InvoiceCreatedHandler
* Update PaymentFailedHandler
* Update PaymentSucceededHandler
* Update ProviderEventService
* Update StripeEventUtilityService
* Update SubscriptionDeletedHandler
* Update SubscriptionUpdatedHandler
* Update UpcomingInvoiceHandler
* Update ProviderSubscriptionResponse
* Remove unused Stripe Subscriptions Admin Tool
* Update RemoveOrganizationFromProviderCommand
* Update ProviderBillingService
* Update RemoveOrganizatinoFromProviderCommandTests
* Update PreviewTaxAmountCommandTests
* Update GetCloudOrganizationLicenseQueryTests
* Update GetOrganizationWarningsQueryTests
* Update StripePaymentServiceTests
* Update ProviderBillingControllerTests
* Update ProviderEventServiceTests
* Update SubscriptionDeletedHandlerTests
* Update SubscriptionUpdatedHandlerTests
* Resolve Billing test failures
I completely removed tests for the StripeEventService as they were using a system I setup a while back that read JSON files of the Stripe event structure. I did not anticipate how frequently these structures would change with each API version and the cost of trying to update these specific JSON files to test a very static data retrieval service far outweigh the benefit.
* Resolve Core test failures
* Run dotnet format
* Remove unused provider migration
* Fixed failing tests
* Run dotnet format
* Replace the old webhook secret key with new one (#6223 )
* Fix compilation failures in additions
* Run dotnet format
* Bump Stripe API version
* Fix recent addition: CreatePremiumCloudHostedSubscriptionCommand
* Fix new code in main according to Stripe update
* Fix InvoiceExtensions
* Bump SDK version to match API Version
* Fix provider invoice generation validation
* More QA fixes
* Fix tests
* QA defect resolutions
* QA defect resolutions
* Run dotnet format
* Fix tests
---------
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com >
2025-10-21 14:07:55 -05:00
Maciej Zieniuk
6324f692b8
[PM-23249] Prevent log-out when changing KDF settings ( #6349 )
...
* Prevent log-out when changing KDF settings with feature flag.
* validate salt unchanged for user to throw bad request (400), not internal server error (500)
* change kdf integration tests
* failing tests
* iuncorrect tests wording
* conditional logout
* log out reason as enum
* explicit naming
2025-10-21 19:03:25 +02:00
Justin Baur
c6f1acede9
[BEEEP] Fix all CA2254 occurrences ( #6357 )
...
* Fix all CA2254 occurrences
* Fix tests
2025-10-20 11:34:31 -04:00
Jared McCannon
dbce45291c
[PM-26361] Add User Auto Confirmation ( #6436 )
...
* Adding AutoConfrim and migrations.
* Add value to Admin Page and update sproc to correct name.
* Correcting license constant.
* Adding feature check back in.
* Fixing sprocs :face_palm:
* Remove Coalesce
* Adding property to plan and model constructor
* Correcting name of column. Cascading change throughout. Updating response models. Updating sprocs and views. Updating migrations
* fixing sproc
* Fixing up license stuff.
* Updating org view
* Code review changes and renames :face_palm:
* Refershing additional views
* Last two fixes.
2025-10-20 07:27:18 -05:00
Bernd Schoolmann
4bf7cf956b
[PM-21034] Feature Branch - "User Crypto V2" ( #5982 )
...
* [PM-21034] Database changes for signature keypairs (#5906 )
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Drop view if exists
* Enable nullable
* Replace with create or alter view
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Rename dbset to plural
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* [PM-21034] Implement api changes to retreive signing keys (#5932 )
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Add initial get keys endpoint
* Add sync response
* Cleanup
* Add query and fix types
* Add tests and cleanup
* Fix test
* Drop view if exists
* Add km queries
* Cleanup
* Enable nullable
* Cleanup
* Cleanup
* Enable nullable
* Fix incorrect namespace
* Remove unused using
* Fix test build
* Fix build error
* Fix build
* Attempt to fix tests
* Attempt to fix tests
* Replace with create or alter view
* Attempt to fix tests
* Attempt to fix build
* Rename to include async suffix
* Fix test
* Rename repo
* Attempt to fix tests
* Cleanup
* Test
* Undo test
* Fix tests
* Fix test
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Fix build
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Rename dbset to plural
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Cleanup and move query to core
* Fix test
* Fix build
* Fix tests
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Switch away from primary constructor
* Use argumentNullException
* Add test
* Pass user account keys directly to profileresponsemodel
* Move registration to core
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Remove empty line
* Apply suggestions
* Fix tests
* Fix tests
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* [PM-22384] Implement key-rotation based enrollment to user-crypto v2 (#5934 )
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Add initial get keys endpoint
* Add sync response
* Cleanup
* Add query and fix types
* Add tests and cleanup
* Fix test
* Drop view if exists
* Add km queries
* Cleanup
* Enable nullable
* Cleanup
* Cleanup
* Enable nullable
* Fix incorrect namespace
* Remove unused using
* Fix test build
* Fix build error
* Fix build
* Attempt to fix tests
* Attempt to fix tests
* Replace with create or alter view
* Attempt to fix tests
* Attempt to fix build
* Rename to include async suffix
* Fix test
* Rename repo
* Attempt to fix tests
* Cleanup
* Test
* Undo test
* Fix tests
* Fix test
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Fix build
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Cleanup
* Add migration to user encryption v2
* Fix build
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Rename dbset to plural
* Cleanup
* Cleanup
* Fix build
* Fix test
* Add validation
* Fix test
* Apply fixes
* Fix tests
* Improve tests
* Add tests
* Add error message validation
* Fix tests
* Fix tests
* Fix test
* Add test
* Fix tests and errors
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Cleanup and move query to core
* Fix test
* Fix build
* Fix tests
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Switch away from primary constructor
* Use argumentNullException
* Add test
* Pass user account keys directly to profileresponsemodel
* Fix build
* Fix namespace
* Make signedpublickey optional
* Remove unused file
* Fix cases for request data conversion
* Revert constructor change
* Undo comments change
* Apply fixes
* Move registration to core
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Remove empty line
* Apply suggestions
* Fix tests
* Fix tests
* Fix build of integration tests
* Attempt to fix tests
* Add test
* Move v2 encryption user async below public functions
* Add todo
* Rename to have async suffix
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Address feedback
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Add test coverage
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Split up validation from rotation
* Fix tests
* Increase test coverage
* Rename tests
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Add test for no signature keypair data
* Fix build
* Enable nullable
* Fix build
* Clean up data model
* Fix tests
* Cleanup
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Fix build
* [PM-22862] Account security version (#5995 )
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Add initial get keys endpoint
* Add sync response
* Cleanup
* Add query and fix types
* Add tests and cleanup
* Fix test
* Drop view if exists
* Add km queries
* Cleanup
* Enable nullable
* Cleanup
* Cleanup
* Enable nullable
* Fix incorrect namespace
* Remove unused using
* Fix test build
* Fix build error
* Fix build
* Attempt to fix tests
* Attempt to fix tests
* Replace with create or alter view
* Attempt to fix tests
* Attempt to fix build
* Rename to include async suffix
* Fix test
* Rename repo
* Attempt to fix tests
* Cleanup
* Test
* Undo test
* Fix tests
* Fix test
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Fix build
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Cleanup
* Add migration to user encryption v2
* Fix build
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Rename dbset to plural
* Cleanup
* Cleanup
* Fix build
* Fix test
* Add validation
* Fix test
* Apply fixes
* Fix tests
* Improve tests
* Add tests
* Add error message validation
* Fix tests
* Fix tests
* Fix test
* Add test
* Fix tests and errors
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Cleanup and move query to core
* Fix test
* Fix build
* Fix tests
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Switch away from primary constructor
* Use argumentNullException
* Add test
* Pass user account keys directly to profileresponsemodel
* Fix build
* Fix namespace
* Make signedpublickey optional
* Remove unused file
* Fix cases for request data conversion
* Revert constructor change
* Undo comments change
* Apply fixes
* Move registration to core
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Remove empty line
* Apply suggestions
* Fix tests
* Fix tests
* Fix build of integration tests
* Attempt to fix tests
* Add test
* Move v2 encryption user async below public functions
* Add todo
* Rename to have async suffix
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Address feedback
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Add test coverage
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Split up validation from rotation
* Fix tests
* Increase test coverage
* Rename tests
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Add test for no signature keypair data
* Fix build
* Enable nullable
* Fix build
* Clean up data model
* Fix tests
* Merge branch 'km/signing-upgrade-rotation' into km/account-security-version
* Add security state to rotation
* Update tests
* Update tests and check for security state in v2 model
* Cleanup
* Add tests
* Add security state data to integration test
* Re-sort and remove limit
* Update migrations
* Fix sql
* Fix sql
* Fix sql
* Fix fixture
* Fix test
* Fix test
* Fix test
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* [PM-22853] Add feature flag (#6090 )
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Add initial get keys endpoint
* Add sync response
* Cleanup
* Add query and fix types
* Add tests and cleanup
* Fix test
* Drop view if exists
* Add km queries
* Cleanup
* Enable nullable
* Cleanup
* Cleanup
* Enable nullable
* Fix incorrect namespace
* Remove unused using
* Fix test build
* Fix build error
* Fix build
* Attempt to fix tests
* Attempt to fix tests
* Replace with create or alter view
* Attempt to fix tests
* Attempt to fix build
* Rename to include async suffix
* Fix test
* Rename repo
* Attempt to fix tests
* Cleanup
* Test
* Undo test
* Fix tests
* Fix test
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Fix build
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Cleanup
* Add migration to user encryption v2
* Fix build
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Rename dbset to plural
* Cleanup
* Cleanup
* Fix build
* Fix test
* Add validation
* Fix test
* Apply fixes
* Fix tests
* Improve tests
* Add tests
* Add error message validation
* Fix tests
* Fix tests
* Fix test
* Add test
* Fix tests and errors
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Cleanup and move query to core
* Fix test
* Fix build
* Fix tests
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Switch away from primary constructor
* Use argumentNullException
* Add test
* Pass user account keys directly to profileresponsemodel
* Fix build
* Fix namespace
* Make signedpublickey optional
* Remove unused file
* Fix cases for request data conversion
* Revert constructor change
* Undo comments change
* Apply fixes
* Move registration to core
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Remove empty line
* Apply suggestions
* Fix tests
* Fix tests
* Fix build of integration tests
* Attempt to fix tests
* Add test
* Move v2 encryption user async below public functions
* Add todo
* Rename to have async suffix
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Address feedback
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Add test coverage
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Split up validation from rotation
* Fix tests
* Increase test coverage
* Rename tests
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Add test for no signature keypair data
* Fix build
* Enable nullable
* Fix build
* Clean up data model
* Fix tests
* Merge branch 'km/signing-upgrade-rotation' into km/account-security-version
* Add security state to rotation
* Update tests
* Add feature flag
* Update tests and check for security state in v2 model
* Cleanup
* Add tests
* Add security state data to integration test
* Re-sort and remove limit
* Update migrations
* Fix sql
* Fix sql
* Fix sql
* Fix fixture
* Fix test
* Fix test
* Fix test
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* [PM-23222] Update revision date on key rotation (#6038 )
* Add signing key repositories, models, and sql migration scripts
* Rename UserSigningKeys table to UserSigningKey
* Rename signedpublickeyownershipclaim to signedpublickey
* Move signedPublicKey to last parameter
* Add newline at end of file
* Rename to signature key pair
* Further rename to signaturekeypair
* Rename to UserSignatureKeyPairRepository
* Add newline
* Rename more instances to UserSignatureKeyPair
* Update parameter order
* Fix order
* Add more renames
* Cleanup
* Fix sql
* Add ef migrations
* Fix difference in SQL SP compared to migration SP
* Fix difference in SQL SP vs migration
* Fix difference in SQL SP vs migration
* Attempt to fix sql
* Rename migration to start later
* Address feedback
* Move UserSignatureKeyPair to KM codeownership
* Fix build
* Fix build
* Fix build
* Move out entitytypeconfiguration
* Use view for reading usersignaturekeypairs
* Fix migration script
* Fix migration script
* Add initial get keys endpoint
* Add sync response
* Cleanup
* Add query and fix types
* Add tests and cleanup
* Fix test
* Drop view if exists
* Add km queries
* Cleanup
* Enable nullable
* Cleanup
* Cleanup
* Enable nullable
* Fix incorrect namespace
* Remove unused using
* Fix test build
* Fix build error
* Fix build
* Attempt to fix tests
* Attempt to fix tests
* Replace with create or alter view
* Attempt to fix tests
* Attempt to fix build
* Rename to include async suffix
* Fix test
* Rename repo
* Attempt to fix tests
* Cleanup
* Test
* Undo test
* Fix tests
* Fix test
* Switch go generatecomb
* Switch to generatecomb
* Move signature algorithm
* Move useresignaturekeypairentitytypeconfiguration to km ownership
* Move userSignatureKeyPair model
* Unswap file names
* Move sql files to km ownership
* Add index on userid for signature keys
* Fix wrong filename
* Fix build
* Remove string length limit
* Regenerate EF migrations
* Undo changes to program.cs
* Cleanup
* Add migration to user encryption v2
* Fix build
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Rename dbset to plural
* Cleanup
* Cleanup
* Fix build
* Fix test
* Add validation
* Fix test
* Apply fixes
* Fix tests
* Improve tests
* Add tests
* Add error message validation
* Fix tests
* Fix tests
* Fix test
* Add test
* Fix tests and errors
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Cleanup and move query to core
* Fix test
* Fix build
* Fix tests
* Update src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Switch away from primary constructor
* Use argumentNullException
* Add test
* Pass user account keys directly to profileresponsemodel
* Fix build
* Fix namespace
* Make signedpublickey optional
* Remove unused file
* Fix cases for request data conversion
* Revert constructor change
* Undo comments change
* Apply fixes
* Move registration to core
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/Startup.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Remove empty line
* Apply suggestions
* Fix tests
* Fix tests
* Fix build of integration tests
* Attempt to fix tests
* Add test
* Move v2 encryption user async below public functions
* Add todo
* Rename to have async suffix
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Address feedback
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Add test coverage
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Split up validation from rotation
* Fix tests
* Increase test coverage
* Rename tests
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Update src/Core/KeyManagement/UserKey/Implementations/RotateUserAccountkeysCommand.cs
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Add test for no signature keypair data
* Fix build
* Enable nullable
* Fix build
* Clean up data model
* Fix tests
* Merge branch 'km/signing-upgrade-rotation' into km/account-security-version
* Add security state to rotation
* Update tests
* Update revision date on key rotation
* Update tests and check for security state in v2 model
* Cleanup
* Add tests
* Add security state data to integration test
* Re-sort and remove limit
* Update migrations
* Fix sql
* Fix sql
* Fix sql
* Fix fixture
* Fix test
* Fix test
* Fix test
* Add test for change date
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
* Fix signing keys
* Update sql migrations
* Fix tests
* Add keys to identity token response
* Fix tests
* Fix tests
* Fix formatting
* Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Infrastructure.Dapper/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Controllers/UsersController.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Models/Requests/SignatureKeyPairRequestModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Api/KeyManagement/Models/Requests/PublicKeyEncryptionKeyPairRequestModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Entities/UserSignatureKeyPair.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Repositories/IUserSignatureKeyPairRepository.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Queries/UserAccountKeysQuery.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Models/Data/PublicKeyEncryptionKeyPairData.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Entities/UserSignatureKeyPair.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Models/Data/RotateUserAccountKeysData.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Models/Data/SignatureKeyPairData.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Models/Data/SecurityStateData.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Models/Data/UserAccountKeysData.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Models/Request/SecurityStateModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Models/Response/PrivateKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Models/Response/PublicKeysResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Models/Response/PublicKeyEncryptionKeyPairResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Queries/Interfaces/IUserAcountKeysQuery.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Update src/Core/KeyManagement/Models/Response/SignatureKeyPairResponseModel.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Remove unnecessary file
* Add eof spacing
* Move models
* Fix build
* Move models to API subdirectory
* Rename model
* Remove migrations
* Add new ef migrations
* Remove empty line
* Only query account keys if the user has keys
* Dotnet format
* Fix test
* Update test/Identity.Test/IdentityServer/BaseRequestValidatorTests.cs
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
* Apply suggestion
* Fix whitespace
* Force camel case on response models
* Address feedback for sql files
* Fix build
* Make index unique
* Add contstraints
* Fix sql
* Fix order
* Cleanup
* Fix build
* Update migrations
* Update EF migrations
* Change parameters to nvarchar
* Update to Varchar
* Apply feedback
* Move refresh view
* Attempt to fix build
* Undo sql changes
* Apply feedback about varchar
* Apply feedback about refresh view
* Apply feedback about new lines
* Address SQL feedback
* Re-sort columns
* Fix build
* Fix order
* Fix build
---------
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com >
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com >
2025-10-20 12:51:08 +02:00
Rui Tomé
132db95fb7
[PM-26683] Migrate individual policy handlers/validators to the new Policy Update Events pattern ( #6458 )
...
* Implement IOnPolicyPreUpdateEvent for FreeFamiliesForEnterprisePolicyValidator and add corresponding unit tests
* Implement IEnforceDependentPoliciesEvent in MaximumVaultTimeoutPolicyValidator
* Rename test methods in FreeFamiliesForEnterprisePolicyValidatorTests for consistency
* Implement IPolicyValidationEvent and IEnforceDependentPoliciesEvent in RequireSsoPolicyValidator and enhance unit tests
* Implement IPolicyValidationEvent and IEnforceDependentPoliciesEvent in ResetPasswordPolicyValidator and add unit tests
* Implement IOnPolicyPreUpdateEvent in TwoFactorAuthenticationPolicyValidator and add unit tests
* Implement IPolicyValidationEvent and IOnPolicyPreUpdateEvent in SingleOrgPolicyValidator with corresponding unit tests
* Implement IOnPolicyPostUpdateEvent in OrganizationDataOwnershipPolicyValidator and add unit tests for ExecutePostUpsertSideEffectAsync
* Refactor policy validation logic in VNextSavePolicyCommand to simplify enabling and disabling requirements checks
* Refactor VNextSavePolicyCommand to replace IEnforceDependentPoliciesEvent with IPolicyUpdateEvent and update related tests
* Add AddPolicyUpdateEvents method and update service registration for policy update events
2025-10-16 10:18:37 +01:00
Kyle Denney
fedc6b865b
[PM-25379] Refactor org metadata ( #6441 )
...
* ignore serena
* removing unused properties from org metadata
* removing further properties that can already be fetched on the client side using available data
* new vnext endpoint for org metadata plus caching metadata first pass
including new feature flag
# Conflicts:
# src/Core/Constants.cs
* [PM-25379] decided against cache and new query shouldn't use the service
* pr feedback
removing unneeded response model
* run dotnet format
2025-10-13 10:49:55 -05:00
Jimmy Vo
6072104153
Ac/pm 25823/vnext policy upsert pattern ( #6426 )
2025-10-10 11:23:02 -04:00
Brant DeBow
a565fd9ee4
Add Microsoft Teams integration ( #6410 )
...
* Add Microsoft Teams integration
* Fix method naming error
* Expand and clean up unit test coverage
* Update with PR feedback
* Add documentation, add In Progress logic/tests for Teams
* Fixed lowercase Slack
* Added docs; Updated PR suggestions;
* Fix broken tests
2025-10-10 10:39:31 -04:00
Kyle Denney
3272586e31
Revert "[PM-25379] Refactor org metadata ( #6418 )" ( #6439 )
...
This reverts commit 3bef57259d .
2025-10-10 09:06:58 -05:00
Alex Morask
c9970a0782
Resolve tax estimation for Families scenarios ( #6437 )
2025-10-10 08:19:45 -05:00
Justin Baur
b39e486e08
Switch to using built in source link feature ( #6297 )
...
* Switch to using built in source link feature
* Switch to using types assembly
* Formatting
* Make version retrieval safer
* Add debug message
* Apply suggestions from code review
Co-authored-by: Matt Bishop <mbishop@bitwarden.com >
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com >
2025-10-10 09:14:27 -04:00
Kyle Denney
3bef57259d
[PM-25379] Refactor org metadata ( #6418 )
...
* ignore serena
* removing unused properties from org metadata
* removing further properties that can already be fetched on the client side using available data
* new vnext endpoint for org metadata plus caching metadata first pass
including new feature flag
# Conflicts:
# src/Core/Constants.cs
* [PM-25379] decided against cache and new query shouldn't use the service
* pr feedback
removing unneeded response model
* run dotnet format
2025-10-09 15:50:07 -05:00
Alex Morask
34f5ffd981
[PM-26692] Count unverified setup intent as payment method during organization subscription creation ( #6433 )
...
* Updated check that determines whether org has payment method to include bank account when determining how to set trial_settings
* Run dotnet format
2025-10-09 13:20:28 -05:00
Vincent Salucci
0fbc314fb4
[PM-24954] [PM-24955] Remove BulkResourceCreationService Feature Flag ( #6428 )
...
* chore: remove ff implementation and superflous tests, refs PM-24954
* chore: remove UpdateForKeyRotation vNext, refs PM-24954
* chore: remove CreateAsync vNext for ImportCiphersCommand, refs PM-24954
* chore: remove UpdateCiphersAsync vNext from CipherService, refs PM-24954
* chore: formatting, refs PM-24954
* chore: fix CipherRepositoryTests by removing vNext references, refs PM-24954
* chore: remove bulk cipher copy ff key, refs PM-24954
2025-10-08 12:21:02 -05:00
Conner Turnbull
7ceccafa7e
Add license regression tests with frozen versions ( #6408 )
2025-10-07 18:37:07 +00:00
Kyle Spearrin
60d701c945
[PM-25427] Allow reading mail templates from disk ( #6123 )
...
* Allow reading mail templates from self host disk
* Update src/Core/Services/Implementations/HandlebarsMailService.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update src/Core/Services/Implementations/HandlebarsMailService.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* tweak logic
* some error handling reading templates from disk
* fix: broken test
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com >
2025-10-06 10:13:56 +02:00
Brant DeBow
cde458760c
Refactor Slack Callback Mechanism ( #6388 )
...
* Refactor Slack Callback
* Add more safety to state param, clarify if logic, update tests
* Added an additional 2 possible cases to test: integration is not a slack integration, and the integration has already been claimed
* Implement SonarQube suggestion
* Adjusted org hash to include timestamp; addressed PR feedback
2025-10-03 09:30:29 -04:00
Brant DeBow
fe88275cd0
Add default values for MaxConcurrentCalls and PrefetchCount across event and integration ASB listeners ( #6403 )
...
* Add default values for MaxConcurrentCalls and PrefetchCount across all event and integration ASB listeners
* Fix test failure
2025-10-02 08:34:51 -04:00
Alex Morask
61265c7533
[PM-25463] Work towards complete usage of Payments domain ( #6363 )
...
* Use payment domain
* Run dotnet format and remove unused code
* Fix swagger
* Stephon's feedback
* Run dotnet format
2025-10-01 10:26:39 -05:00
Thomas Rittson
b83f95f78c
[PM-25097] Remove DeleteClaimedUserAccountRefactor flag ( #6364 )
...
* Remove feature flag
* Remove old code
2025-09-25 10:14:02 +10:00
Bernd Schoolmann
ff092a031e
[PM-23229] Add extra validation to kdf changes + authentication data + unlock data ( #6121 )
...
* Added MasterPasswordUnlock to UserDecryptionOptions as part of identity response
* Implement support for authentication data and unlock data in kdf change
* Extract to kdf command and add tests
* Fix namespace
* Delete empty file
* Fix build
* Clean up tests
* Fix tests
* Add comments
* Cleanup
* Cleanup
* Cleanup
* Clean-up and fix build
* Address feedback; force new parameters on KDF change request
* Clean-up and add tests
* Re-add logger
* Update logger to interface
* Clean up, remove Kdf Request Model
* Remove kdf request model tests
* Fix types in test
* Address feedback to rename request model and re-add tests
* Fix namespace
* Move comments
* Rename InnerKdfRequestModel to KdfRequestModel
---------
Co-authored-by: Maciej Zieniuk <mzieniuk@bitwarden.com >
2025-09-23 16:10:46 -04:00
Ike
3b54fea309
[PM-22696] send enumeration protection ( #6352 )
...
* feat: add static enumeration helper class
* test: add enumeration helper class unit tests
* feat: implement NeverAuthenticateValidator
* test: unit and integration tests SendNeverAuthenticateValidator
* test: use static class for common integration test setup for Send Access unit and integration tests
* test: update tests to use static helper
2025-09-23 06:38:22 -04:00
Alex Morask
14b307c15b
[PM-25205] Don't respond with a tax ID warning for US customers ( #6310 )
...
* Don't respond with a Tax ID warning for US customers
* Only show provider tax ID warning for non-US based providers
2025-09-19 10:26:22 -05:00
Thomas Rittson
780400fcf9
[PM-25138] Reduce db locking when creating default collections ( #6308 )
...
* Use single method for default collection creation
* Use GenerateComb to create sequential guids
* Pre-sort data for SqlBulkCopy
* Add SqlBulkCopy options per dbops recommendations
2025-09-18 14:50:36 +10:00
Jimmy Vo
854abb0993
[PM-23845] Update cache service to handle concurrency ( #6170 )
2025-09-12 13:44:19 -04:00
Patrick-Pimentel-Bitwarden
4e64d35f89
[PM-19151] [PM-19161] Innovation/archive/server ( #5672 )
...
* Added the ArchivedDate to cipher entity and response model
* Created migration scripts for sqlserver and ef core migration to add the ArchivedDate column
---------
Co-authored-by: gbubemismith <gsmithwalter@gmail.com >
Co-authored-by: SmithThe4th <gsmith@bitwarden.com >
Co-authored-by: Shane <smelton@bitwarden.com >
Co-authored-by: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com >
Co-authored-by: jng <jng@bitwarden.com >
2025-09-12 13:24:30 -04:00
Ike
7eb5035d94
[PM-22740] Update current context to jive with Send Access Tokens ( #6307 )
...
* feat: modify current context to not include user information
* fix: circular dependency for feature check in current context. Successfully tested client isn't affected with feature flag off.
* test: whole bunch of tests for current context
2025-09-12 10:53:11 -04:00
cyprain-okeke
c2cf290054
[PM-21938] Fix: Invoice Payment Issues After Payment Method Updates ( #6306 )
...
* Resolve the unpaid issue after valid payment method is added
* Removed the draft status
* Remove draft from the logger msg
2025-09-11 16:04:05 +01:00
Vincent Salucci
aab50ef5c4
[PM-24595] [PM-24596] Remove feature flag usage/definition for deleting users with no mp on import ( #6313 )
...
* chore: remove dc prevent non-mp users from being deleted feature flag, refs PM-24596
* chore: format, refs PM-24596
2025-09-11 08:25:57 -05:00
Thomas Rittson
2c860df34b
[PM-15621] Refactor delete claimed user command ( #6221 )
...
- create vNext command
- restructure command to simplify logic
- move validation to a separate class
- implement result types using OneOf library and demo
their use here
2025-09-11 13:58:32 +10:00
Brant DeBow
e57569ad57
Alter Integration Template processing to remove keys when encountering null values ( #6309 )
2025-09-10 14:17:45 -04:00
Kyle Denney
a458db319e
[PM-25088] - refactor premium purchase endpoint ( #6262 )
...
* [PM-25088] add feature flag for new premium subscription flow
* [PM-25088] refactor premium endpoint
* forgot the punctuation change in the test
* [PM-25088] - pr feedback
* [PM-25088] - pr feedback round two
2025-09-10 10:08:22 -05:00
Jimmy Vo
d43b00dad9
[PM-24279] Add vnext policy endpoint ( #6253 )
2025-09-10 10:13:04 -04:00
Alex Morask
3dd5accb56
[PM-24964] Stripe-hosted bank account verification ( #6263 )
...
* Implement bank account hosted URL verification with webhook handling notification
* Fix tests
* Run dotnet format
* Remove unused VerifyBankAccount operation
* Stephon's feedback
* Removing unused test
* TEMP: Add logging for deployment check
* Run dotnet format
* fix test
* Revert "fix test"
This reverts commit b8743ab3b5 .
* Revert "Run dotnet format"
This reverts commit 5c861b0b72 .
* Revert "TEMP: Add logging for deployment check"
This reverts commit 0a88acd6a1 .
* Resolve GetPaymentMethodQuery order of operations
2025-09-09 12:22:42 -05:00
Graham Walker
226f274a72
Organization report tables, repos, services, and endpoints ( #6158 )
...
* PM-23754 initial commit
* pm-23754 fixing controller tests
* pm-23754 adding commands and queries
* pm-23754 adding endpoints, command/queries, repositories, and sql migrations
* pm-23754 add new sql scripts
* PM-23754 adding sql scripts
* pm-23754
* PM-23754 fixing migration script
* PM-23754 fixing migration script again
* PM-23754 fixing migration script validation
* PM-23754 fixing db validation script issue
* PM-23754 fixing endpoint and db validation
* PM-23754 fixing unit tests
* PM-23754 fixing implementation based on comments and tests
* PM-23754 updating logging statements
* PM-23754 making changes based on PR comments.
* updating migration scripts
* removing old migration files
* update code based testing for whole data object for OrganizationReport and add a stored procedure.
* updating services, unit tests, repository tests
* fixing unit tests
* fixing migration script
* fixing migration script again
* fixing migration script
* another fix
* fixing sql file, updating controller to account for different orgIds in the url and body.
* updating error message in controllers without a body
* making a change to the command
* Refactor ReportsController by removing organization reports
The IDropOrganizationReportCommand is no longer needed
* will code based on PR comments.
* fixing unit test
* fixing migration script based on last changes.
* adding another check in endpoint and adding unit tests
* fixing route parameter.
* PM-23754 updating data fields to return just the column
* PM-23754 fixing repository method signatures
* PM-23754 making change to orgId parameter through out code to align with api naming
---------
Co-authored-by: Tom <144813356+ttalty@users.noreply.github.com >
2025-09-08 15:06:13 -05:00