Commit Graph

7320 Commits

Author SHA1 Message Date
Graham Walker
433e8b5ab0 PM-35503 fixed flaky tests due to timing issue. (#7551)
* PM-35503 fixed flaky tests due to timing issue.

* PM-35503 fixing issue with test
2026-04-30 14:58:11 -05:00
Jared
cdfb54e71b Implement feature flag for fetching new policies and organization details in SyncController (#7506) (#7529)
- Added support for retrieving confirmed accepted policies and organization user details based on the feature flag 'PoliciesInAcceptedState'.
- Updated SyncResponseModel to include new properties for these details.
- Enhanced SyncControllerTests to verify behavior with the feature flag enabled and disabled.
2026-04-30 15:52:10 -04:00
sven-bitwarden
28bd2862b8 Attaches revocation reason to user details model (#7563) 2026-04-30 15:19:40 +00:00
Rui Tomé
e8c109ae57 [PM-35351] Fix refactor on self-hosted public API member invites by skipping plan retrieval (#7507)
* refactor: enhance null safety in InviteOrganization and related models

- Updated InviteOrganization properties to be nullable for improved null safety.
- Refactored InviteOrganizationUsersRequest to use primary constructor syntax.
- Added null checks for Plan in validation logic to prevent errors when the organization plan is unavailable.
- Adjusted PasswordManagerSubscriptionUpdate to handle nullable PasswordManagerPlan.
- Ensured consistent handling of nullable properties across various validation classes.

* refactor: update organization handling in SCIM user models and commands

- Replaced references to InviteOrganization with Organization in SCIM user request models and related commands for consistency.
- Enhanced null safety by ensuring proper handling of organization properties across various components.
- Updated tests to reflect changes in organization handling and ensure functionality remains intact.

* test: add unit tests for SCIM organization user invitation scenarios

- Implemented tests for inviting SCIM organization users under different conditions: when self-hosted with a null plan and when not self-hosted with a null plan.
- Ensured proper validation and response handling for both success and failure cases.
- Updated dependencies and mock setups to reflect the new test scenarios.
2026-04-30 14:52:39 +01:00
Ike
90f451bc60 [PM-33417] WebAuthn cache (#7500)
feat: Add WebAuthn Cache
  - Add IWebAuthnChallengeCacheProvider with distributed cache implementation for storing WebAuthn Challenges
  - Inject the cache provider into AssertWebAuthnLoginCredentialCommand and WebAuthnGrantValidator so challenges can be stored
  - Use a static token lifetime for WebAuthnLoginAssertionOptionsTokenable and enable nullable reference types on the tokenable
  - Add unit tests for the cache provider, the assertion command, and the WebAuthn controller; add Identity integration and unit tests for WebAuthnGrantValidator with a FakeWebAuthnAuthenticator helper
2026-04-30 09:21:03 -04:00
Rui Tomé
52d9a9cc88 [PM-35253] Add organization ability UseInviteLinks (#7489)
* Add UseInviteLinks to Organization SQL schema and views

* Add Migrator scripts for UseInviteLinks column and data migration

* Add EF migrations for UseInviteLinks on Organization

* Wire UseInviteLinks through organization domain and repositories

* Add HasInviteLinks plan support and UseInviteLinks license handling

* Expose UseInviteLinks and HasInviteLinks on organization and plan API models

* Update tests for UseInviteLinks and invite-links plan feature

* Update migration script with missing update to Organization_ReadManyByIds

* Move UseInviteLinks column after ExemptFromBillingAutomation

* Bump date on migration scripts
2026-04-30 10:13:50 +01:00
Ike
27ae3d5455 [PM-35252] (#7501)
* update sql migrations

* chore: formatting

---------

Co-authored-by: rkac-bw <148072202+rkac-bw@users.noreply.github.com>
2026-04-29 17:19:40 -04:00
renovate[bot]
b4de307ff1 [deps] Billing: Update coverlet.collector to v10 (#7542)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Stephon Brown <sbrown@livefront.com>
2026-04-29 14:45:07 -04:00
Brandon Treston
3724ecf132 Implement master password policy requirement (#7537)
* implement master password policy requirement

* revert unrelated chagned files

* fix aggregate pattern in factory, move away from ctor

* remove admin/owner exemption

* revert mp exemption in policyService
2026-04-29 13:21:28 -04:00
Rui Tomé
53b8b3e868 [PM-34601] Bump Group.RevisionDate on edits and access changes (#7467)
* Add optional RevisionDate param to group sprocs

When provided, bump Group.RevisionDate on affected groups during
membership and collection-access changes. Defaults to NULL for
backward compatibility.

* Add migration for group RevisionDate bump

* Add revisionDate param to group repository methods

Update IGroupRepository and IOrganizationUserRepository interfaces
and their Dapper and Entity Framework implementations.

* Pass revisionDate through business logic to repos

Inject TimeProvider into commands, services, and controllers to
supply the timestamp when modifying group membership.

* Update unit tests for group revisionDate param

* Update and add integration tests for group revision

* Enhance IGroupRepository and IOrganizationUserRepository with detailed XML documentation

* Bump date on migration script

* Bump date on migration script
2026-04-29 17:24:08 +01:00
Dave
c281161aec feat(mp-service) [PM-35392] Add master password service (#7530)
* feat(mp-service): Add MasterPasswordService foundation.

* docs(mp-service): Resolve incoming comments, document contract.

* feat(mp-service): Add KDF-setting helper and DI.

* test(mp-service): Add tests.

* feat(mp-service): Add enforecement in Build delegate for stamp/validate pw flags, tag data update ticket.

* refactor(mp-service): Align validate/hash/compose/execute pattern.

* test(mp-service): Tighten test assertions.

* refactor(mp-service) chants: unlock and authenticate.

* docs(mp-service): Re-fit some XML doc comment tags for general support.

* docs(mp-service): Address review comment feedback.

* refactor(mp-service): Apply result.Tx handling to all OneOf returns.

* docs(mp-service): Refine unlock vs authentication data comments.

* refactor(mp-service): Rename for saveExistingData (too much existing).

* docs(mp-service): Restore PM-34905 userrepository TODOs.

* refactor(mp-service): Apply test naming clarification.

* refactor(mp-service): Make service internal to Core.

* docs(mp-service): Update method comment formats: what, use when, constraints.

* docs(mp-service): Update interface docs for consistency.

* refactor(mp-service): Rename internal helpers to Apply, add documentation.

* docs(mp-service): Add summary and use-when annotations to data models.

* docs(mp-service): Add annotation preferring non-Build API verbs where possible.

* test(mp-service): Refactor data model tests into discrete files.

* test(mp-service): Address additional coverage cases.

* docs(mp-service): Spelling.

* refactor(mp-service): Extract user security stamp rotation to its own helper.

* docs(mp-service): Clarify authentication hash documentation.
2026-04-29 09:13:59 -04:00
Stephon Brown
995ccbbe0c [PM-34565] Save Cancellation Details for Scheduled Subscriptions (#7535)
* refactor(billing): add constant for deferred price increase cancellation

* feat(billing): update cancellation logic to release schedules and set metadata

* feat(billing): update reinstatement logic to recreate schedules

* style(billing): cleanup formatting

* fix(billing) run dotnet format

* docs(billing): clarify stripe subscription update behavior regarding schedules
2026-04-28 22:03:41 +00:00
Jared
329b144003 Add BulkAutoConfirmOnLogin feature flag (#7530) (#7553) 2026-04-28 19:19:08 +00:00
Alex Morask
d5557163c5 chore(billing): remove unused FF (#7549) 2026-04-28 14:18:27 -05:00
Jared McCannon
9c02f0cd3f [PM-34883] - Add InjectOrganizationUserAttribute (#7536)
* Added InjectOrganizationUserAttribute and updated account-recovery put to use it.

* Changes from code review
2026-04-28 13:52:28 -05:00
Mick Letofsky
53dc0c40d7 PM-35200 - Create contributing guide for Claude tooling (#7508) 2026-04-28 17:46:34 +00:00
Nick Krantz
39a132d192 [PM-34116][PM-34117] Drivers License and Passport (#7512)
* update minimum version to handle all new item types rather than individual types

* add cipher types for driverslicense and passport

* add request and response models for DriversLicense and Passport

* add events for DriversLicense and Passport

* add seeder

* add additional properties from CXP

* add additional fields
2026-04-28 17:35:01 +00:00
Vince Grassia
d1280e87ce Remove failure check job (#7557) 2026-04-28 12:47:03 -04:00
Addison Beck
de872a8212 fix(ci): fix startup_failure in move_edd_db_scripts job (#7554)
The move_edd_db_scripts job in repository-management.yml had
permissions: {} while calling _move_edd_db_scripts.yml, which
declares pull-requests: write and contents: write at its top
level. GitHub Actions blocks permission escalation in reusable
workflow callers at startup, producing a startup_failure.

Additionally, _move_edd_db_scripts.yml was missing id-token: write
and actions: read from its own top-level permissions block, which
its jobs require.

Fixed by granting the caller job explicit permissions matching what
the reusable workflow needs, and adding the missing permissions to
the reusable workflow's top-level block.
2026-04-28 16:40:57 +00:00
Justin Baur
18b56e49d6 Update Bitwarden.Server.Sdk to 1.5.2 (#7559) 2026-04-28 16:05:31 +00:00
Thomas Rittson
a18b600147 [PM-35489] Move collections to AC ownership - update namespaces (#7532)
* Update namespaces: Api

* Update namespaces: core commands
2026-04-27 17:57:03 -04:00
sven-bitwarden
1dcbf278eb Add revocation reasons (#7473) 2026-04-27 12:27:01 -05:00
Jared McCannon
471496c937 [PM-28045] - Org Key Validation (#7384)
* Requiring keys on create request models.

* Added tests.
2026-04-27 08:50:05 -05:00
Vijay Oommen
dcc685da16 [PM-34822] Consistent error response 400 and 404 in Org Integrations controller (#7458) 2026-04-25 11:57:18 -05:00
Oscar Hinton
0230b831d3 Add desktop-ui-settings-dialog flag (#7491) 2026-04-24 12:12:26 +02:00
sven-bitwarden
901bb67157 Prevent custom user from removing an admin (#7526) 2026-04-23 10:06:30 -05:00
Kyle Denney
2820ecc567 [PM-34813] fix system coupons regression (#7515)
* [PM-34813] fix system coupons regression

refactor customer setup class to split system coupons from discount coupons so that they can be applied systematically
2026-04-22 16:42:44 -05:00
Thomas Rittson
1e09ab4008 [PM-35489] Move collections to AC ownership (#7523) 2026-04-23 07:03:25 +10:00
Shane Melton
b8ee87529d [PM-34213] Create attachment event log (#7425)
* [PM-34213] Log event when attachment is created via delayed upload

* [PM-34213] Add tests for attachment created event logging

* [PM-34213] Move Cipher_AttachmentCreated event log to authenticated attachment creation callers
2026-04-22 13:19:32 -07:00
MtnBurrit0
c587d2571f Add -o --output parameters to DB seeder util for preset command (#7495) 2026-04-22 20:40:55 +02:00
Derek Nance
e1c67a42b8 [PM-33436] Refactor setup shell commands (#7494) 2026-04-22 11:27:42 -05:00
blackwood
02b6ec2c56 feature flag for autofill triage (#7528)
Co-authored-by: Kyle Denney <4227399+kdenney@users.noreply.github.com>
2026-04-22 12:05:14 -04:00
cd-bitwarden
dbd0d52177 adding feature flag for secret versioning (#7170) 2026-04-22 10:13:27 -04:00
Ike
0b1c22e0fa Update SSO project path in Renovate config (#7518) 2026-04-21 14:55:26 -04:00
Bernd Schoolmann
a714278b9a [PM-35306] Fix password change not working when using the unlock and authentication data models (#7505)
* Fix password change not working when using the unlock and authentication data models

* Cleanup test

* Cleanup test

* Clean up test comment

* Address feedback

* Fix tests

* Fix tests

* Update src/Core/KeyManagement/Models/Api/Request/MasterPasswordAuthenticationDataRequestModel.cs

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>

---------

Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
2026-04-21 12:07:50 -04:00
Thomas Rittson
b637f90468 Move missed integration files to DIRT (#7487) 2026-04-21 09:43:31 -05:00
sven-bitwarden
985c3a2cd9 [PM-32598] - Remove Unused sso/details Endpoint + Sprocs (#7400)
* Remove code around sso/details

* Remove unused sproc

* adjust migration file
2026-04-21 09:36:36 -05:00
Mick Letofsky
918faf0342 Migrate server specific skills into correct location (#7488) 2026-04-21 15:42:33 +02:00
cyprain-okeke
bbc1a315e2 billing/pm-24665/license-file-generation-should-fail-for-unpaid-subscription (#7444)
* Add changes for unpaid subscriptions

* Remove the unpaid status and update the test

* Add changes for premium user

* Fix the lint error

* remove subscriptionInfo and use subscription

* Fix file encoding issue

* SubscriptionLicenseValidator.cs is deleted

* Fix the lint error
2026-04-21 13:58:16 +01:00
Oscar Hinton
076804f04e Add seed script for local development (#7490)
Introduces a repeatable, declarative way to seed a local dev environment via the existing SeederUtility.
2026-04-21 12:27:14 +02:00
Eli Grubb
9e1215ae8e [PM-27278] add AccountKeysRequestModel to RegisterFinishRequestModel for account encryption v2 support (#6798)
Deprecating V1 User Asymmetric Key information in favor of new V2 User Asymmetric Account Keys structure.

This PR adds support for the new AccountKeys structure while maintaining support for the legacy UserAsymmetricKey-based flow. Validation is updated to check either AccountKeys or UserAsymmetricKeys are updated. Tests include modeling for both scenarios.
2026-04-21 12:10:56 +09:00
Thomas Rittson
55d5f553b6 Add README for PolicyRequirements feature (#7503) 2026-04-21 07:21:24 +10:00
Eli Grubb
3d033e1dd9 Remove usage of feature flag for passkey unlock (#7318)
Now that passkey unlock has been released, this change removes the logic related to the passkey unlock feature flag pm-2035-passkey-unlock. The feature flag itself will be removed in a future ticket.
2026-04-20 14:28:58 -06:00
John Harrington
7c205811fb fix sync bug (#7509) 2026-04-20 11:44:25 -07:00
aikido-autofix[bot]
26f0702b07 [AppSec] AI Fix for Template Injection in GitHub Workflows Action (#7448)
Co-authored-by: aikido-autofix[bot] <119856028+aikido-autofix[bot]@users.noreply.github.com>
Co-authored-by: Matt Andreko <mandreko@bitwarden.com>
2026-04-20 12:04:32 -04:00
Jared McCannon
94f2bc3bf9 [PM-25056] - Deadlock testing fix (#7478)
* This wraps the delete method in a retry loop in order to protect the delete calls when cleaning up test data.

* Removing database test clean up as these databases should be ephemeral
2026-04-20 09:42:45 -05:00
renovate[bot]
327290c0dc [deps] Tools: Update MailKit to 4.16.0 [SECURITY] (#7502)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-20 06:59:35 -07:00
Matt Gibson
4346fe25a8 Arch/qa env seeding tweaks (#7430)
* [PM-34886] allow play id tracking in any non-production build

* [PM-34880] Allow configuration by setting regardless of env

* Fixup append vs add on list

* Simplify valid issues for licenses

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

* Allow prod-signed certs in dev self host instances

* Use all verification licenses for all verification methods

* Fixup license logic bug

* ensure distinct license set

* avoid saving data protection certs for dev environments

This reverts the potential new environment change identified

* remove simple extension

* private thumbprints

* simpler verification thumbprint validation

* switch to hashset for verification certs

this way we don't need to run distinct

* Fixup missed play id non-prod logic

* Update src/Core/Billing/Services/Implementations/LicensingService.cs

Co-authored-by: Kyle Denney <4227399+kdenney@users.noreply.github.com>

* fixup!

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: Kyle Denney <4227399+kdenney@users.noreply.github.com>
2026-04-20 06:54:33 -07:00
John Harrington
535fa15825 [PM-33501] Prevent orphaned Sends during user and org deletion (#7386) 2026-04-20 06:52:48 -07:00
Github Actions
53c49c2949 Bumped version to 2026.4.1 2026-04-20 13:20:49 +00:00