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

2394 Commits

Author SHA1 Message Date
Conner Turnbull
4871f0b956
Ran dotnet format (#5218)
* Ran `dotnet format`

* Re-added usings
2025-01-03 16:00:52 -05:00
Conner Turnbull
f74b94b5f7
[PM-16700] Handling nulls in UserLicenseClaimsFactory (#5217)
* Handling nulls in UserLicenseClaimsFactory

* Only setting Token if the flag is enabled
2025-01-03 20:34:29 +00:00
Alex Morask
c14b192e0c
[PM-16684] Add a Pricing Client and mapping layer back to StaticStore.Plan (#5213)
* Add a Pricing Client and mapping layer back to StaticStore.Plan

* Run dotnet format

* Temporarily remove service registration to forego any unforseen side effects

* Run dotnet format
2025-01-03 10:14:07 -05:00
Jonas Hendrickx
97e11774e3
[PM-13999] show estimated tax for taxable countries (#5110) 2025-01-02 20:27:53 +01:00
renovate[bot]
1062c6d522
[deps] Billing: Update Sentry.Serilog to v5 (#5182)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-02 16:13:16 +01:00
cyprain-okeke
d924c6721a
[PM-15814]Alert owners of reseller-managed orgs to renewal events (#5193)
* Changes for the admin console alert

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

* Fix the failing test

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

* Add the feature flag

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-12-31 18:06:29 +01:00
Robyn MacCallum
854119b58c
Add app review prompt flag (#5190) 2024-12-26 14:50:23 -05:00
renovate[bot]
0989e7fd5b
[deps] DbOps: Update Microsoft.Extensions.Caching.Cosmos to 1.7.0 (#4721)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-23 15:39:40 -05:00
Matt Bishop
eb7454bb86
Update Duende license from renewal (#5169) 2024-12-19 14:22:13 -05:00
Tom
a3da5b2f0a
Removing access intelligence server side feature flag (#5158) 2024-12-19 11:00:47 -05:00
renovate[bot]
cb7cbb630a
[deps] Tools: Update Microsoft.Extensions.Configuration to v9 (#5072)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-19 12:57:03 +00:00
cyprain-okeke
322a07477a
organization status changed code changes (#5113)
* organization status changed code changes

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

* Add the push notification to subscriptionUpdated

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

* send notification using the SendPayloadToUser

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

* Change the implementation to send userId

* Added new implementation for orgstatus sync

* refactor the code and remove private methods

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-12-18 16:31:07 +01:00
Maciej Zieniuk
21fcfcd5e8
[PM-10563] Notification Center API (#4852)
* PM-10563: Notification Center API

* PM-10563: continuation token hack

* PM-10563: Resolving merge conflicts

* PM-10563: Unit Tests

* PM-10563: Paging simplification by page number and size in database

* PM-10563: Request validation

* PM-10563: Read, Deleted status filters change

* PM-10563: Plural name for tests

* PM-10563: Request validation to always for int type

* PM-10563: Continuation Token returns null on response when no more records available

* PM-10563: Integration tests for GET

* PM-10563: Mark notification read, deleted commands date typos fix

* PM-10563: Integration tests for PATCH read, deleted

* PM-10563: Request, Response models tests

* PM-10563: EditorConfig compliance

* PM-10563: Extracting to const

* PM-10563: Update db migration script date

* PM-10563: Update migration script date
2024-12-18 09:59:50 -05:00
renovate[bot]
de2dc243fc
[deps] Tools: Update MailKit to 4.9.0 (#5133)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 14:18:37 +01:00
Ike
2e8f2df942
feat(NewDeviceVerification) : (#5153)
feat(NewDeviceVerification) :
Added constat for the cache key in Bit.Core because the cache key format needs to be shared between the Identity Server and the MVC Admin project.
Updated DeviceValidator class to handle checking cache for user information to allow pass through.
Updated and Added tests to handle new flow.
2024-12-17 08:59:39 -08:00
Rui Tomé
b75c63c2c6
[PM-15957] Fix: Domain Claim fails to enable Single Organization Policy, sends no emails and Revokes all users (#5147)
* Add JSON-based stored procedure for updating account revision dates and modify existing procedure to use it

* Refactor SingleOrgPolicyValidator to revoke only non-compliant organization users and update related tests
2024-12-17 15:57:31 +00:00
Robyn MacCallum
b907935eda
Add Authenticator sync flags (#5159)
* Add Authenticator sync flags

* Fix whitespace
2024-12-16 16:18:33 -05:00
Thomas Avery
7637cbe12a
[PM-13362] Add private key regeneration endpoint (#4929)
* Add new RegenerateUserAsymmetricKeysCommand

* add new command tests

* Add regen controller

* Add regen controller tests

* add feature flag

* Add push notification to sync new asymmetric keys to other devices
2024-12-16 12:01:09 -06:00
Ike
c446ac86fe
[PM-12512] Add Endpoint to allow users to request a new device otp (#5146)
feat(NewDeviceVerification): Added a resend new device OTP endpoint and method for the IUserService as well as wrote test for new methods for the user service.
2024-12-16 07:57:56 -08:00
renovate[bot]
8994d1d7dd
[deps] Tools: Update aws-sdk-net monorepo (#5126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2024-12-16 15:11:56 +00:00
Conner Turnbull
9321515eca
[PM-10873] Updated errors thrown when creating organization on selfhost to be more specific (#5007)
* Updated errors thrown when creating organization on selfhost to be more specific

* Added additional validation to ensure that the license type is accurate

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-12-16 08:04:05 -05:00
SmithThe4th
141a046a28
[PM-14377] Add PATCH complete endpoint (#5100)
* Added CQRS pattern

* Added the GetManyByUserIdAsync signature to the repositiory

* Added sql sproc

Created user defined type to hold status

Created migration file

* Added ef core query

* Added absract and concrete implementation for GetManyByUserIdStatusAsync

* Added integration tests

* Updated params to status

* Implemented new query to utilize repository method

* Added controller for the security task endpoint

* Fixed lint issues

* Added documentation

* simplified to require single status

modified script to check for users with edit rights

* Updated ef core query

* Added new assertions

* simplified to require single status

* fixed formatting

* Fixed sql script

* Removed default null

* Added OperationAuthorizationRequirement for secruity task

* Added and registered MarkTaskAsCompletedCommand

* Added unit tests for the command

* Added complete endpoint

* removed false value
2024-12-13 14:50:20 -05:00
Rui Tomé
6da7fdc39e
[PM-15547] Revoke managed user on 2FA removal if enforced by organization policy (#5124)
* Revoke managed user on 2FA removal if enforced by organization policy

* Rename TwoFactorDisabling to TwoFactorDisabled in EventSystemUser enum
2024-12-13 11:32:29 +00:00
SmithThe4th
a332a69112
[PM-14376] Add GET tasks endpoint (#5089)
* Added CQRS pattern

* Added the GetManyByUserIdAsync signature to the repositiory

* Added sql sproc

Created user defined type to hold status

Created migration file

* Added ef core query

* Added absract and concrete implementation for GetManyByUserIdStatusAsync

* Added integration tests

* Updated params to status

* Implemented new query to utilize repository method

* Added controller for the security task endpoint

* Fixed lint issues

* Added documentation

* simplified to require single status

modified script to check for users with edit rights

* Updated ef core query

* Added new assertions

* simplified to require single status

* fixed formatting

* Fixed sql script

* Removed default null

* Added security tasks feature flag
2024-12-12 14:27:31 -05:00
Brandon Treston
03dde0d008
update copy for domain claimed by organization email (#5138) 2024-12-12 13:54:04 -05:00
Ike
867fa848dd
[PM-8220] New Device Verification (#5084)
* feat(BaseRequestValidator): 
Add global setting for new device verification.
Refactor BaseRequestValidator enabling better self-documenting code and better single responsibility principle for validators.
Updated DeviceValidator to handle new device verification, behind a feature flag.
Moved IDeviceValidator interface to separate file.
Updated CustomRequestValidator to act as the conduit by which *Validators communicate authentication context between themselves and the RequestValidators.
Adding new test for DeviceValidator class.
Updated tests for BaseRequestValidator as some functionality was moved to the DeviceValidator class.
2024-12-12 09:08:11 -08:00
Alex Morask
c852575a9e
[PM-14984] Use provider subscription for MSP managed enterprise license (#5102)
* Use provider subscription when creating license for MSP managed enterprise organization

* Run dotnet format
2024-12-12 07:08:17 -05:00
Alex Morask
2d891b396a
[PM-11127] Write OrganizationInstallation record when license is retrieved (#5090)
* Add SQL files

* Add SQL Server migration

* Add Core entity

* Add Dapper repository

* Add EF repository

* Add EF migrations

* Save OrganizationInstallation during GetLicense invocation

* Run dotnet format
2024-12-11 13:55:00 -05:00
Todd Martin
9b732c739a
[PM-15907] Disable cipher key encryption on self-hosted instances (#5140)
* Disable cipher key encryption on self-hosted instances

* Removed override instead of setting to false
2024-12-11 10:10:20 -05:00
Rui Tomé
170836aba1
Update unclaimed domains email copy (#5116) 2024-12-11 14:48:00 +00:00
Jonas Hendrickx
64573d01a3
[PM-6201] Fix creation of organizations no longer working after merging #5130 (#5142) 2024-12-11 14:56:46 +01:00
Rui Tomé
9b478107b6
[PM-15128] Add Promote Provider Service User functionality to Bitwarden Portal (#5118)
* Add Promote Provider Service User feature to Admin Portal

* Rename feature flag key for Promote Provider Service User tool
2024-12-11 11:09:12 +00:00
Jonas Hendrickx
674e522843
[PM-6201] Self-Host Admin Portal is reporting "10239 GB of Additional… (#5130) 2024-12-11 10:32:28 +01:00
Vincent Salucci
39ce7637c9
fix: remove policy definitions feature flag, refs PM-14245 (#5139) 2024-12-10 18:50:06 +00:00
Jonas Hendrickx
fe70db3e87
[PM-12765] Display error when attempting to autoscale canceled subscription (#5132) 2024-12-10 16:42:14 +01:00
Brandon Treston
4730d2dab7
add feature flag (#5114) 2024-12-10 09:55:36 -05:00
Rui Tomé
127f1fd34d
[PM-10338] Update the Organization 'Leave' endpoint to log EventType.OrganizationUser_Left (#4908)
* Implement UserLeaveAsync in IRemoveOrganizationUserCommand and refactor OrganizationsController to use it

* Edit summary message for IRemoveOrganizationUserCommand.UserLeaveAsync

* Refactor RemoveOrganizationUserCommand.RemoveUsersAsync to log in bulk

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-12-10 11:14:34 +00:00
Conner Turnbull
2212f552aa
Updated quartz jobs to create a container scope to allow for scoped services (#5131) 2024-12-09 14:56:12 -05:00
Brandon Treston
c591997d01
[PM-13013] add delete many async method to i user repository and i user service for bulk user deletion (#5035)
* Add DeleteManyAsync method and stored procedure

* Add DeleteManyAsync and tests

* removed stored procedure, refactor User_DeleteById to accept multiple Ids

* add sproc, refactor tests

* revert existing sproc

* add bulk delete to IUserService

* fix sproc

* fix and add tests

* add migration script, fix test

* Add feature flag

* add feature flag to tests for deleteManyAsync

* enable nullable, delete only user that pass validation

* revert changes to DeleteAsync

* Cleanup whitespace

* remove redundant feature flag

* fix tests

* move DeleteManyAsync from UserService into DeleteManagedOrganizationUserAccountCommand

* refactor validation, remove unneeded tasks

* refactor tests, remove unused service
2024-12-06 14:40:47 -05:00
Addison Beck
092b0b8bd2
Remove LimitCollectionCreationDeletionSplit feature flag (#4809)
* Remove references to feature flag

* Demote entity property to an EF shadow property

* Add a few excludes to license file tests
2024-12-06 11:46:17 +01:00
Jared McCannon
2333a934a9
[PM-12488] Migrating Cloud Org Sign Up to Command (#5078) 2024-12-06 13:18:02 +10:00
Thomas Rittson
6a9b7ece2b
[PM-11360] Remove export permission for providers (#5051)
- also fix managed collections export from CLI
2024-12-06 08:07:04 +10:00
Vijay Oommen
1f1510f4d4
PM-15091 Add Feature Flag to DB called UseRiskInsights (#5088)
Add a new column called UseRiskInsights to `dbo.Organization`
2024-12-05 10:46:01 -06:00
Jared McCannon
f471fffe42
[PM-10317] Email Users For Org Claiming Domain (#5094)
* Revoking users when enabling single org and 2fa policies. Fixing tests.

* Added migration.

* Wrote tests and fixed bugs found.

* Patch build process

* Fixing tests.

* Added unit test around disabling the feature flag.

* Updated error message to be public and added test for validating the request.

* formatting

* Added some tests for single org policy validator.

* Fix issues from merge.

* Added sending emails to revoked non-compliant users.

* Fixing name. Adding two factor policy email.

* Send email when user has been revoked.

* Correcting migration name.

* Fixing templates and logic issue in Revoke command.

* Moving interface into its own file.

* Correcting namespaces for email templates.

* correcting logic that would not allow normal users to revoke non owners.

* Actually correcting the test and logic.

* dotnet format. Added exec to bottom of bulk sproc

* Update src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/RevokeNonCompliantOrganizationUserCommand.cs

Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>

* Updated OrgIds to be a json string

* Fixing errors.

* Updating test

* Moving command result.

* Formatting and request rename

* Realized this would throw a null error from the system domain verification. Adding unknown type to event system user. Adding optional parameter to SaveAsync in policy service in order to pass in event system user.

* Code review changes

* Removing todos

* Corrected test name.

* Syncing filename to record name.

* Fixing up the tests.

* Added happy path test

* Naming corrections. And corrected EF query.

* added check against event service

* Code review changes.

* Fixing tests.

* splitting up tests

* Added templates and email side effect for claiming a domain.

* bringing changes from nc user changes.

* Switched to enqueue mail message.

* Filled in DomainClaimedByOrganization.html.hbs

* Added text document for domain claiming

* Fixing migration script.

* Remove old sproc

* Limiting sending of the email down to users who are a part of the domain being claimed.

* Added test for change

* Renames and fixed up email.

* Fixing up CSS

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
Co-authored-by: Rui Tome <rtome@bitwarden.com>
2024-12-05 14:59:35 +00:00
Conner Turnbull
04cf513d78
[PM-11516] Initial license file refactor (#5002)
* Added the ability to create a JWT on an organization license that contains all license properties as claims

* Added the ability to create a JWT on a user license that contains all license properties as claims

* Added ability to consume JWT licenses

* Resolved generic type issues when getting claim value

* Now validating the jwt signature, exp, and iat

* Moved creation of ClaimsPrincipal outside of licenses given dependecy on cert

* Ran dotnet format. Resolved identity error

* Updated claim types to use string constants

* Updated jwt expires to be one year

* Fixed bug requiring email verification to be on the token

* dotnet format

* Patch build process

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-12-05 14:31:14 +00:00
Robyn MacCallum
0e32dcccad
Update Constants.cs (#5112) 2024-12-04 14:42:12 -05:00
Nick Krantz
74e86935a4
add PM9111ExtensionPersistAddEditForm feature flag (#5106) 2024-12-04 11:19:10 -06:00
Jonas Hendrickx
90a9473a5e
Revert "[PM-13999] Show estimated tax for taxable countries (#5077)" (#5109)
This reverts commit 94fdfa40e8.

Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
2024-12-04 14:36:11 +00:00
Jonas Hendrickx
94fdfa40e8
[PM-13999] Show estimated tax for taxable countries (#5077) 2024-12-04 11:45:11 +01:00
Thomas Rittson
44b687922d
[PM-14245] Remove policy definitions feature flag (#5095)
* Remove PolicyService.SaveAsync and use command instead

* Delete feature flag definition

* Add public api integration tests
2024-12-04 11:50:47 +10:00