1
0
mirror of https://github.com/bitwarden/server.git synced 2025-03-12 13:29:14 +01:00
Commit Graph

5538 Commits

Author SHA1 Message Date
Maciej Zieniuk
5241e09c1a
PM-15882: Added RemoveUnlockWithPin policy (#5388) 2025-02-21 20:59:37 +01:00
renovate[bot]
d8cf658207
[deps] Auth: Update sass to v1.85.0 (#4947)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-21 19:35:39 +00:00
Brandon Treston
c1ac96814e
remove feature flag (#5432) 2025-02-21 13:23:06 -05:00
Ike
b00f11fc43
[PM-17645] : update email for new email multi factor tokens (#5428)
* feat(newDeviceVerification) : Initial update to email

* fix : email copying over extra whitespace when using keyboard short cuts

* test : Fixing tests for new device verificaiton email format
2025-02-21 11:12:31 -05:00
Robyn MacCallum
b66f255c5c
Add import-logins-flow flag (#5397) 2025-02-21 10:21:31 -05:00
Jonas Hendrickx
f6365fa385
[PM-17593] Remove Multi-Org Enterprise feature flag (#5351) 2025-02-21 14:35:36 +00:00
Jimmy Vo
06c96a96c5
[PM-17449] Add logic to handle email updates for managed users. (#5422) 2025-02-20 15:38:59 -05:00
Jimmy Vo
2f4d5283d3
[PM-17449] Add stored proc, EF query, and an integration test for them (#5413) 2025-02-20 15:08:06 -05:00
Maciej Zieniuk
93e5f7d0fe
Incorrect Read only connection string on development self-hosted environment (#5426) 2025-02-20 20:21:50 +01:00
Conner Turnbull
5bbd905401
[PM-18436] Only cancel subscriptions when creating or renewing (#5423)
* Only cancel subscriptions during creation or cycle renewal

* Resolved possible null reference warning

* Inverted conitional to reduce nesting
2025-02-20 13:03:29 -05:00
Justin Baur
0b6f0d9fe8
Collect Code Coverage In DB Tests (#5431) 2025-02-20 11:19:48 -05:00
Jared Snider
fb74512d27
refactor(TwoFactorComponentRefactor Feature Flag): [PM-8113] - Deprecate TwoFactorComponentRefactor feature flag in favor of UnauthenticatedExtensionUIRefresh feature flag. (#5120) 2025-02-20 10:10:10 -05:00
Jonas Hendrickx
4bef2357d5
[PM-18028] Enabling automatic tax for customers without country or with manual tax rates set (#5376) 2025-02-20 16:01:48 +01:00
Maciej Zieniuk
9f4aa1ab2b
[PM-15084] Push global notification creation to affected clients (#5079)
* PM-10600: Notification push notification

* PM-10600: Sending to specific client types for relay push notifications

* PM-10600: Sending to specific client types for other clients

* PM-10600: Send push notification on notification creation

* PM-10600: Explicit group names

* PM-10600: Id typos

* PM-10600: Revert global push notifications

* PM-10600: Added DeviceType claim

* PM-10600: Sent to organization typo

* PM-10600: UT coverage

* PM-10600: Small refactor, UTs coverage

* PM-10600: UTs coverage

* PM-10600: Startup fix

* PM-10600: Test fix

* PM-10600: Required attribute, organization group for push notification fix

* PM-10600: UT coverage

* PM-10600: Fix Mobile devices not registering to organization push notifications

We only register devices for organization push notifications when the organization is being created. This does not work, since we have a use case (Notification Center) of delivering notifications to all users of organization. This fixes it, by adding the organization id tag when device registers for push notifications.

* PM-10600: Unit Test coverage for NotificationHubPushRegistrationService

Fixed IFeatureService substitute mocking for Android tests.
Added user part of organization test with organizationId tags expectation.

* PM-10600: Unit Tests fix to NotificationHubPushRegistrationService after merge conflict

* PM-10600: Organization push notifications not sending to mobile device from self-hosted.

Self-hosted instance uses relay to register the mobile device against Bitwarden Cloud Api. Only the self-hosted server knows client's organization membership, which means it needs to pass in the organization id's information to the relay. Similarly, for Bitwarden Cloud, the organizaton id will come directly from the server.

* PM-10600: Fix self-hosted organization notification not being received by mobile device.

When mobile device registers on self-hosted through the relay, every single id, like user id, device id and now organization id needs to be prefixed with the installation id. This have been missing in the PushController that handles this for organization id.

* PM-10600: Broken NotificationsController integration test

Device type is now part of JWT access token, so the notification center results in the integration test are now scoped to client type web and all.

* PM-10600: Merge conflicts fix

* merge conflict fix

* PM-10600: Push notification with full notification center content.

Notification Center push notification now includes all the fields.

* PM-10564: Push notification updates to other clients

Cherry-picked and squashed commits:
d9711b6031 6e69c8a0ce 01c814595e 3885885d5f 1285a7e994 fcf346985f 28ff53c293 57804ae27c 1c9339b686

* PM-15084: Push global notification creation to affected clients

Cherry-picked and squashed commits:
ed5051e0eb 181f3e4ae6 49fe7c93fd a8efb45a63 7b4122c837 d21d4a67b3 186a09bb92 1531f564b5

* PM-15084: Log warning when invalid notification push notification sent

* explicit Guid default value

* push notification tests in wrong namespace

* Installation push notification not received for on global notification center message

* wrong merge conflict

* wrong merge conflict

* installation id type Guid in push registration request
2025-02-20 15:35:48 +01:00
Alex Morask
228ce3b2e9
Scale seats before inserting ProviderOrganization when adding existing organization (#5420) 2025-02-19 12:01:11 -05:00
Alex Morask
4f73081e41
Give provider credit for unused client organization time (#5421) 2025-02-19 10:13:03 -05:00
Alex Morask
43be2dbc83
Prevent organization disablement on addition to provider (#5419) 2025-02-19 09:52:17 -05:00
cyprain-okeke
fcb9848180
[PM-13620]Existing user email linking to create-organization (#5315)
* Changes for the existing customer

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* removed the added character

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2025-02-19 13:13:48 +01:00
Todd Martin
f27886e312
[PM-17932] Convert Renovate config to JSON5 (#5414)
* Migrated Renovate config to JSON5

* Apply Prettier

* Added comment for demonstration

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2025-02-18 12:54:11 -05:00
Todd Martin
055e4e3066
Add RequestDeviceIdentifier to response (#5403) 2025-02-18 10:42:00 -05:00
Jimmy Vo
ac443ed495
[pm-13985] Add a cancel endpoint to prevent authorization errors (#5229) 2025-02-18 09:53:49 -05:00
Brant DeBow
f80acaec0a
[PM-17562] Refactor to Support Multiple Message Payloads (#5400)
* [PM-17562] Refactor to Support Multiple Message Payloads

* Change signature as per PR suggestion
2025-02-14 13:38:27 -05:00
Alex Morask
5709ea36f4
[PM-15485] Add provider plan details to provider Admin pages (#5326)
* Add Provider Plan details to Provider Admin pages

* Run dotnet format

* Thomas' feedback

* Updated code ownership

* Robert's feedback

* Thomas' feedback
2025-02-14 12:03:09 -05:00
Jonas Hendrickx
288f08da2a
[PM-18268] SM Marketing Initiated Trials cause invoice previewing to … (#5404) 2025-02-14 18:01:49 +01:00
renovate[bot]
762acdbd03
[deps] Tools: Update MailKit to 4.10.0 (#5408)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2025-02-14 17:37:34 +01:00
Rui Tomé
f4c37df883
[PM-12490] Extract OrganizationService.EnableAsync into commands (#5321)
* Add organization enable command implementation

* Add unit tests for OrganizationEnableCommand

* Add organization enable command registration for dependency injection

* Refactor payment and subscription handlers to use IOrganizationEnableCommand for organization enabling

* Remove EnableAsync methods from IOrganizationService and OrganizationService

* Add xmldoc to IOrganizationEnableCommand

* Refactor OrganizationEnableCommand to consolidate enable logic and add optional expiration
2025-02-14 11:25:29 +00:00
Thomas Rittson
f4341b2f3b
[PM-14439] Add PolicyRequirementQuery for enforcement logic (#5336)
* Add PolicyRequirementQuery, helpers and models in preparation for migrating domain code

Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
2025-02-14 11:05:49 +00:00
Thomas Rittson
54d59b3b92
[PM-16812] Shortcut duplicate group patch requests (#5354)
* Copy PatchGroupCommand to vNext and refactor

* Detect duplicate add requests and return early

* Update read repository method to use HA replica

* Add new write repository method
2025-02-14 11:09:01 +10:00
Patrick-Pimentel-Bitwarden
ac6bc40d85
feat(2FA): [PM-17129] Login with 2FA Recovery Code
* feat(2FA): [PM-17129] Login with 2FA Recovery Code - Login with Recovery Code working.

* feat(2FA): [PM-17129] Login with 2FA Recovery Code - Feature flagged implementation.

* style(2FA): [PM-17129] Login with 2FA Recovery Code - Code cleanup.

* test(2FA): [PM-17129] Login with 2FA Recovery Code - Tests.
2025-02-13 15:51:36 -05:00
Graham Walker
465549b812
PM-17954 changing import permissions around based on requirements (#5385)
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2025-02-13 19:43:34 +01:00
rkac-bw
6cb00ebc8e
Add entity path to database test workflow (#5401)
* Add entity path to database test workflow

* Add entity path to pull request - path database test workflow

---------

Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
2025-02-13 08:57:41 -07:00
Maciej Zieniuk
c3924bbf3b
[PM-10564] Push notification updates to other clients (#5057)
* PM-10600: Notification push notification

* PM-10600: Sending to specific client types for relay push notifications

* PM-10600: Sending to specific client types for other clients

* PM-10600: Send push notification on notification creation

* PM-10600: Explicit group names

* PM-10600: Id typos

* PM-10600: Revert global push notifications

* PM-10600: Added DeviceType claim

* PM-10600: Sent to organization typo

* PM-10600: UT coverage

* PM-10600: Small refactor, UTs coverage

* PM-10600: UTs coverage

* PM-10600: Startup fix

* PM-10600: Test fix

* PM-10600: Required attribute, organization group for push notification fix

* PM-10600: UT coverage

* PM-10600: Fix Mobile devices not registering to organization push notifications

We only register devices for organization push notifications when the organization is being created. This does not work, since we have a use case (Notification Center) of delivering notifications to all users of organization. This fixes it, by adding the organization id tag when device registers for push notifications.

* PM-10600: Unit Test coverage for NotificationHubPushRegistrationService

Fixed IFeatureService substitute mocking for Android tests.
Added user part of organization test with organizationId tags expectation.

* PM-10600: Unit Tests fix to NotificationHubPushRegistrationService after merge conflict

* PM-10600: Organization push notifications not sending to mobile device from self-hosted.

Self-hosted instance uses relay to register the mobile device against Bitwarden Cloud Api. Only the self-hosted server knows client's organization membership, which means it needs to pass in the organization id's information to the relay. Similarly, for Bitwarden Cloud, the organizaton id will come directly from the server.

* PM-10600: Fix self-hosted organization notification not being received by mobile device.

When mobile device registers on self-hosted through the relay, every single id, like user id, device id and now organization id needs to be prefixed with the installation id. This have been missing in the PushController that handles this for organization id.

* PM-10600: Broken NotificationsController integration test

Device type is now part of JWT access token, so the notification center results in the integration test are now scoped to client type web and all.

* PM-10600: Merge conflicts fix

* merge conflict fix

* PM-10600: Push notification with full notification center content.

Notification Center push notification now includes all the fields.

* PM-10564: Push notification updates to other clients

Cherry-picked and squashed commits:
d9711b6031 6e69c8a0ce 01c814595e 3885885d5f 1285a7e994 fcf346985f 28ff53c293 57804ae27c 1c9339b686

* null check fix

* logging using template formatting
2025-02-13 14:23:33 +01:00
Maciej Zieniuk
0c482eea32
PM-10600: Missing Notification Center MaxLength on Body column (#5402) 2025-02-13 14:14:55 +01:00
Rui Tomé
459c91a5a9
[PM-13748] Remove SCIM provider type checks from group endpoints (#5231)
* [PM-13748] Remove SCIM provider type checks from group endpoints

* Remove Okta provider type config from group command tests

---------

Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
2025-02-13 10:30:50 +00:00
Alex Morask
5d3294c376
Fix issue with credit card payment (#5399) 2025-02-12 13:42:24 -05:00
Robyn MacCallum
71f293138e
Remove extra BWA sync flags (#5396) 2025-02-12 11:39:17 -05:00
Maciej Zieniuk
b98b74cef6
[PM-10600] Push notification with full notification center content (#5086)
* PM-10600: Notification push notification

* PM-10600: Sending to specific client types for relay push notifications

* PM-10600: Sending to specific client types for other clients

* PM-10600: Send push notification on notification creation

* PM-10600: Explicit group names

* PM-10600: Id typos

* PM-10600: Revert global push notifications

* PM-10600: Added DeviceType claim

* PM-10600: Sent to organization typo

* PM-10600: UT coverage

* PM-10600: Small refactor, UTs coverage

* PM-10600: UTs coverage

* PM-10600: Startup fix

* PM-10600: Test fix

* PM-10600: Required attribute, organization group for push notification fix

* PM-10600: UT coverage

* PM-10600: Fix Mobile devices not registering to organization push notifications

We only register devices for organization push notifications when the organization is being created. This does not work, since we have a use case (Notification Center) of delivering notifications to all users of organization. This fixes it, by adding the organization id tag when device registers for push notifications.

* PM-10600: Unit Test coverage for NotificationHubPushRegistrationService

Fixed IFeatureService substitute mocking for Android tests.
Added user part of organization test with organizationId tags expectation.

* PM-10600: Unit Tests fix to NotificationHubPushRegistrationService after merge conflict

* PM-10600: Organization push notifications not sending to mobile device from self-hosted.

Self-hosted instance uses relay to register the mobile device against Bitwarden Cloud Api. Only the self-hosted server knows client's organization membership, which means it needs to pass in the organization id's information to the relay. Similarly, for Bitwarden Cloud, the organizaton id will come directly from the server.

* PM-10600: Fix self-hosted organization notification not being received by mobile device.

When mobile device registers on self-hosted through the relay, every single id, like user id, device id and now organization id needs to be prefixed with the installation id. This have been missing in the PushController that handles this for organization id.

* PM-10600: Broken NotificationsController integration test

Device type is now part of JWT access token, so the notification center results in the integration test are now scoped to client type web and all.

* PM-10600: Merge conflicts fix

* merge conflict fix

* PM-10600: Push notification with full notification center content.

Notification Center push notification now includes all the fields.
2025-02-12 11:31:03 -05:00
Maciej Zieniuk
ae9bb427a1
[PM-10600] Push notification creation to affected clients (#4923)
* PM-10600: Notification push notification

* PM-10600: Sending to specific client types for relay push notifications

* PM-10600: Sending to specific client types for other clients

* PM-10600: Send push notification on notification creation

* PM-10600: Explicit group names

* PM-10600: Id typos

* PM-10600: Revert global push notifications

* PM-10600: Added DeviceType claim

* PM-10600: Sent to organization typo

* PM-10600: UT coverage

* PM-10600: Small refactor, UTs coverage

* PM-10600: UTs coverage

* PM-10600: Startup fix

* PM-10600: Test fix

* PM-10600: Required attribute, organization group for push notification fix

* PM-10600: UT coverage

* PM-10600: Fix Mobile devices not registering to organization push notifications

We only register devices for organization push notifications when the organization is being created. This does not work, since we have a use case (Notification Center) of delivering notifications to all users of organization. This fixes it, by adding the organization id tag when device registers for push notifications.

* PM-10600: Unit Test coverage for NotificationHubPushRegistrationService

Fixed IFeatureService substitute mocking for Android tests.
Added user part of organization test with organizationId tags expectation.

* PM-10600: Unit Tests fix to NotificationHubPushRegistrationService after merge conflict

* PM-10600: Organization push notifications not sending to mobile device from self-hosted.

Self-hosted instance uses relay to register the mobile device against Bitwarden Cloud Api. Only the self-hosted server knows client's organization membership, which means it needs to pass in the organization id's information to the relay. Similarly, for Bitwarden Cloud, the organizaton id will come directly from the server.

* PM-10600: Fix self-hosted organization notification not being received by mobile device.

When mobile device registers on self-hosted through the relay, every single id, like user id, device id and now organization id needs to be prefixed with the installation id. This have been missing in the PushController that handles this for organization id.

* PM-10600: Broken NotificationsController integration test

Device type is now part of JWT access token, so the notification center results in the integration test are now scoped to client type web and all.

* PM-10600: Merge conflicts fix

* merge conflict fix
2025-02-12 16:46:30 +01:00
Patrick Honkonen
9f5134e070
[PM-3503] Feature flag: Mobile AnonAddy self host alias generation (#5387) 2025-02-12 10:21:12 -05:00
Alex Morask
9c0f9cf43d
[PM-18221] Update credited user's billing location when purchasing premium subscription (#5393)
* Moved user crediting to PremiumUserBillingService

* Fix tests
2025-02-12 09:00:52 -05:00
Brant DeBow
02262476d6
[PM-17562] Add Azure Service Bus for Distributed Events (#5382)
* [PM-17562] Add Azure Service Bus for Distributed Events

* Fix failing test

* Addressed issues mentioned in SonarQube

* Respond to PR feedback

* Respond to PR feedback - make webhook opt-in, remove message body from log
2025-02-11 10:20:06 -05:00
Justin Baur
e01cace189
Turn on TreatWarningsAsError (#5384)
* Turn on TreatWarningsAsError for Release build

- Break Api intentionally

* Fix Api

* Treat warnings as errors no matter the configuration
2025-02-11 08:49:14 -05:00
SmithThe4th
bde11dae31
[PM-14590] Modify Notification database table (#5361)
* Added notification type enum

Added option type to entity

* created migration files

* made sprocs backward compatible

* made sprocs backward compatible

* Fixed linting

* Altered table to require an optional taskId

* formatted code

* Added foreignkey

* Formatted code

* fixed order
2025-02-10 11:39:48 -05:00
Github Actions
e4d862fe6e Bumped version to 2025.2.0 2025-02-10 11:24:00 +00:00
Daniel James Smith
d9d76a29a5
Remove generator-tools-modernization feature flag from server (#5377)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-02-07 14:10:10 -05:00
sneakernuts
7e47e1397f
SRE-1912 replaced with new path (#5380) 2025-02-07 08:47:44 -07:00
Jimmy Vo
a8b2dde615
[PM-18079] Fix intermittent failing database integration tests. (#5381) 2025-02-07 09:47:47 -05:00
cyprain-okeke
cc211647d7
[PM-17540]Do not grant re-subscriptions trial period (#5327)
* Remove trial for restarted subscription

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Resolve the pr comment on initial change

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Resolve the issue of not saving payment method

* Refactor the taxinfo mapping

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2025-02-07 15:43:14 +01:00
Justin Baur
af07dffa6f
Relax nullable in test projects (#5379)
* Relax nullable in test projects

* Fix xUnit Warnings

* More xUnit fixes
2025-02-06 17:07:43 -05:00
Conner Turnbull
f8b65e0477
Removed all usages of FluentAssertions (#5378) 2025-02-06 16:46:23 -05:00