1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-20 02:31:30 +01:00
Commit Graph

5549 Commits

Author SHA1 Message Date
Matt Gibson
2902fd59a1
Fixup tests 2025-02-13 10:06:20 -08:00
Matt Gibson
0e3e823dcc
Fixup merged tests 2025-02-13 08:14:16 -08:00
Matt Gibson
99528841e6
Merge remote-tracking branch 'origin/main' into web-push-poc 2025-02-12 15:40:03 -08:00
Matt Gibson
32f64f9bfd
Determine specific feature flag from set of flags 2025-02-12 13:54:53 -08:00
Matt Gibson
62c2456f6c
Fix FCM type typo 2025-02-12 13:53:54 -08:00
Matt Gibson
21594d1fa3
Name web push registration data 2025-02-12 13:49:59 -08:00
Matt Gibson
41528432ec
Set json content directly 2025-02-12 13:29:54 -08:00
Matt Gibson
f358fbaca5
Remove unused dependencies 2025-02-12 13:17:28 -08:00
Matt Gibson
72ae88612b
Remove debugging extension 2025-02-12 13:13:33 -08:00
Matt Gibson
b87f6bff10
Move to platform ownership 2025-02-12 13:12:34 -08:00
Matt Gibson
4e544b5483
fixup! Update src/Core/NotificationHub/NotificationHubConnection.cs 2025-02-12 13:10:22 -08:00
Alex Morask
5d3294c376
Fix issue with credit card payment (#5399) 2025-02-12 13:42:24 -05:00
Matt Gibson
1c1ccf4d50
Update src/Core/NotificationHub/NotificationHubConnection.cs
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2025-02-12 13:24:19 -05:00
Matt Gibson
25a2c18393
Update src/Core/NotificationHub/NotificationHubConnection.cs
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2025-02-12 13:23:44 -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
Matt Gibson
85b7a73221
Add web push feature flag to control config response 2025-02-11 17:37:32 -08:00
Matt Gibson
25b49ea464
Remove vapid private key
This is only needed to encrypt data for transmission along webpush -- it's handled by NotificationHub for us
2025-02-11 17:22:39 -08:00
Matt Gibson
773dd5590d
Merge remote-tracking branch 'origin/main' into web-push-poc 2025-02-11 17:12:24 -08: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
Bernd Schoolmann
58d2a7ddaa
[PM-17210] Prevent unintentionally corrupting private keys (#5285)
* Prevent unintentionally corrupting private keys

* Deny key update only when replacing existing keys

* Fix incorrect use of existing user public/encrypted private key

* Fix test

* Fix tests

* Re-add test

* Pass through error for set-password

* Fix test

* Increase test coverage and simplify checks
2025-02-06 20:38:50 +00:00
Todd Martin
f7d882d760
Remove feature flag from endpoint (#5342) 2025-02-06 14:37:15 -05:00
Jonas Hendrickx
a1ef07ea69
Revert "[PM-18028] Attempting to enable automatic tax on customer with invali…" (#5375)
This reverts commit 678d5d5d63.
2025-02-06 17:11:20 +01:00
Jonas Hendrickx
678d5d5d63
[PM-18028] Attempting to enable automatic tax on customer with invalid location (#5374) 2025-02-06 16:34:22 +01:00
Jonas Hendrickx
bc27ec2b9b
[PM-12765] Change error message when subscription canceled and attemp… (#5346) 2025-02-06 15:15:36 +01:00
Vijay Oommen
17f5c97891
PM-6939 - Onyx Integration into freshdesk controller (#5365) 2025-02-06 08:13:17 -06:00
Rui Tomé
a12b61cc9e
[PM-17168] Sync organization user revoked/restored status immediately via push notification (#5330)
* [PM-17168] Add push notification for revoked and restored organization users

* Add feature flag for push notification on user revoke/restore actions

* Add tests for user revocation and restoration with push sync feature flag enabled
2025-02-06 10:28:12 +00:00
cyprain-okeke
1c3ea1151c
[PM-16482]NullReferenceException in CustomerUpdatedHandler due to uninitialized dependency (#5349)
* Changes to throw exact errors

* Add some logging to each error state

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2025-02-06 09:22:16 +01:00
Graham Walker
daf2696a81
PM-16085 - Increase import limitations (#5275)
* PM-16261 move ImportCiphersAsync to the tools team and create services using CQRS design pattern

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

* PM-16261 clean up old code from test

* make import limits configurable via appsettings

* PM-16085 fix issue with appSettings converting to globalSettings for new cipher import limits
2025-02-05 16:36:18 -06:00
SmithThe4th
46004b9c68
[PM-14381] Add POST /tasks/bulk-create endpoint (#5188)
* [PM-14378] Introduce GetCipherPermissionsForOrganization query for Dapper CipherRepository

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

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

* [PM-14378] Introduce IGetCipherPermissionsForUserQuery CQRS query

* [PM-14378] Introduce SecurityTaskOperationRequirement

* [PM-14378] Introduce SecurityTaskAuthorizationHandler.cs

* [PM-14378] Introduce SecurityTaskOrganizationAuthorizationHandler.cs

* [PM-14378] Register new authorization handlers

* [PM-14378] Formatting

* [PM-14378] Add unit tests for GetCipherPermissionsForUserQuery

* [PM-15378] Cleanup SecurityTaskAuthorizationHandler and add tests

* [PM-14378] Add tests for SecurityTaskOrganizationAuthorizationHandler

* [PM-14378] Formatting

* [PM-14378] Update date in migration file

* [PM-14378] Add missing awaits

* Added bulk create request model

* Created sproc to create bulk security tasks

* Renamed tasks to SecurityTasksInput

* Added create many implementation for sqlserver and ef core

* removed trailing comma

* created ef implementatin for create many and added integration test

* Refactored request model

* Refactored request model

* created create many tasks command interface and class

* added security authorization handler work temp

* Added the implementation for the create manys tasks command

* Added comment

* Changed return to return list of created security tasks

* Registered command

* Completed bulk create action

* Added unit tests for the command

* removed hard coded table name

* Fixed lint issue

* Added JsonConverter attribute to allow enum value to be passed as string

* Removed makshift security task operations

* Fixed references

* Removed old migration

* Rebased

* [PM-14378] Introduce GetCipherPermissionsForOrganization query for Dapper CipherRepository

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

* [PM-14378] Add unit tests for GetCipherPermissionsForUserQuery

* Completed bulk create action

* bumped migration version

* Fixed lint issue

* Removed complex sql data type in favour of json string

* Register IGetTasksForOrganizationQuery

* Fixed lint issue

* Removed tasks grouping

* Fixed linting

* Removed unused code

* Removed unused code

* Aligned with client change

* Fixed linting

---------

Co-authored-by: Shane Melton <smelton@bitwarden.com>
2025-02-05 16:56:01 -05:00
Justin Baur
a971a18719
[PM-17957] Pin Transitive Deps (#5371)
* Remove duplicate quartz reference

* Pin Core packages

* Pin Notifications packages
2025-02-05 15:32:27 -05:00
Patrick Honkonen
77364549fa
[PM-16157] Add feature flag for mTLS support in Android client (#5335)
Add a feature flag to control support for selecting a mutual TLS client certificate within the Android client.
2025-02-05 15:03:13 +00:00
Rui Tomé
03c390de74
[PM-15637] Notify Custom Users with “Manage Account Recovery” permission for Device Approval Requests (#5359)
* Add stored procedure to read organization user details by role

* Add OrganizationUserRepository method to retrieve OrganizationUser details by role

* Enhance AuthRequestService to send notifications to custom users with ManageResetPassword permission

* Enhance AuthRequestServiceTests to include custom user permissions and validate notification email recipients
2025-02-05 14:47:06 +00:00
Tom
617bb5015f
Removing the member access feature flag from the server (#5368) 2025-02-05 10:57:19 +01:00
cyprain-okeke
a8a08a0c8f
Remove the feature flag (#5331) 2025-02-05 09:18:23 +01:00
Jason Ng
412c6f9849
[PM-11162] Assign to Collection Permission Update (#4844)
Only users with Manage/Edit permissions will be allowed to Assign To Collections. If the user has Can Edit Except Password the collections dropdown will be disabled.

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: kejaeger <138028972+kejaeger@users.noreply.github.com>
2025-02-04 15:45:24 -05:00
Todd Martin
90680f482a
Revert version from 2025.1.5 to 2025.1.4 (#5369) 2025-02-04 15:40:17 -05:00
Alex Morask
72b78ed655
Update feature flag name (#5364) 2025-02-04 14:58:54 -05:00