1
0
mirror of https://github.com/bitwarden/server synced 2026-01-15 15:03:34 +00:00
Commit Graph

6620 Commits

Author SHA1 Message Date
Mike Amirault
4bff67ea12 [PM-30687] Remove Desktop Send UI refresh feature flag (#6842) 2026-01-14 15:32:58 -05:00
Vincent Salucci
2a18f276a8 fix: feature flag key for PremiumAccessQuery, refs PM-21411 (#6834) 2026-01-14 12:21:49 -06:00
Brandon Treston
aa8d7c6775 [PM-30682] Add missing null check, update tests (#6826)
* add missing null check, update tests

* CR feedback
2026-01-14 12:19:23 -05:00
Github Actions
2224b1e0c6 Bumped version to 2026.1.0 2026-01-14 17:05:02 +00:00
Jared McCannon
02cec2d9fe Removing unused feature flag. (#6836) 2026-01-14 10:42:06 -06:00
Oscar Hinton
d1fdaa6a2f Fix lint on main (#6835) 2026-01-14 09:02:49 -05:00
Oscar Hinton
f144828a87 [PM-22263] [PM-29849] Initial PoC of seeder API (#6424)
We want to reduce the amount of business critical test data in the company. One way of doing that is to generate test data on demand prior to client side testing.

Clients will request a scene to be set up with a JSON body set of options, specific to a given scene. Successful seed requests will be responded to with a mangleMap which maps magic strings present in the request to the mangled, non-colliding versions inserted into the database. This way, the server is solely responsible for understanding uniqueness requirements in the database. scenes also are able to return custom data, depending on the scene. For example, user creation would benefit from a return value of the userId for further test setup on the client side.

Clients will indicate they are running tests by including a unique header, x-play-id which specifies a unique testing context. The server uses this PlayId as the seed for any mangling that occurs. This allows the client to decide it will reuse a given PlayId if the test context builds on top of previously executed tests. When a given context is no longer needed, the API user will delete all test data associated with the PlayId by calling a delete endpoint.

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2026-01-13 11:10:01 -06:00
Bernd Schoolmann
a9f78487ef Add feature flag (#6820) 2026-01-13 15:47:22 +01:00
Jared McCannon
07b0721616 Removed old implementation and feature flag checks for bulk revoke. (#6827) 2026-01-13 08:39:27 -06:00
Conner Turnbull
12d18ebb2c [PM-27731] Updated organization licenses to save the correct values from the token (#6546)
* Updated organization licenses to save the correct values from the token

* Added additional test cases around licenses

* Added missing properties from Organization to UpdateOrganizationLicenseCommand.UpdateLicenseAsync()

* Add tests to validate license property synchronization pipeline

* `dotnet format`
2026-01-13 09:32:02 -05:00
Jimmy Vo
4f6b023667 [PM-29847] Fix styling (#6828) 2026-01-13 08:55:32 -05:00
Justin Baur
d559b1da11 Make CA1304 & CA1305 warnings (#6813) 2026-01-13 04:02:56 -05:00
Justin Baur
b9d1a35301 Enable Telemetry for Billing Project (#6802) 2026-01-12 15:08:52 -05:00
Alex Morask
cfa8d4a165 [PM-29604] [PM-29605] [PM-29606] Support premium subscription page redesign (#6821)
* feat(get-subscription): Add EnumMemberJsonConverter

* feat(get-subscription): Add BitwardenDiscount model

* feat(get-subscription): Add Cart model

* feat(get-subscription): Add Storage model

* feat(get-subscription): Add BitwardenSubscription model

* feat(get-subscription): Add DiscountExtensions

* feat(get-subscription): Add error code to StripeConstants

* feat(get-subscription): Add GetBitwardenSubscriptionQuery

* feat(get-subscription): Expose GET /account/billing/vnext/subscription

* feat(reinstate-subscription): Add ReinstateSubscriptionCommand

* feat(reinstate-subscription): Expose POST /account/billing/vnext/subscription/reinstate

* feat(pay-with-paypal-immediately): Add SubscriberId union

* feat(pay-with-paypal-immediately): Add BraintreeService with PayInvoice method

* feat(pay-with-paypal-immediately): Pay PayPal invoice immediately when starting premium subscription

* feat(pay-with-paypal-immediately): Pay invoice with Braintree on invoice.created for subscription cycles only

* fix(update-storage): Always invoice for premium storage update

* fix(update-storage): Move endpoint to subscription path

* docs: Note FF removal POIs

* (format): Run dotnet format
2026-01-12 10:45:41 -06:00
Todd Martin
94cd6fbff6 chore(flags): [PM-28337] Remove account recovery permission feature flag
* Removed pm-24425-send-2fa-failed-email

* Remove feature flag

* Linting

* Removed tests and cleaned up comment.
2026-01-11 12:04:10 -05:00
Ike
5320878295 [PM-25949] ExternalCallback Integration tests for SSO Project (#6809)
* feat: add new integration test project

* test: add factory for SSO application; ExternalCallback integration tests.

* test: modified Integration tests to use seeded data instead of service substitutes with mocked responses, where possible.

* fix: re-organize projects in solution. SsoFactory now in its owning project with SSO integration test which match the integration test factory pattern more closely.

* claude: better naming of class fields.
2026-01-10 09:02:50 -05:00
cyprain-okeke
e705fe3f3f [PM-29598] Create Subscription Upgrade Endpoint (#6787)
* Add the ticket implementation

* Add the unit test

* Fix the lint and test issues

* resolve pr comments

* Fix the error on the test file

* Review suggestion and fixes

* resolve the api access comments

* Gte the key from the client

* Add the gateway type as stripe

* Address the legacy plans issues

* Resolve the misunderstanding

* Add additional storage that we will need if they revert

* Add the previous premium UserId
2026-01-09 16:34:06 +01:00
Jimmy Vo
b1cf59b1bf [PM-27882] Fix the subject line. (#6818) 2026-01-09 10:04:52 -05:00
Maciej Zieniuk
2e92a53f11 [PM-27281] Support v2 account encryption on JIT master password signups (#6777)
* V2 prep, rename existing SSO JIT MP command to V1

* set initial master password for account registraton V2

* later removel docs

* TDE MP onboarding split

* revert separate TDE onboarding controller api

* Server side hash of the user master password hash

* use `ValidationResult` instead for validation errors

* unit test coverage

* integration test coverage

* update sql migration script date

* revert validate password change

* better requests validation

* explicit error message when org sso identifier invalid

* more unit test coverage

* renamed onboarding to set, hash naming clarifications

* update db sql script, formatting

* use raw json as request instead of request models for integration test

* v1 integration test coverage

* change of name
2026-01-09 09:17:45 +01:00
Matt Bishop
62ae828143 Fix pattern matching when retrieving database migrations (#6815) 2026-01-08 13:56:17 -05:00
Vince Grassia
ce4b906bdf Update job names (#6814) 2026-01-08 12:29:47 -05:00
Alex Morask
6d69c9bb99 Make PayPalIPNTransactionModel currency culture invariant (#6811) 2026-01-08 08:40:45 -06:00
Patrick-Pimentel-Bitwarden
8387996844 chore(flags): Add pm-23801-prefetch-password-prelogin feature flag 2026-01-07 17:28:34 -05:00
Jordan Aasen
02c03f4493 [PM-27884][PM-27886][PM-27885] - Add Cipher Archives (#6578)
* add Archives column to ciphers table

* add archives column

* update cipher archive/unarchive and cipher deatils query

* add migrations

* add missing migrations

* fixes

* update tests. cleanup

* syntax fix

* fix sql syntax

* fix sql

* fix CreateWithCollections

* fix sql

* fix migration file

* fix migration

* add go

* add missing go

* fix migrations

* add missing proc

* fix migrations

* implement claude suggestions

* fix test

* update cipher service and tests

* updates to soft delete

* update UserCipherDetailsQuery and migration

* update migration

* update archive ciphers command to allow org ciphers to be archived

* updates to archivedDate

* revert change to UserCipherDetails

* updates to migration and procs

* remove archivedDate from Cipher_CreateWithCollections

* remove trailing comma

* fix syntax errors

* fix migration

* add double quotes around datetime

* fix syntax error

* remove archivedDate from cipher entity

* re-add ArchivedDate into cipher

* fix migration

* do not set Cipher.ArchivedDate in CipherRepository

* re-add ArchivedDate until removed from the db

* set defaults

* change to CREATE OR ALTER

* fix migration

* fix migration file

* quote datetime

* fix existing archiveAsync test. add additional test

* quote datetime

* update migration

* do not wrap datetime in quotes

* do not wrap datetime in quotes

* fix migration

* clean up archives and archivedDate from procs

* fix UserCipherDetailsQuery

* fix setting date in JSON_MODIFY

* prefer cast over convert

* fix cipher response model

* re-add ArchivedDate

* add new keyword

* remove ArchivedDate from entity

* use custom parameters for CipherDetails_CreateWithCollections

* remove reference to archivedDate

* add missing param

* add missing param

* fix params

* fix cipher repository

* fix migration file

* update request/response models

* update migration

* remove Archives from Cipher_CreateWithCollections

* revert last change

* clean up

* remove comment

* remove column in migration

* change language in drop

* wrap in brackets

* put drop column in separate migration

* remove archivedDate column

* re-add archivedDate

* add refresh module

* bump migration name

* fix proc and migration

* do not require edit permission for archiving ciphers

* do not require edit permission for unarchiving ciphers
2026-01-07 09:29:10 -08:00
cd-bitwarden
afd47ad085 [SM-1570] Adding new item to organization license to disable SM ads for users (#6482)
* Adding new item to organization license

* fixing whitespace issues

* fixing missing comment

* fixing merge conflicts

* merge fix

* db merge fixes

* fix

* Updating SM to Sm, and adding more view refreshes

* fixing merge conflicts

* Redoing migration

* Update OrganizationLicense.cs

* Update OrganizationLicense.cs

* fixes

* fixes

* fixing db issues

* fix

* rearranging sql after merge conflicts

* Merge conflicts with dbscripts are fixed, adding missing usedisableSMadsForUsers where needed

* removing incorrect merge fix

* fixes

* adding feature flag to disable sm ads

---------

Co-authored-by: Conner Turnbull <cturnbull@bitwarden.com>
2026-01-07 09:42:10 -07:00
Kyle Denney
3f2ee5b029 [PM-30460] update storage job to also update database max storage (#6803)
* [PM-30460] update storage job to also update database max storage

* dry run logs

* more logging fixes and pr feedback, forgot sql scripts

* claude feedback

* pr feedback, redesign of entity id reverse lookup

* claude feedback
2026-01-07 10:38:27 -06:00
renovate[bot]
f2aa742f76 [deps]: Update dtolnay/rust-toolchain digest to f7ccc83 (#6497)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-07 13:23:02 +01:00
renovate[bot]
d86717eedb [deps]: Update actions/setup-dotnet action to v5.0.1 (#6805)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-07 12:09:12 +01:00
renovate[bot]
46e9b18905 [deps]: Update github/codeql-action action to v4.31.9 (#6806)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-07 11:08:26 +00:00
renovate[bot]
ad6555c221 [deps] Tools: Update MailKit to 4.14.1 (#6621)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-07 11:32:15 +01:00
Nik Gilmore
a6e034a88c [PM-27632] Add feature flag pm-27632-cipher-crud-operations-to-sdk (#6790) 2026-01-06 14:26:32 -08:00
Jimmy Vo
63784e1f5f [PM-27882] Add SendOrganizationConfirmationCommand (#6743) 2026-01-06 16:43:36 -05:00
Stephon Brown
530d946857 [PM-29061] Remove Feature Flag 24996 (#6744)
* refactor(billing): Remove flag uses

* refactor(billing): remove redundant endpoint

* chore(billing): remove the flag

* fix(billing): revert changes

* Revert "fix(billing): revert changes"

This reverts commit 92271b380c.

* test(billing): update tests
2026-01-06 20:51:43 +00:00
aj-bw
5e735c8474 after a convo with bre & sre, remove long failing workflow. registry cleanup has moved into automated processes in azure (#6804) 2026-01-06 20:09:28 +00:00
Jeffrey Holland
2026ca103b Remove unused feature flags for Autofill (#6749) 2026-01-06 12:05:48 -05:00
Vijay Oommen
f797825de1 PM-28947 remove feature flag (#6799) 2026-01-06 09:00:12 -06:00
Rui Tomé
1b17d99bfd [PM-29555] Add self-revoke endpoint for declining organization data ownership policy (#6739)
* Add OrganizationUser_SelfRevoked event type to EventType enum

* Add SelfRevokeOrganizationUserCommand implementation and interface for user self-revocation from organizations

* Add unit tests for SelfRevokeOrganizationUserCommand to validate user self-revocation logic, including success scenarios and various failure conditions.

* Add ISelfRevokeOrganizationUserCommand registration to OrganizationServiceCollectionExtensions for user self-revocation functionality

* Add self-revoke user functionality to OrganizationUsersController with new endpoint for user-initiated revocation

* Add integration tests for self-revoke functionality in OrganizationUsersController, covering scenarios for eligible users, non-members, and users with owner/admin roles.

* Add unit test for SelfRevokeOrganizationUserCommand to validate behavior when a user attempts to self-revoke without confirmation. This test checks for a BadRequestException with an appropriate message.

* Add MemberRequirement class for organization membership authorization

- Implemented MemberRequirement to check if a user is a member of the organization.
- Added unit tests for MemberRequirement to validate authorization logic for different user types.

* Update authorization requirement for self-revoke endpoint and add integration test for provider users

- Changed authorization attribute from MemberOrProviderRequirement to MemberRequirement in the RevokeSelfAsync method.
- Added a new integration test to verify that provider users who are not members receive a forbidden response when attempting to revoke themselves.

* Add EligibleForSelfRevoke method to OrganizationDataOwnershipPolicyRequirement

- Implemented the EligibleForSelfRevoke method to determine if a user can self-revoke their data ownership based on their membership status and policy state.
- Added unit tests to validate the eligibility logic for confirmed, invited, and non-policy users, as well as for different organization IDs.

* Refactor self-revoke user command to enhance eligibility checks

- Updated the SelfRevokeOrganizationUserCommand to utilize policy requirements for determining user eligibility for self-revocation.
- Implemented checks to prevent the last owner from revoking themselves, ensuring organizational integrity.
- Modified unit tests to reflect changes in eligibility logic and added scenarios for confirmed owners and admins.
- Removed deprecated policy checks and streamlined the command's dependencies.

* Use CommandResult pattern in self-revoke command

* Clearer documentation
2026-01-06 11:25:14 +00:00
Vincent Salucci
35868c2a65 [PM-22434] Remove CreateDefaultLocation feature flag references (#6758)
* chore: remove ff ref from PoliciesController

* chore: remove ff ref from OrganizationExportController, refs PM-22434

* chore: remove ff ref from CiphersController, refs PM-22434

* chore: remove ff ref from ConfirmOrganizationUserCommand, refs PM-22434

* chore: remove ff refs from OrganizationDataOwnershipPolicyValidator, refs PM-22434

* chore: remove ff ref from OrganizationUserControllerTests, refs PM-22434

* chore: remove ff refs from ConfirmOrganizationUserCommandTests, refs PM-22434

* chore: remove ff refs from OrganizationDataOwnershipPolicyValidatorTests, refs PM-22434

* chore: format, refs PM-22434
2026-01-05 17:27:17 -06:00
Kyle Spearrin
2442d2dabc [PM-30391] fix for org context on sso provisioning (#6797)
* fix for org context on sso provisioning

* tests are no longer needed since there is no logic on feature flag

* lint fixes
2026-01-05 11:56:31 -05:00
cyprain-okeke
76a8f0fd95 [PM 29610]Update Account Storage Endpoint (#6750)
* update account storage endpoint

* Fix the failing test

* Added flag and refactor base on pr comments

* fix the lint error

* Resolve the pr comments

* Fix the failing test

* Fix the failing test

* Return none

* Resolve the lint error

* Fix the failing test

* Add the missing test

* Formatting issues fixed
2026-01-05 10:52:52 -06:00
Thomas Rittson
e9d53c0c6b [PM-30298] Initial documentation for OrganizationAbility pattern (#6781) 2026-01-03 07:48:34 +10:00
Ike
a2ba5289fa [PM-29568] Footer Links lack correct styling (#6784)
* fix: color weight of links in footer.

* fix: css styling
2026-01-02 12:02:57 -05:00
✨ Audrey ✨
484a8e42dc [PM-21918] update send api models to support new email field (#5895)
* update send api models to support new `email` field

* normalize authentication field evaluation order

* document send response converters

* add FIXME to remove unused constructor argument

* add FIXME to remove unused constructor argument

* introduce `tools-send-email-otp-listing` feature flag

* add `ISendOwnerQuery` to dependency graph

* fix broken tests

* added AuthType prop to send related models with test coverage and debt cleanup

* dotnet format

* add migrations

* dotnet format

* make SendsController null safe (tech debt)

* add AuthType col to Sends table, change Emails col length to 4000, and run migrations

* dotnet format

* update SPs to expect AuthType

* include SP updates in migrations

* remove migrations not intended for merge

* Revert "remove migrations not intended for merge"

This reverts commit 7df56e346a.

undo migrations removal

* extract AuthType inference to util method and remove SQLite file

* fix lints

* address review comments

* fix incorrect assignment and adopt SQL conventions

* fix column assignment order in Send_Update.sql

* remove space added to email list

* assign SQL default value of NULL to AuthType

* update SPs to match migration changes

---------

Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
Co-authored-by: Alex Dragovich <46065570+itsadrago@users.noreply.github.com>
Co-authored-by: John Harrington <84741727+harr1424@users.noreply.github.com>
2025-12-31 13:37:42 -07:00
Brant DeBow
cc03842f5f Disable database distributed cache in non-self-hosted environments (#6783)
* Disable database distributed cache in non-self-hosted environments

* Added distributed memory cache as a final fallback option
2025-12-31 11:59:59 -05:00
cyprain-okeke
665be6bfb0 [PM-29611] Decouple License from Subscription Response (#6768)
* implement the ticket request

* resolve the build lint error

* Resolve the build lint error

* Address review comments

* Fixt the lint and failing unit test

* Fix NSubstitute mock - use concrete ClaimsPrincipal instead of Arg.Any in Returns()

* resolve InjectUser issues

* Fix the failing testing

* Fix the failing unit test
2025-12-31 17:30:41 +01:00
Mick Letofsky
bf08bd279c Revert review Code Triggered by labeled event (#6785) 2025-12-31 16:56:03 +01:00
Ike
f82552fba9 [PM-29568] Fix footer styling (#6722)
* fix: update footer background color to match UIF Tailwind standards.

* fix: modify spacing for footer

* chore: build templates

* fix: update social icon assets

* fix: update footer image source

* fix: update send access
2025-12-30 14:08:10 -05:00
Mick Letofsky
c98f31a9f7 Review Code Triggered by labeled event (#6782) 2025-12-30 18:22:09 +01:00
Brant DeBow
86a68ab637 Move all event integration code to Dirt (#6757)
* Move all event integration code to Dirt

* Format to fix lint
2025-12-30 10:59:19 -05:00
Isaiah Inuwa
9a340c0fdd Allow mobile clients to create passkeys (#6383) [PM-26177]
* Allow mobile clients to create vault passkeys

* Document uses for authorization policies
2025-12-30 07:31:26 -06:00