1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00
Commit Graph

3750 Commits

Author SHA1 Message Date
Kyle Spearrin
d2567dd42d
[PM-5518] Refactor Email Token Providers (#3784)
* new email token providers

* move email redaction to core helpers

* make token options configurable

* protected setters on options

* fix email token provider tests

* fix core tests

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-07-11 14:39:27 -04:00
Justin Baur
1292736f54
[PM-7682] Add Explicit Reference to Microsoft.AspNetCore.DataProtection (#4010)
* Add Explicit Reference to Microsoft.AspNetCore.DataProtection

* Use Version That Doesn't Cause Downgrade

* Update src/Core/Core.csproj

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-07-11 12:02:42 -04:00
Conner Turnbull
5ccb4072a3
[AC-2766] famlies sponsorship upcoming invoice email (#4181)
* Getting the fresh invoice if the subscription was updated when validation the families sponsorship

* Getting fresh invoice after validation families sponsorship fails

* Also updating invoice line items
2024-07-11 15:51:04 +00:00
renovate[bot]
b6940f3184
[deps] Tools: Update MailKit to v4.7.0 (#4499)
* [deps] Tools: Update MailKit to v4.7.0

* Add explicit reference to System.Formats.Asn1 to address Microsoft Security Advisory CVE-2024-38095

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-07-11 17:33:25 +02:00
Alex Morask
a51e4c0a7c
Used PO ID instead of Org ID on accident (#4500) 2024-07-11 11:22:15 -04:00
Justin Baur
cf8ec4ed41
Add Explicit Version Reference for Azure.Identity (#4501)
* Explicit Bump to Azure.Identity

* Remove Change That Was Just For Testing
2024-07-11 11:12:34 -04:00
renovate[bot]
b1816b7af1
[deps] Tools: Update SignalR to v8.0.7 (#4497)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-11 16:16:49 +02:00
Rui Tomé
3bbac5693f
[AC-2824] Change DuplicateAuthRequestException to Inherit from BadRequestException for Correct 400 Status Code (#4470) 2024-07-11 14:46:18 +01:00
renovate[bot]
491add3363
[deps] Tools: Update aws-sdk-net monorepo (#4498)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-11 15:37:53 +02:00
renovate[bot]
085fe88d23
[deps] Platform: Update dotnet monorepo to v8 (major) (#3745)
* [deps] Platform: Update dotnet monorepo to v8

* Bump Microsoft.Extensions.DependencyInjection.Abstractions

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-07-11 09:05:40 -04:00
Thomas Rittson
ca50eb8fe3
[AC-2741] Turn on BulkDeviceApproval feature for self-host (#4453)
Also remove the feature flagging on server, but keep definition
for old clients
2024-07-11 08:38:06 +10:00
Thomas Rittson
8f70dd98ba
[AC-2732] Remove AccessAll - Bump account revision date sprocs (#4490)
* Remove AccessAll logic from bump account revision date sprocs
and corresponding EF methods
2024-07-11 08:01:39 +10:00
Thomas Rittson
4ab608a636
[AC-2733] Remove AccessAll - misc sprocs (#4477)
Remove AccessAll logic from miscellaneous sprocs
and corresponding EF queries
2024-07-11 08:00:28 +10:00
Alex Morask
de1b5371b4
[AC-2849] Update organization autoscaling error message when managed by CB MSP (#4489)
* Update autoscaling error message for CB MSP organizations

* Run dotnet format

* Update error message per Product requirements
2024-07-10 10:16:51 -04:00
Bernd Schoolmann
79a5ed42d5
[PM-4154] Add PM-4154-bulk-encryption-service feature flag (#4091)
* Add multi-worker encryption service feature flag

* Rename flag to BulkEncryptionService
2024-07-10 10:01:26 -04:00
Conner Turnbull
9e78236a72
Removed automatic tax feature flag (#4487) 2024-07-10 07:32:41 -04:00
Vincent Salucci
ff8a436cd4
chore: remove UnassignedItemBanners feature flag and API endpoint, refs AC-2520 (#4461) 2024-07-09 15:59:41 -05:00
renovate[bot]
41135c866d
[deps] DbOps: Update EntityFrameworkCore to v8.0.7 (#4484)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-09 12:11:35 -04:00
Addison Beck
15e5b44649
Add a feature flag (#4483) 2024-07-09 16:32:47 +01:00
Thomas Avery
acc4808509
[SM-1256] Add BulkSecretAuthorizationHandler (#4099)
* Add AccessToSecretsAsync to the repository

* Add BulkSecretAuthorizationHandler

* Update controller to use the new authz handler

* Add integration test coverage
2024-07-09 10:06:33 -05:00
renovate[bot]
313eef49f0
[deps] Tools: Update aws-sdk-net monorepo (#4474)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-09 15:24:46 +02:00
Alex Morask
25dcdb8c04
Add members page FF (#4457) 2024-07-09 09:09:19 -04:00
Jake Fink
d85fbf9f01
only use Secure cookies if on a https connection (#4472) 2024-07-09 08:51:56 -04:00
Thomas Rittson
1525c10bfb
[AC-2731] Remove AccessAll - Collection and Cipher functions (#4469)
* Remove AccessAll logic from UserCollectionDetails and UserCipherDetails
  and EF equivalents
2024-07-09 13:50:40 +10:00
renovate[bot]
5c1a471cb0
[deps]: Update MessagePack to v2.5.171 (#4475)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-08 16:44:45 -07:00
Thomas Rittson
202dce3459
[AC-2730] Remove AccessAll - CollectionCipher (#4468)
Final removal of AccessAll logic in CollectionCipher sprocs. We had v2 sprocs already
containing this updated logic that were never used; copy the v2 logic back to the 
original sprocs so that we start using it. v2 sprocs will be dropped later.
2024-07-09 09:39:24 +10:00
Vincent Salucci
3f443ac49b
[AC-2662] Remove FC MVP from CurrentContext (#4460)
* chore: remove EditAssignedCollections from current context, refs AC-2662

* chore: remove DeleteAssignedCollections from CurrentContext, refs AC-2662

* chore: remove ViewAssignedCollections from CurrentContext, refs AC-2662
2024-07-08 14:40:35 -05:00
Todd Martin
25cf61190a
Add key change fields to view in Bitwarden Portal (#4465) 2024-07-05 16:57:12 -04:00
Alex Morask
9c8a9f41fb
[AC-2804] Add client ID to provider client invoice report (#4458)
* Add client ID to provider client invoice report

* Run dotnet format
2024-07-05 10:12:03 -04:00
Justin Baur
8b5f65fc00
PM-2944] Make Entities Nullable In Admin Console (#4386)
* Enable `nullable` in `ISubscriber`

* Enable `nullable` in `Group`

* Enable `nullable` in `GroupUser`

* Enable `nullable` in `Organization`

* Enable `nullable` in `OrganizationUser`

* Enable `nullable` in `Policy`

* Enable `nullable` in `Provider`

* Enable `nullable` in `ProviderOrganization`

* Enable `nullable` in `ProviderUser`

* Update Tests

* Formatting

* Update TwoFactor Tests

* Fix Scim Tests

* Format

* Add Migrations

* Format
2024-07-04 21:14:37 -04:00
Thomas Rittson
7da37ee231
Drop unused CollectionRepository sprocs (#4455) 2024-07-05 09:43:31 +10:00
Justin Baur
b2df2e82dd
[PM-2944] Enable nullable For Billing Entities (#4390)
* Enable `nullable` For Billing Entities

* Remove .gitignore Change
2024-07-03 15:17:18 -04:00
Justin Baur
1d09b88ade
[PM-2944] Enable Nullable For Secrets Manager (#4389)
* Enable `nullable` for `ApiKey`

* Switch to Using `required`

* Make Scope Be Valid JSON

* Update test/Api.IntegrationTest/SecretsManager/Controllers/ServiceAccountsControllerTests.cs

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Apply suggestions from code review

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

* Move Nullable Directive

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
Co-authored-by: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com>
2024-07-03 15:17:10 -04:00
Justin Baur
6eb2a6e75d
[PM-2944] Make Entities Nullable On Unowned Types (#4388)
* Enable `nullable` For Collection

* Enable `nullable` For `CollectionCipher`

* Enable `nullable` For `CollectionGroup`

* Enable `nullable` For `CollectionUser`

* Enable `nullable` For `Device`

* Enable `nullable` For `Event`

* Enable `nullable` For `Folder`

* Enable `nullable` For `Installation`

* Enable `nullable` For `IRevisable`

* Enable `nullable` For `IStorable`

* Enable `nullable` For `IStorableSubscriber`

* Enable `nullable` For `ITableObject`

* Enable `nullable` For `OrganizationApiKey`

* Enable `nullable` For `OrganizationConnection`

* Enable `nullable` For `OrganizationDomain`

* Enable `nullable` For `OrganizationSponsorship`

* Enable `nullable` For `Role`

* Enable `nullable` For `TaxRate`

* Enable `nullable` For `Transaction`

* Enable `nullable` For `User`
2024-07-03 15:17:02 -04:00
Kyle Spearrin
0d3a7b3dd5
[PM-5518] Sql-backed IDistributedCache (#3791)
* Sql-backed IDistributedCache

* sqlserver cache table

* remove unused using

* setup EF entity

* cache indexes

* add back cipher

* revert SetupEntityFramework change

* ef cache

* EntityFrameworkCache

* IServiceScopeFactory for db context

* implement EntityFrameworkCache

* move to _serviceScopeFactory

* move to config file

* ef migrations

* fixes

* datetime and error codes

* revert migrations

* migrations

* format

* static and namespace fix

* use time provider

* Move SQL migration and remove EF one for the moment

* Add clean migration of just the new table

* Formatting

* Test Custom `IDistributedCache` Implementation

* Add Back Logging

* Remove Double Logging

* Skip Test When Not EntityFrameworkCache

* Format

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-07-03 12:48:23 -04:00
cd-bitwarden
b8f71271eb
[Sm-1197] - dupe guids (#4202)
* Show a more detailed error message if duplicate GUIDS are passed ot get by Ids

* Update test/Api.IntegrationTest/SecretsManager/Controllers/SecretsControllerTests.cs

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update src/Api/SecretsManager/Models/Request/GetSecretsRequestModel.cs

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update src/Api/SecretsManager/Models/Request/GetSecretsRequestModel.cs

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Making requested changes to tests

* lint fix

* fixing whitespace

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2024-07-03 11:50:11 -04:00
Thomas Rittson
76f6e68a36
[AC-2799] Finalize sprocs that added the Manage permission (2 of 3) (#4452)
Update repository code to use non-v2 sprocs
2024-07-03 11:43:15 -04:00
Alex Morask
07d37b1b41
[AC-2805] Add AssignedSeats to ProviderOrganizationOrganizationDetailsView (#4446)
* Add 'AssignedSeats' to ProviderOrganizationOrganizationDetailsView

* Add newline

* Thomas' feedback
2024-07-03 10:33:37 -04:00
Thomas Rittson
ef44def88b
[AC-2810] Remove unused FlexibleCollections feature flag from CollectionCipher Repository (#4284)
Remove FlexibleCollections feature flag logic for repository methods:
* GetManyByUserIdAsync
* GetManyByUserIdCipherIdAsync
* UpdateCollectionsAsync
* UpdateCollectionsForCiphersAsync

This feature flag was never turned on and we will update the sprocs
directly as required.
2024-07-03 12:06:36 +10:00
Thomas Rittson
4e0a981b43
[AC-2809] Remove unused FlexibleCollections feature flag from Cipher Repository (#4282)
Remove FlexibleCollections feature flag logic for repository methods:
* CiphersController.GetByIdAsync
* CipherRepository.DeleteAsync
* CipherRepository.MoveAsync
* RestoreAsync
* SoftDeleteAsync

This feature flag was never turned on and we will update the sprocs
directly as required.
2024-07-03 11:45:44 +10:00
Jared Snider
8471326b1e
Auth/PM-7322 - Registration with Email verification - Finish registration endpoint (#4182)
* PM-7322 - AccountsController.cs - create empty method + empty req model to be able to create draft PR.

* PM-7322 - Start on RegisterFinishRequestModel.cs

* PM-7322 - WIP on Complete Registration endpoint

* PM-7322 - UserService.cs - RegisterUserAsync - Tweak of token to be orgInviteToken as we are adding a new email verification token to the mix.

* PM-7322 - UserService - Rename MP to MPHash

* PM-7322 - More WIP progress on getting new finish registration process in place.

* PM-7322 Create IRegisterUserCommand

* PM-7322 - RegisterUserCommand.cs - first WIP draft

* PM-7322 - Implement use of new command in Identity.

* PM-7322 - Rename RegisterUserViaOrgInvite to just be RegisterUser as orgInvite is optional.

* PM07322 - Test RegisterUserCommand.RegisterUser(...) happy paths and one bad request path.

* PM-7322 - More WIP on RegisterUserCommand.cs and tests

* PM-7322 - RegisterUserCommand.cs - refactor ValidateOrgInviteToken logic to always validate the token if we have one.

* PM-7322 - RegisterUserCommand.cs - Refactor OrgInviteToken validation to be more clear + validate org invite token even in open registration scenarios + added tests.

* PM-7322 - Add more test coverage to RegisterUserWithOptionalOrgInvite

* PM-7322 - IRegisterUserCommand - DOCS

* PM-7322 - Test RegisterUser

* PM-7322 - IRegisterUserCommand - Add more docs.

* PM-7322 - Finish updating all existing user service register calls to use the new command.

* PM-7322 - RegistrationEmailVerificationTokenable.cs changes + tests

* PM-7322 - RegistrationEmailVerificationTokenable.cs changed to only verify email as it's the only thing we need to verify + updated tests.

* PM-7322 - Get RegisterUserViaEmailVerificationToken built and tested

* PM-7322 - AccountsController.cs - get bones of PostRegisterFinish in place

* PM-7322 - SendVerificationEmailForRegistrationCommand - Feature flag timing attack delays per architecture discussion with a default of keeping them around.

* PM-7322 - RegisterFinishRequestModel.cs - EmailVerificationToken must be optional for org invite scenarios.

* PM-7322 - HandlebarsMailService.cs - SendRegistrationVerificationEmailAsync - must URL encode email to avoid invalid email upon submission to server on complete registration step

* PM-7322 - RegisterUserCommandTests.cs - add API key assertions

* PM-7322 - Clean up RegisterUserCommand.cs

* PM-7322 - Refactor AccountsController.cs existing org invite method and new process to consider new feature flag for delays.

* PM-7322 - Add feature flag svc to AccountsControllerTests.cs + add TODO

* PM-7322 - AccountsController.cs - Refactor shared IdentityResult logic into private helper.

* PM-7322 - Work on getting PostRegisterFinish tests in place.

* PM-7322 - AccountsControllerTests.cs - test new method.

* PM-7322 - RegisterFinishRequestModel.cs - Update to use required keyword instead of required annotations as it is easier to catch mistakes.

* PM-7322 - Fix misspelling

* PM-7322 - Integration tests for RegistrationWithEmailVerification

* PM-7322 - Fix leaky integration tests.

* PM-7322 - Another leaky test fix.

* PM-7322 - AccountsControllerTests.cs - fix RegistrationWithEmailVerification_WithOrgInviteToken_Succeeds

* PM-7322 - AccountsControllerTests.cs - Finish out integration test suite!
2024-07-02 17:03:36 -04:00
Thomas Rittson
da4f436a71
Delete unused CollectionRepository methods (#4283)
* these are unused after collection management improvements
  and are being removed to avoid maintaining
2024-07-03 06:12:48 +10:00
Addison Beck
b5d42eb189
Handle TDE enrollment case in put account recovery enrollment endpoint (#4449)
* Handle TDE enrollment case in put account recovery enrollment endpoint

* Use `ssoConfig` to derive if an organization is using TDE
2024-07-02 14:18:29 -05:00
SmithThe4th
c390a6b589
[AC-2679] Adding a revoked, invited member with Can Manage access does not resolve unmanaged collections (#4397)
* Added check for revoked users

* removed check for users as any user status with can manage access should hide the add access badge

* updated comments
2024-07-02 11:19:59 -04:00
Thomas Rittson
43afcd8968
Add GroupsComponentRefactor feature flag (#4441) 2024-07-02 10:11:54 -05:00
Matt Bishop
e8c5d73062
Sync EF migrations for .NET / EF Core 8 (#4448)
* Sync EF migrations for .NET 8

* Format

* Redo migrations with billing fix

* Forgot to format again
2024-07-02 10:08:34 -04:00
Addison Beck
e2d2a2ba90
Add a master password hash check to account recovery enrollment (#4154) 2024-07-01 11:52:58 -04:00
renovate[bot]
14de173dba
[deps] Tools: Update aws-sdk-net monorepo (#4438)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 18:06:44 +02:00
renovate[bot]
ef84b06084
[deps]: Update Microsoft.Extensions.Caching.Cosmos to v1.6.1 (#4133)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 11:55:28 -04:00
Justin Baur
1ec2aae723
[PM-3581] Fix Postgres Time (#3221)
* Fix Postgres Time

- Migrate Send Tests
- Delete Old Tests

* Formatting

* Update Comment

* Change LaxComparer to Compare Some Milliseconds

* Update Comment
2024-06-28 16:13:02 +02:00
Alex Morask
48430836b6
Fix invoice finalized handler (#4430) 2024-06-28 08:48:56 -04:00
renovate[bot]
04ab3d4c2e
[deps] Auth: Lock file maintenance (#3961)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-27 13:49:22 -07:00
Matt Gibson
77dcf7f339
Log SignalR pushes (#4392)
We are interested in the rate at which signalR notifications are pushed to clients. This enables tracking only of that rate and the type of notification, nothing more identifiable.

Data will be used to determine feasibility of transferring to web push
2024-06-27 13:07:51 -04:00
renovate[bot]
563adf54af
[deps] DbOps: Update EntityFrameworkCore to v8 (major) (#3744)
* [deps] DbOps: Update EntityFrameworkCore to v8

* Only Run EnsureDeleted If Factory Owns Connection

This only worked because of a bug in dotnet/efcore#33930 that was fixed in 8.0.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-06-27 08:45:34 -04:00
Thomas Rittson
d9aa27d4cb
[AC-2204] Finalize sprocs that added the Manage permission (1 of 3) (#4204)
* Copy v2 sprocs and drop v2 suffix
2024-06-27 05:56:37 +10:00
cyprain-okeke
f045d06a9c
[AC-2361] Refactor StripeController (#4136)
* Changes ensures provider_id is handled and stored for Braintree.

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

* refactoring of the stripeController class

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

* Move the constant variables to utility class

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

* Adding comments to the methods

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

* Add more comments to describe the method

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

* Add the providerId changes

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

* Add the missing providerId

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

* Fix the IsSponsoredSubscription bug

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-06-26 16:34:16 +01:00
Alex Morask
26575856e6
Remove provider discount for CB (#4277) 2024-06-26 09:33:22 -04:00
Alex Morask
750321afaa
Updated CSV column header, removed invoice PDF URL (#4212) 2024-06-26 09:30:30 -04:00
Alex Morask
e8e725c389
[AC-2795] Add account credit & tax information to provider subscription (#4276)
* Add account credit, suspension and tax information to subscription response

* Run dotnet format'
2024-06-26 09:08:18 -04:00
Thomas Rittson
6646d11074
Turn on Flexible Collections v1 for self-host (#4253) 2024-06-26 06:10:35 +10:00
Todd Martin
8147aca0fd
[PM-7084] Add feature flag for 2FA component refactor (#4229) 2024-06-25 12:16:53 -04:00
renovate[bot]
7129342827
[deps] Platform: Update dotnet monorepo to v6.0.31 (#4027)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-25 09:53:46 -04:00
renovate[bot]
e9ecb1dea6
[deps] Auth: Update DuoUniversal to v1.2.5 (#4216)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-06-24 12:59:46 -07:00
SmithThe4th
d064ee73fc
[PM-8997] Revert restriction for provider users (#4223)
* reverted restriction for provider users

* updated comment
2024-06-24 15:05:25 -04:00
Alex Morask
95f54b616e
[AC-2744] Add provider portal pricing for consolidated billing (#4210)
* Expanded Teams and Enterprise plan with provider seat data

* Updated provider setup process with new plan information

* Updated provider subscription retrieval and update with new plan information

* Updated client invoice report with new plan information

* Fixed tests

* Fix broken test
2024-06-24 11:16:57 -04:00
Alex Morask
fa62b36d44
[AC-2774] Consolidated issues for Consolidated Billing (#4201)
* Add BaseProviderController, update some endpoints to ServiceUser permissions

* Prevent service user from scaling provider seats above seat minimum

* Expand invoice response to include DueDate
2024-06-24 11:15:47 -04:00
renovate[bot]
4a06c82c8d
[deps] Tools: Update aws-sdk-net monorepo (#4219)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-24 13:09:30 +02:00
renovate[bot]
2c70eb9349
[deps] Tools: Update SignalR to v8.0.6 (#4218)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-24 13:05:33 +02:00
renovate[bot]
2b0c0b1f72
[deps] Tools: Update LaunchDarkly.ServerSdk to v8.5.1 (#4217)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-24 12:08:40 +02:00
Thomas Avery
8a1b64a21b
[SM-1075] Fix bulk remove organization users with Secrets Manager (#4197)
* Fix OrganizationUser_DeleteByIds procedure

* Add db migration
2024-06-21 17:29:36 -05:00
renovate[bot]
c4f176a1c2
[deps] Auth: Update Duende.IdentityServer to v7.0.5 (#4169)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-06-21 10:55:06 -07:00
Conner Turnbull
5fd9ab5fa5
Showing Teams Starter option in org edit dropdown in the admin portal if user is on that plan (#4187) 2024-06-21 13:53:10 -04:00
aj-rosado
f275b2567d
[PM-517] Added validation to maximum and minimum expiry date (#4199)
* Added validation to maximum and minimum expiry date

* Updated error text on SendRequestModel

* Add tests to ValidateEdit on SendRequestModel
2024-06-21 13:56:43 +01:00
cyprain-okeke
de56461b97
resolve the issue with error page after cancel (#4193)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-06-21 13:02:27 +01:00
Thomas Rittson
9595252224
[AC-2656] Remove old permissions code from CiphersController (#4186) 2024-06-21 09:57:43 +10:00
Thomas Rittson
6262686c0c
[AC-2699] Remove AccessAll from api request/response models (#4203) 2024-06-21 09:00:01 +10:00
Thomas Avery
01d67dce48
[SM-654] Individual secret permissions (#4160)
* Add new data and request models

* Update authz handlers

* Update secret commands to handle access policy updates

* Update secret repository to handle access policy updates

* Update secrets controller to handle access policy updates

* Add tests

* Add integration tests for secret create
2024-06-20 12:45:28 -05:00
Thomas Avery
0e6e461602
[SM-654] Add support for direct secret permissions at the repo layer (#4156)
* calculate direct secret permissions at the repo layer

* Add integration tests for service account secret access count
2024-06-20 10:40:24 -05:00
cyprain-okeke
7f496e7399
Add a CancelAt to the response (#4205)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-06-20 13:50:42 +01:00
Jared Snider
29b47f72ca
Auth/PM-3833 - Remove Deprecated Register and Prelogin endpoints from API (#4206)
* PM-3833 - API - AccountsController.cs && AccountsController.cs - remove prelogin and register endpoints.

* PM-3833 - Move Request and Response models that were used for Prelogin and PostRegister from API to Identity.

* PM-3833 - FIX LINT

* PM-3833 - Fix issues after merge conflict fixes.

* PM-3833 - Another test fix
2024-06-19 15:11:24 -04:00
Jared Snider
b2b1e3de87
Auth/PM-5092 - Registration with Email verification - Send Email Verification Endpoint (#4173)
* PM-5092 - Add new EnableEmailVerification global setting.

* PM-5092 - WIP - AccountsController.cs - create stub for new     PostRegisterSendEmailVerification

* PM-5092 - RegisterSendEmailVerificationRequestModel

* PM-5092 - Create EmailVerificationTokenable.cs and get started on tests (still WIP).

* PM-5092 - EmailVerificationTokenable.cs finished + tests working.

* PM-5092 - Add token data factory for new EmailVerificationTokenable factory.

* PM-5092 - EmailVerificationTokenable.cs - set expiration to match existing verify email.

* PM-5092 - Get SendVerificationEmailForRegistrationCommand command mostly written + register as scoped.

* PM-5092 - Rename tokenable to be more clear and differentiate it from the existing email verification token.

* PM-5092 - Add new registration verify email method on mail service.

* PM-5092 - Refactor SendVerificationEmailForRegistrationCommand and add call to mail service to send email.

* PM-5092 - NoopMailService.cs needs to implement all interface methods.

* PM-5092 - AccountsController.cs - get PostRegisterSendEmailVerification logic in place.

* PM-5092 - AccountsControllerTests.cs - Add some unit tests - WIP

* PM-5092 - SendVerificationEmailForRegistrationCommandTests

* PM-5092 - Add integration tests for new acct controller method

* PM-5092 - Cleanup unit tests

* PM-5092 - AccountsController.cs - PostRegisterSendEmailVerification - remove modelState invalid check as .NET literally executes this validation pre-method execution.

* PM-5092 - Rename to read better - send verification email > send email verification

* PM-5092 - Revert primary constructor approach so DI works.

* PM-5092 - (1) Cleanup new but now not needed global setting (2) Add custom email for registration verify email.

* PM-5092 - Fix email text

* PM-5092 - (1) Modify ReferenceEvent.cs to allow nullable values for the 2 params which should have been nullable based on the constructor logic (2) Add new ReferenceEventType.cs for email verification register submit (3) Update AccountsController.cs to log new reference event (4) Update tests

* PM-5092 - RegistrationEmailVerificationTokenable - update prefix, purpose, and token id to include registration to differentiate it from the existing email verification token.

* PM-5092 - Per PR feedback, cleanup used dict.

* PM-5092 - formatting pass (manual + dotnet format)

* PM-5092 - Per PR feedback, log reference event after core business logic executes

* PM-5092 - Per PR feedback, add validation + added nullable flag to name as it is optional.

* PM-5092 - Per PR feedback, add constructor validation for required tokenable data

* PM-5092 - RegisterVerifyEmail url now contains email as that is required in client side registration step to create a master key.

* PM-5092 - Add fromEmail flag + some docs

* PM-5092 - ReferenceEvent.cs - Per PR feedback, make SignupInitiationPath and PlanUpgradePath nullable

* PM-5092 - ReferenceEvent.cs - remove nullability per PR feedback

* PM-5092 - Per PR feedback, use default constructor and manually create reference event.

* PM-5092 - Per PR feedback, add more docs!
2024-06-19 13:54:20 -04:00
Thomas Rittson
c375c18257
[AC-2655] Remove old permissions logic from CollectionsController (#4185)
* Replace all old methods with vNext methods

* Remove remaining Flexible Collections checks and remove helper method

* Remove unused private methods

* Update tests
2024-06-18 06:23:32 +10:00
Bernd Schoolmann
3ad4bc1cab
[PM-4371] Implement PRF key rotation (#4157)
* Send rotateable keyset on list webauthn keys

* Implement basic prf key rotation

* Add validator for webauthn rotation

* Fix accounts controller tests

* Add webauthn rotation validator tests

* Introduce separate request model

* Fix tests

* Remove extra empty line

* Remove filtering in validator

* Don't send encrypted private key

* Fix tests

* Implement delegated webauthn db transactions

* Add backward compatibility

* Fix query not working

* Update migration sql

* Update dapper query

* Remove unused helper

* Rename webauthn to WebAuthnLogin

* Fix linter errors

* Fix tests

* Fix tests
2024-06-17 20:46:57 +02:00
Conner Turnbull
732ded52af
Resolved null reference exceptions when removing a families plan sponsorship from Stripe (#4194) 2024-06-17 11:45:55 -04:00
Cesar Gonzalez
6af47faef1
[PM-8027] Adding feature flag to allow us to fallback to the basic approach to field qualification for the inline menu (#4166)
* [PM-8027] Adding feature flag to allow us to fallback to the basic approach to field qualification for the inline menu

* [PM-8027] Adding feature flag to allow us to fallback to the basic approach to field qualification for the inline menu

* [PM-8027] Reverting flag from a fallback flag to an enhancement feature flag
2024-06-17 09:52:17 -05:00
Vincent Salucci
2841c1aba0
fix: remove required annotation for AccessAll, refs PM-8792 (#4191) 2024-06-17 08:08:12 +10:00
Conner Turnbull
b5241f1a97
Added missing enum import (#4192) 2024-06-14 17:05:19 -04:00
Conner Turnbull
721d2969d4
[PM-8830] Billing Enums Rename (#4180)
* Renamed ProductType to ProductTierType

* Renamed Product properties to ProductTier

* Moved ProductTierType to Bit.Core.Billing.Enums namespace from Bit.Core.Enums

* Moved PlanType enum to Bit.Core.Billing.Enums

* Moved StaticStore to Bit.Core.Billing.Models.StaticStore namespace

* Added ProductType enum

* dotnet format
2024-06-14 15:34:47 -04:00
cd-bitwarden
41ed38080f
Revert "[SM-1197] - Duplicate GUIDS Show a more detailed error message if dup…" (#4190)
This reverts commit 43b34c433c.
2024-06-14 17:45:17 +00:00
cd-bitwarden
43b34c433c
[SM-1197] - Duplicate GUIDS Show a more detailed error message if duplicate GUIDS are passed ot g… (#4161)
* Show a more detailed error message if duplicate GUIDS are passed ot get by Ids

* Update test/Api.IntegrationTest/SecretsManager/Controllers/SecretsControllerTests.cs

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update src/Api/SecretsManager/Models/Request/GetSecretsRequestModel.cs

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Update src/Api/SecretsManager/Models/Request/GetSecretsRequestModel.cs

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>

* Making requested changes to tests

* lint fix

* fixing whitespace

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2024-06-14 17:23:23 +00:00
Alex Morask
83604cceb1
[AC-1943] Implement provider client invoice report (#4178)
* Update ProviderInvoiceItem SQL configuration

* Implement provider client invoice export

* Add tests

* Run dotnet format

* Fixed SPROC backwards compatibility issue
2024-06-14 12:26:49 -04:00
renovate[bot]
c8babc5a43
[deps] AC: Update Quartz to v3.9.0 (#4134)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-13 16:16:22 +10:00
André Bispo
7c805904ba
[PM-8814] Add removed EU feature flag to temporarily fix mobile until release rollout (#4177) 2024-06-12 15:43:41 +01:00
Jake Fink
576b78d739
Change error message (#4175) 2024-06-11 16:20:06 -04:00
Conner Turnbull
fc1c488a78
[AC-2567] Billing Performance Improvements (#4143)
* Moved AccountsBilling controller to be owned by Billing

* Added org billing history endpoint

* Updated GetBillingInvoicesAsync to only retrieve paid, open, and uncollectible invoices, and added option to limit results

* Removed invoices and transactions from GetBillingAsync

* Limiting the number of invoices and transactions returned

* Moved Billing models to Billing namespace

* Split billing info and billing history objects

* Removed billing method GetBillingBalanceAndSourceAsync

* Removed unused using

* Cleaned up BillingInfo a bit

* Update migration scripts to use `CREATE OR ALTER` instead of checking for the `OBJECT_ID`

* Applying limit to aggregated invoices after they return from Stripe
2024-06-11 13:55:23 -04:00
cyprain-okeke
f615858724
[AC-1779] Add comment to clarify ExpirationWithoutGracePeriod in OrganizationLicense (#3403)
* add the validation for version 12 and above

* We needed comments only
2024-06-11 15:26:53 +01:00
renovate[bot]
c57091c4b1
[deps] DbOps: Update Microsoft.Data.SqlClient to v5.2.1 (#4170)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-10 12:47:22 -06:00
Ike
fa4dc4aaf2
Fix Duo Universal to work with transitional metadata (#4164) 2024-06-07 12:49:53 -07:00
Rui Tomé
308bd555a4
[AC-2286] Include the OrganizationUserId for each Organization in the user sync data (#4142)
* [AC-2286] Include the OrganizationUserId for each Organization in the user sync data

* Make OrganizationUserId property non-nullable
2024-06-07 13:32:09 -05:00
Thomas Avery
36705790ad
[SM-1293] Add endpoint to fetch secret's access policies (#4146)
* Add authz handling for secret access policy reads

* Add the ability to fetch secret access polices from the repository

* refactor response models

* Add new endpoint
2024-06-07 12:08:38 -05:00
renovate[bot]
a1d609b208
[deps] DbOps: Update EntityFrameworkCore (#3981)
* [deps] DbOps: Update EntityFrameworkCore

* Update linq2db Package

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-06-07 09:55:59 -04:00
Alex Morask
725fc2eed3
[AC-1943] Add ProviderInvoiceItem table (#4163)
* Add ProviderInvoiceItem table

* Run dotnet format
2024-06-06 13:25:13 -04:00
cyprain-okeke
fef34d845f
Add additional return properties ti providerSubscriptionResponse (#4159)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-06-06 15:54:08 +01:00
Ike
97b3f3e7ee
[PM-5216] User and Organization Duo Request and Response Model refactor (#4126)
* inital changes

* add provider GatewayType migrations

* db provider migrations

* removed duo migrations added v2 metadata to duo response

* removed helper scripts

* remove signature from org duo

* added backward compatibility for Duo v2

* added tests for duo request + response models

* refactors to TwoFactorController

* updated test methods to be compartmentalized by usage

* fix organization add duo

* Assert.Empty() fix for validator
2024-06-05 11:42:02 -07:00
Alex Morask
a0a7654077
[AC-1942] Add endpoint to get provider invoices (#4158)
* Added endpoint to get provider invoices

* Added missing properties of invoice

* Run dotnet format'
2024-06-05 13:33:28 -04:00
Conner Turnbull
4a6113dc86
[AC-2386][AC-2750] Updated BitPay controller to add transactions and account credit for providers (#4153) 2024-06-04 14:58:21 -04:00
Thomas Rittson
cae417e2a2
[AC-2317] Public API - remove old permissions code (#4125)
* Remove FlexibleCollections checks from Public API controllers

* Remove AccessAll from Public API

* Update tests
2024-06-04 08:58:44 +10:00
Thomas Rittson
2c40dc0602
[AC-2654] Remove old permissions code from OrganizationUsersController (#4149) 2024-06-04 08:47:12 +10:00
Thomas Rittson
80793d1ffa
[AC-2653] Remove old permissions code from GroupsController (#4148) 2024-06-04 08:46:48 +10:00
Thomas Rittson
fe76de63a0
Fix optional properties being required in public api (#4150) 2024-06-04 08:17:01 +10:00
Conner Turnbull
395d6e845c
[AC-2678] Enterprise to Families Sponsorship Bugs (#4118)
* Removed prorationDate as it wasn't used, and wasn't needed

* Fixed logic to detect if a subscription was sponsored

* Moved OrganizationSponsorshipsController.cs to Billing folder
2024-06-03 13:18:46 -04:00
Alex Morask
9eec986c1c
Added gateway links to Provider edit in Admin (#4145) 2024-06-03 11:51:41 -04:00
Alex Morask
2b43cde99b
[AC-1938] Update provider payment method (#4140)
* Refactored GET provider subscription

Refactoring this endpoint and its associated tests in preparation for the addition of more endpoints that share similar patterns

* Replaced StripePaymentService call in AccountsController, OrganizationsController

This was made in error during a previous PR. Since this is not related to Consolidated Billing, we want to try not to include it in these changes.

* Removing GetPaymentInformation call from ProviderBillingService

This method is a good call for the SubscriberService as we'll want to extend the functionality to all subscriber types

* Refactored GetTaxInformation to use Billing owned DTO

* Add UpdateTaxInformation to SubscriberService

* Added GetTaxInformation and UpdateTaxInformation endpoints to ProviderBillingController

* Added controller to manage creation of Stripe SetupIntents

With the deprecation of the Sources API, we need to move the bank account creation process to using SetupIntents. This controller brings both the creation of "card" and "us_bank_account" SetupIntents
under billing management.

* Added UpdatePaymentMethod method to SubscriberService

This method utilizes the SetupIntents created by the StripeController from the previous commit when a customer adds a card or us_bank_account payment method (Stripe). We need to cache the most recent SetupIntent for the subscriber so that we know which PaymentMethod is their most recent even when it hasn't been confirmed yet.

* Refactored GetPaymentMethod to use billing owned DTO and check setup intents

* Added GetPaymentMethod and UpdatePaymentMethod endpoints to ProviderBillingController

* Re-added GetPaymentInformation endpoint to consolidate API calls on the payment method page

* Added VerifyBankAccount endpoint to ProviderBillingController in order to finalize bank account payment methods

* Updated BitPayInvoiceRequestModel to support providers

* run dotnet format

* Conner's feedback

* Run dotnet format'
2024-06-03 11:00:52 -04:00
Jake Fink
b072fc56b1
[PM-6794] block legacy users from authN (#4088)
* block legacy users from authN

* undo change to GetDeviceFromRequest

* lint

* add feature flag

* format

* add web vault url to error message

* fix test

* format
2024-06-03 09:19:56 -04:00
Thomas Rittson
357ac4f40a
[AC-292] Public Api - allow configuration of custom permissions (#4022)
* Also refactor OrganizationService user invite methods
2024-05-31 09:23:31 +10:00
Bernd Schoolmann
0189952e1f
[PM-5938] Prevent permanent vault coruption on key-rotation with desycned vault (#4098)
* Add check to verify the vault state for rotation is not obviously desynced (empty)

* Add unit test for key rotation guardrail

* Move de-synced vault detection to validators

* Add tests
2024-05-30 11:08:26 +02:00
cyprain-okeke
f73b7c7fa8
[AC-2706] [Defect] ProviderId does not populate when payment for provider subscription is created/updated (#4138)
* Resolve the issue of not updating the db

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

* Resolve the failing test

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-05-29 18:49:19 +01:00
renovate[bot]
9da75fc78f
[deps] Tools: Update aws-sdk-net monorepo (#4131)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-28 16:24:04 +02:00
Addison Beck
98a191a5e8
Allow for bulk processing new login device requests (#4064)
* Define a model for updating many auth requests

In order to facilitate a command method that can update many auth
requests at one time a new model must be defined that accepts valid
input for the command's needs. To achieve this a new file has been
created at
`Core/AdminConsole/OrganizationAuth/Models/OrganizationAuthRequestUpdateCommandModel.cs`
that contains a class of the same name. It's properties match those that
need to come from any calling API request models to fulfill the request.

* Declare a new command interface method

Calling API functions of the `UpdateOrganizationAuthRequestCommand` need
a function that can accept many auth request response objects and
process them as approved or denied. To achieve this a new function has
been added to `IUpdateOrganizationAuthRequestCommand` called
`UpdateManyAsync()` that accepts an
`IEnumberable<OrganizationAuthRequest>` and returns a `Task`.
Implementations of this interface method will be used to bulk process
auth requests as approved or denied.

* Stub out method implementation for unit testing

To facilitate a bulk device login request approval workflow in the admin
console `UpdateOrganizationAuthRequestCommand` needs to be updated to
include an `UpdateMany()` method. It should accept a list of
`OrganizationAuthRequestUpdateCommandModel` objects, perform some simple
data validation checks, and then pass those along to
`AuthRequestRepository` for updating in the database.

This commit stubs out this method for the purpose of writing unit tests.
At this stage the method throws a `NotImplementedException()`. It will
be expand after writing assertions.

* Inject `IAuthRequestRepository` into `UpdateOrganizationAuthCommand`

The updates to `UpdateOrganizationAuthRequestCommand` require a new
direct dependency on `IAuthRequestRepository`. This commit simply
registers this dependency in the `UpdateOrganizationAuthRequest`
constructor for use in unit tests and the `UpdateManyAsync()`
implementation.

* Write tests

* Rename `UpdateManyAsync()` to `UpdateAsync`

* Drop the `CommandModel` suffix

* Invert business logic update filters

* Rework everything to be more model-centric

* Bulk send push notifications

* Write tests that validate the command as a whole

* Fix a test that I broke by mistake

* Swap to using await instead of chained methods for processing

* Seperate a function arguement into a variable declaration

* Ungeneric-ify the processor

* Adjust ternary formatting

* Adjust naming of methods regarding logging organization events

* Throw an exception if Process is called with no auth request loaded

* Rename `_updates` -> `_update`

* Rename email methods

* Stop returning `this`

* Allow callbacks to be null

* Make some assertions about the state of a processed auth request

* Be more terse about arguements in happy path test

* Remove unneeded null check

* Expose an endpoint for bulk processing of organization auth requests  (#4077)

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2024-05-27 11:56:52 +10:00
Thomas Rittson
0d2e953459
Remove obsolete permissions code from ImportCiphersController (#4124) 2024-05-27 10:58:04 +10:00
Thomas Rittson
62c90bc50a
Remove FlexibleCollections check from OrganizationsController (#4123) 2024-05-27 10:57:54 +10:00
aj-rosado
6a0eae417d
Added MemberAccessReport to feature flags (#4114) 2024-05-24 16:51:32 +01:00
Merissa Weinstein
a5ec675cc8
remove onboarding feature flag (#4085) 2024-05-24 10:15:00 -05:00
Cesar Gonzalez
517fa1edf7
[PM-5295] Implement feature flag that allows us to fallback to using the TreeWalker API in the extension when collecting page details for autofill (#4076) 2024-05-24 10:13:17 -05:00
Rui Tomé
5fabad35c7
[AC-2328] Add a Bulk OrganizationUsersController.GetResetPasswordDetails endpoint (#4079)
* Add new stored procedure for reading reset password details for multiple organization user IDs

* Add method IOrganizationUserRepository.GetManyResetPasswordDetailsByOrganizationUserAsync

* Add new API endpoint for getting reset password details for multiple organization users

* Add unit tests for bulk OrganizationUsersController.GetResetPasswordDetails

* Add alias to sql query result column

* Add constructor for automatic mapping

* Fix http method type for endpoint

* dotnet format

* Simplify the constructor in the OrganizationUserResetPasswordDetails

* Refactor stored procedure and repository method names for retrieving account recovery details

* Add integration tests for GetManyAccountRecoveryDetailsByOrganizationUserAsync

* Lock endpoint behind BulkDeviceApproval feature flag

* Update feature flag key value
2024-05-24 11:20:54 +01:00
Thomas Rittson
be41865b59
[AC-2522] Remove collection enhancements opt-in (#4110)
* Delete controller endpoint
* Delete command
* Drop sproc
2024-05-24 09:00:04 +10:00
cyprain-okeke
ba93c0008b
[AC-2381][AC-2382] As a billing system, I need to store a transaction when a charge has succeeded for a provider (#4115)
* Add the providerId to the transaction object

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

* Refactor to check if providerId hasValue before return

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-05-23 16:28:56 +01:00
cyprain-okeke
cb9ec27228
Include the ProviderId to transaction object (#4116)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-05-23 16:23:14 +01:00
Alex Morask
06910175e2
[AC-2576] Replace Billing commands and queries with services (#4070)
* Replace SubscriberQueries with SubscriberService

* Replace OrganizationBillingQueries with OrganizationBillingService

* Replace ProviderBillingQueries with ProviderBillingService, move to Commercial

* Replace AssignSeatsToClientOrganizationCommand with ProviderBillingService, move to commercial

* Replace ScaleSeatsCommand with ProviderBillingService and move to Commercial

* Replace CancelSubscriptionCommand with SubscriberService

* Replace CreateCustomerCommand with ProviderBillingService and move to Commercial

* Replace StartSubscriptionCommand with ProviderBillingService and moved to Commercial

* Replaced RemovePaymentMethodCommand with SubscriberService

* Formatting

* Used dotnet format this time

* Changing ProviderBillingService to scoped

* Found circular dependency'

* One more time with feeling

* Formatting

* Fix error in remove org from provider

* Missed test fix in conflit

* [AC-1937] Server: Implement endpoint to retrieve provider payment information (#4107)

* Move the gettax and paymentmethod from stripepayment class

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

* Add the method to retrieve the tax and payment details

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

* Add unit tests for the paymentInformation method

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

* Add the endpoint to retrieve paymentinformation

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

* Add unit tests to the SubscriberService

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

* Remove the getTaxInfoAsync update reference

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

---------

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
2024-05-23 10:17:00 -04:00
cyprain-okeke
a9ab894893
Send upcoming invoice to provider billing email (#4112)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-05-23 11:40:51 +01:00
Thomas Rittson
b2693913bf
[AC-2521] Remove FlexibleCollectionsSignUp feature flag (#4109)
* Remove FlexibleCollectionsSignUp feature flag

* Always set Organization.FlexibleCollections to true

* Remove explicit assignment of LimitCollectionCreationDeletion so it defaults to false
2024-05-23 09:15:12 +10:00
Kyle Spearrin
4264fc0729
[PM-7004] Org Admin Initiate Delete (#3905)
* org delete

* move org id to URL path

* tweaks

* lint fixes

* Update src/Core/Services/Implementations/HandlebarsMailService.cs

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

* Update src/Core/Services/Implementations/HandlebarsMailService.cs

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

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* PR feedback

* fix id

* [PM-7004] Move OrgDeleteTokenable to AdminConsole ownership

* [PM-7004] Add consolidated billing logic into organization delete request acceptance endpoint

* [PM-7004] Delete unused IOrganizationService.DeleteAsync(Organization organization, string token) method

* [PM-7004] Fix unit tests

* [PM-7004] Update delete organization request email templates

* Add success message when initiating organization deletion

* Refactor OrganizationsController request delete initiation action to handle exceptions

---------

Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
Co-authored-by: Rui Tome <rtome@bitwarden.com>
2024-05-22 17:59:19 +01:00
Addison Beck
56c523f76f
Allow for bulk updating AuthRequest database objects (#4053)
* Declare a new repository interface method

To facilitate a new bulk device login request approval workflow in the
admin console we need to update `IAuthRequestRepisitory` (owned by Auth
team) to include an`UpdateManyAsync()` method. It should accept a list
of `AuthRequest` table objects, and implementations will do a very
simple 1:1 update of the passed in data.

This commit adds an `UpdateManyAsync()` method to the
`AuthRequestRepository` interface.

* Stub out method implementations to enable unit testing

This commit stubs out implementations of
`IAuthRequestRepository.UpdateManyAsync()` so the method signature can
be called in unit tests. At this stage the methods are not implemented.

* Assert a happy path integration test

* Establish a user defined SQL type for Auth Requests

To facilitate a bulk update operation for auth requests a new user
defined type will need to be written that can be used as a table input
to the stored procedure. This will follow a similar pattern to how the
`OragnizationSponsorshipType` works and is used by the stored procedure
`OrganizationSponsorship_UpdateMany`.

* Establish a new stored procedure

To facilitate the bulk updating of auth request table objects this
commit adds a new stored procedure to  update a collection of entities
on `AuthRequest` table by their primary key. It updates all properties,
for convention, but the endpoint created later will only change the
`Approved`, `ResponseDate`, `Key`, `MasterPasswordHash`, and
`AuthenticationDate` properties.

* Apply a SQL server migration script

This commit simply applies a migration script containing the new user
defined type and stored procedure comitted previously.

* Enable converting an `IEnumerable<AuthRequest>` to a `DataTable`

The current pattern in place for bulk update stored procedures is to
pass a `DataTable` through Dapper as an input for the update stored
procedure being run. In order to facilitate the new bulk update
procedure for the`AuthRequest` type we need a function added that can
convert an `IEnumerable<AuthRequest>` to a `DataTable`. This is commit
follows the convention of having a static class with a conversion method
in a `Helpers` folder: `AuthRequestHelpers.ToDataTable()`.

* Implement `Dapper/../AuthRequestRepository.UpdateMany()`

This commit implements `AuthRequestRepository.UpdateMany()` for the
Dapper implementation of `AuthRequestRepository`. It connects the stored
procedure, `DataTable` converter, and Dapper-focused unit test commits
written previously into one exposed method that can be referenced by
service callers.

* Implement `EntityFramework/../AuthRequestRepository.UpdateMany()`

This commit implements the new
`IAuthRequestRepository.UpdateManyAsync()`method in the Entity Framework
skew of the repository layer. It checks to make sure the passed in list
has auth requests, converts them all to an Entity Framework entity, and
then uses `UpdateRange` to apply the whole thing over in the database
context.

* Assert that  `UpdateManyAsync` can not create any new auth requests

* Use a json object as stored procedure input

* Fix the build

* Continuing to troubleshoot the build

* Move `AuthRequest_UpdateMany` to the Auth folder

* Remove extra comment

* Delete type that never got used

* intentionally break a test

* Unbreak it
2024-05-22 11:55:31 -05:00
renovate[bot]
5ddb854f1a
[deps] Auth: Update azure azure-sdk-for-net monorepo (#3540)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-05-21 13:12:43 -07:00
SmithThe4th
aee180adfc
[PM-8004] Move Unmanaged collection logic out of component for better reuse (#4108)
* Updated sprocs to return unmanaged collection column, updated reponse to return to return unmanaged

* reformatted sproc
2024-05-21 14:42:47 -04:00
Jason Ng
87865e8f5c
[AC-2447] Update PutCollection to return Unavailable cipher when last Can Manage Access is Removed (#4074)
* update CiphersController to return a unavailable value to the client so it can determine if the user removed the final Can Manage access of an item
2024-05-21 11:31:22 -04:00
renovate[bot]
f2242186d0
[deps] Tools: Update aws-sdk-net monorepo (#4104)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-21 12:00:17 +02:00
renovate[bot]
74fff55c18
[deps] Tools: Update SignalR to v8.0.5 (#4103)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-21 11:56:09 +02:00
renovate[bot]
1b47d23774
[deps] Tools: Update MailKit to v4.6.0 (#4106)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-21 11:53:40 +02:00
renovate[bot]
476e5adfbe
[deps] Tools: Update LaunchDarkly.ServerSdk to v8.5.0 (#4105)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-21 11:51:40 +02:00
Thomas Rittson
53ed608ba1
[AC-2604] Fix aggregation of CollectionGroup permissions (#4097)
* Fix aggregation of CollectionGroup permissions - use MAX on Manage column instead of MIN
2024-05-21 14:40:05 +10:00
Thomas Rittson
98b7866c95
[AC-2605] Restrict collection access for some custom users (#4096)
* Make custom users subject to collection settings
  Affects ManageUsers and ManageGroups
2024-05-21 10:44:57 +10:00
renovate[bot]
489f6246b1
[deps] Auth: Update DuoUniversal to v1.2.4 (#4080)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-05-20 14:21:12 -07:00
Alex Morask
0be40d1bd9
[AC-2489] Resolve SM Standalone issues with SCIM & Directory Connector (#4011)
* Add auto-scale support to standalone SM for SCIM

* Mark users for SM when using SM Stadalone with Directory Connector
2024-05-20 10:22:16 -04:00
Vincent Salucci
febc696c80
[AC-240] - BUG - Confirm Admin/Owners to org when excluded from Single Org Policy (#4087)
* fix: align policy checks for excluded types, update tests, create fixture, refs AC-240

* fix: update final policy check against other orgs (not including the current), refs AC-240
2024-05-17 14:28:51 -05:00
Conner Turnbull
a60180230d
[AC-2513] Scaling PM seat count with SM seat count (#4040)
* For SM Trial orgs, now scaling PM seat count with SM seat count adjustments

* Split Billing related organization endpoints into billing owned controller

* Updated billing organizations controller to use a primary constructor to reduce boilerplate

* Fixed error where ID couldn't be mapped to subscription endpoint guid param

* Updated billing OrganizationController endpoints to not manually create the GUID from the string ID

* Banished magic string back to the pit from whence it came

* Resolved errors in unit tests
2024-05-17 14:16:03 -04:00
Conner Turnbull
0b5c21acca
Hiding teams starter option (#4044) 2024-05-17 09:21:12 -04:00
Jake Fink
3bb8cce2e6
add login redirect url to identity server (#4092) 2024-05-16 15:47:44 -04:00
Conner Turnbull
7d65d8dd4f
Resolved razor syntax error by updating expression to be explicit instead of implicit (#4094) 2024-05-16 13:16:01 -04:00
Thomas Rittson
e619508f3f
[AC-2602] Fix error when provider edits existing group (#4086)
* Add null check to groups endpoint - providers may not be OrgUsers
2024-05-15 15:17:15 +01:00
Alex Morask
fd173e81b6
[AC-2426] Allow editing of client organization name (#4072)
* Allow editing of client organization name

* Removing unnecessary using for linter
2024-05-14 11:26:08 -04:00
Todd Martin
e93894a6fd
Removed unused feature flags (#4083)
* Removed unused feature flags

* Removed 2 more flags.
2024-05-14 11:00:32 -04:00
SmithThe4th
b960d25c97
added feature flag constant for vault bullk management action (#4075) 2024-05-14 09:45:50 -04:00
Alex Morask
9b9318caac
[AC-2313] Add Gateway fields to Provider edit in Admin (#4057)
* Formatting

* Add Gateway fields to provider edit

* Remove unnecessary usings

* Thomas' feedback

* Removing unnecessary using for linter

* Removing unused file

* Removing unused file
2024-05-14 09:16:24 -04:00
Addison Beck
989908151d
Remove unneeded using (#4084) 2024-05-14 09:59:04 +01:00
Todd Martin
7f9d7c0c5d
[PM-7029] Remove conditional logic for KeyRotationImprovements feature flag (#4002)
* Removed business logic that references flag

* Removed using statement.

* Undid accidental keystroke.

* Removed unused method.

* Removed unused imports.
2024-05-09 13:24:02 -04:00
Ike
479f8319c2
remove alias (#4058) 2024-05-09 08:43:43 -07:00
Alex Morask
ac4ccafe19
[AC-2471] Prevent calls to Stripe when unlinking client org has no Stripe objects (#3999)
* Prevent calls to Stripe when unlinking client org has no Stripe objects

* Thomas' feedback

* Check for stripe when org unlinked from org page

---------

Co-authored-by: Conner Turnbull <cturnbull@bitwarden.com>
2024-05-09 09:20:02 -04:00
Alex Morask
fa7b00a728
Send reference event on payment success for provider (#4063) 2024-05-09 09:09:23 -04:00
Thomas Rittson
109cb9f672
Fix 404 error when creating users/groups (#4066) 2024-05-08 21:36:53 -05:00
Vincent Salucci
df4d1d5552
[AC-2086] Update CanDelete to handle V1 flag logic (#3979)
* feat: Update authorization handler to handle V1 collection enhancement, refs AC-2086

* feat: update tests to account for new V1 flag/setting logic, refs AC-2086

* feat: update CanDelete with all collection enhancement combinations, refs AC-2086

* feat: add tests for new delete flows, refs AC-2086

* fix: update new conditionals with bool return value, refs AC-2086

* feat: simplify conditional in regards to LimitCollectionCreationDeletion, refs AC-2086

* feat: simplify AllowAdminAccessToAllCollectionItems conditional, refs AC-2086

* feat: add unit test making sure admins can't delete collections without can manage, refs AC-2086
2024-05-08 18:25:22 -04:00
Shane Melton
45be4d5069
[AC-1707] Restrict provider access to items (#3881)
* [AC-2274] Introduce CanEditAnyCiphersAsAdminAsync helper to replace EditAnyCollection usage

* [AC-2274] Add unit tests for CanEditAnyCiphersAsAdmin helper

* [AC-2274] Add Jira ticket

* [AC-1707] Add feature flag

* [AC-1707] Update CanEditAnyCiphersAsAdmin to fail for providers when the feature flag is enabled

* [AC-2274] Undo change to purge endpoint

* [AC-2274] Update admin checks to account for unassigned ciphers

* [AC-1707] Fix provider auth checks after merge with main

* [AC-1707] Fix tests after merge

* [AC-1707] Adjust CanEditCipherAsAdmin method to properly account for admin user types

- Fix associated unit tests

* [AC-1707] Formatting
2024-05-07 12:30:48 -07:00
cyprain-okeke
6bdee5dd34
Fix the issue of returning on Error! without descriptive message (#4056)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-05-07 17:45:01 +01:00
Jason Ng
ea49ff7dcb
[AC-1121] Update authorization for orphaned collections (#4047)
* update BulkCollectionAuthorizationHandler to account for orphaned collections
2024-05-07 11:02:59 -04:00
renovate[bot]
9e554006f3
[deps] Auth: Update Microsoft.Azure.Cosmos to v3.39.1 (#3541)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-05-07 07:49:52 -07:00
Thomas Avery
cd3a45c8c6
[SM-1030] Cleanup old access policy management code (#4015)
* Remove access selector code

* Cleanup integration tests
2024-05-06 14:56:58 -05:00
cyprain-okeke
3715d7d426
Add providerType as part of the response object (#4055)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-05-06 20:21:38 +01:00
Alex Morask
bcfaf55412
[AC-2548] Remove automatic tax collection check from provider creation (#4042)
* Remove automatic tax collection check

* Fix tests
2024-05-06 11:56:02 -04:00
Jake Fink
2a535ac835
[PM-7919] return exception if trying to overwrite keypair (#4052)
* return exception if trying to overwrite keypair

* add feature flag
2024-05-06 08:49:18 -04:00
renovate[bot]
90e065556e
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.86 (#4049)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-06 13:50:31 +02:00
Shane Melton
6a8d97affb
Add the extension-refresh feature flag (#4041) 2024-05-03 16:16:57 -04:00
Shane Melton
d965166a37
[AC-2084] Include Collection permissions for admin endpoints (#3793)
* [AC-2084] Add documentation to existing collection repository getters

* [AC-2084] Add new CollectionAdminDetails model

* [AC-2084] Add SQL and migration scripts

* [AC-2084] Introduce new repository methods to include permission details for collections

* [AC-2084] Add EF repository methods and integration tests

* [AC-2084] Update CollectionsController and response models

* [AC-2084] Fix failing SqlServer test

* [AC-2084] Clean up admin endpoint response models
- vNext endpoints should now always return CollectionDetailsResponse models
- Update constructors in CollectionDetailsResponseModel to be more explicit and add named static constructors for additional clarity

* [AC-2084] Fix failing tests

* [AC-2084] Fix potential provider/member bug

* [AC-2084] Fix broken collections controller

* [AC-2084] Cleanup collection response model types and constructors

* [AC-2084] Remove redundant authorization check

* [AC-2084] Cleanup ambiguous model name

* [AC-2084] Add GroupBy clause to sprocs

* [AC-2084] Add GroupBy logic to EF repository

* [AC-2084] Update collection repository tests

* [AC-2084] Update migration script date

* Update migration script date

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: kejaeger <138028972+kejaeger@users.noreply.github.com>
2024-05-03 09:33:06 -04:00
cyprain-okeke
25c87214ff
Fix typo in 'Provider' spelling (#4043)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-05-02 22:50:10 +01:00
Kyle Spearrin
c045739325
[PM-6977] Migrate to FCM v1 (redo) (#4046)
* revert changes again

* use IServiceProvider

* fix test
2024-05-02 16:37:06 -04:00
Thomas Avery
7f8cea58d0
[SM-923] Add project service accounts access policies management endpoints (#3993)
* Add new models

* Update repositories

* Add new authz handler

* Add new query

* Add new command

* Add authz, command, and query to DI

* Add new endpoint to controller

* Add query unit tests

* Add api unit tests

* Add api integration tests
2024-05-02 11:06:20 -05:00
Thomas Rittson
e302ee1520
[AC-2170] Group modal - limit admin access - collections tab (#3998)
* Update GroupsController POST and PUT to respect collection management settings
2024-05-02 09:55:16 +10:00
Thomas Rittson
f0b9391249
Prevent user from adding themselves to collection (#4037) 2024-05-02 08:32:50 +10:00
Thomas Avery
29a69b76a4
[SM-1222] Add event and reference event logging to secrets sync (#4031) 2024-05-01 12:31:58 -05:00
Thomas Avery
ebd88393c8
[SM-910] Add service account granted policies management endpoints (#3736)
* Add the ability to get multi projects access

* Add access policy helper + tests

* Add new data/request models

* Add access policy operations to repo

* Add authz handler for new operations

* Add new controller endpoints

* add updating service account revision
2024-05-01 11:47:11 -05:00
cyprain-okeke
a14646eaad
resolve the text style (#4038)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-05-01 17:00:39 +01:00
Thomas Rittson
5012d56e5a
[AC-2538] Limit admin access - fix ManageUsers custom permission (#4032)
* Fix issue where ManageUsers custom permission could not
  grant access to collections
* Split ModifyAccess operation to ModifyUserAccess and
  ModifyGroupAccess to reflect more granular operations
2024-05-01 10:06:24 +10:00
cyprain-okeke
3749fa6113
resolve the issue (#4035)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-04-30 19:20:48 +01:00
Shane Melton
8e7bd79d9a
[AC-2274] Restrict Admin POST/PUT/DELETE Cipher Endpoints for V1 FC (#3879)
* [AC-2274] Introduce CanEditAnyCiphersAsAdminAsync helper to replace EditAnyCollection usage

* [AC-2274] Add unit tests for CanEditAnyCiphersAsAdmin helper

* [AC-2274] Add Jira ticket

* [AC-2274] Undo change to purge endpoint

* [AC-2274] Update admin checks to account for unassigned ciphers

---------

Co-authored-by: kejaeger <138028972+kejaeger@users.noreply.github.com>
2024-04-30 10:28:16 -07:00
renovate[bot]
79a4cbaa09
[PM-7335] [deps] Auth: Update Duende.IdentityServer to v7 (#3709)
* [deps] Auth: Update Duende.IdentityServer to v7

* Fixes for upgrade incompatibility

* Update configuration file used in a test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-04-30 09:50:36 -07:00
Todd Martin
e74d299e6b
[PM-1449] Add email-verification flag (#4033) 2024-04-30 12:43:12 -04:00
Alex Morask
ccaee0b719
Stopped subtracting grace period from expiration date when license is in trial (#3991) 2024-04-30 10:55:05 -04:00
SmithThe4th
cb55699d80
get updated cipher and used that in the response model (#4030) 2024-04-29 16:12:42 -04:00
renovate[bot]
ba4c2639b7
[deps] Auth: Update del to v6.1.1 (#3607)
* [deps] Auth: Update del to v6.1.1

* fix bootstrap

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike Kottlowski <ikottlowski@bitwarden.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-04-29 10:59:59 -07:00
Thomas Rittson
ba36b2d26a
[AC-2172] Member modal - limit admin access (#3934)
* update OrganizationUsersController PUT and POST
* enforces new collection access checks when updating members
* refactor BulkCollectionAuthorizationHandler to avoid repeated db calls
2024-04-29 11:02:06 +10:00
Ike
8142ba7bf2
target bootstrap v4.6.2 (#4024) 2024-04-26 17:40:45 -07:00
SmithThe4th
e2d445dd3c
Changed PutCollections response model to return collection ids (#4023) 2024-04-26 16:27:00 -04:00
Rui Tomé
b3e5076128
[AC-1978] Flexible collections: EF data migrations for deprecated permissions (#3969)
* [AC-1682] Added MySql migration and script

(cherry picked from commit d367f6de6b)

* [AC-1682] Added Postgres migration and script

(cherry picked from commit 9bde1604da)

* [AC-1682] Added Sqlite migration and script

(cherry picked from commit 262887f9c3)

* [AC-1682] dotnet format

(cherry picked from commit 00eea0621c)

* [AC-1682] Fixed Sqlite query

(cherry picked from commit 26f5bf8afd)

* [AC-1682] Drop temp tables if they exist when starting the scripts

(cherry picked from commit c20912f95c)

* [AC-1682] Removed MySql transaction from script because EF migration already wraps it under its own transaction

(cherry picked from commit 7b54d78d67)

* [AC-1682] Setting FlexibleCollections = 1 only for Orgs that had data migrated in previous steps

(cherry picked from commit 28bba94d81)

* [AC-1682] Updated queries to check for OrganizationId

(cherry picked from commit a957530d5e)

* [AC-1682] Fixed MySql script

(cherry picked from commit deee483ab7)

* [AC-1682] Fixed Postgres query

(cherry picked from commit c3ca9ec3c8)

* [AC-1682] Fix Sqlite query

(cherry picked from commit fada0a81bf)

* [AC-1682] Reverted scripts back to enabling Flexible Collections to all existing Orgs

(cherry picked from commit bd3b21b969)

* [AC-1682] Removed dropping temporary table from scripts

(cherry picked from commit eb7794d592)

* [AC-1682] Removed other temp table drops

(cherry picked from commit 26768b7bf8)

* [AC-1978] Fix issue that allows the web app to have the user type Manager available

(cherry picked from commit 2890f78870)

* [AC-1682] Bump dates on migration scripts

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2024-04-26 14:11:29 +01:00
Rui Tomé
d2abf5b2d7
[AC-2323] Flexible collections: automatically migrate data for all Organizations (#3927)
* [AC-2323] Added script to migrate all sql organizations to use flexible collections

* [AC-2323] Overriding FlexibleCollectionsSignup to true for local usage

* [AC-2323] Fix script comment

* [AC-2323] Fixed typo

* [AC-2323] Bump up date on migration script

* [AC-2323] Bump migration script date

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2024-04-26 14:11:00 +01:00
Alex Morask
186afbc162
Updated CB to use both flag and provider status. (#4005) 2024-04-25 15:27:00 -04:00
Thomas Avery
a7b992d424
[SM-1150] Add secret sync endpoint (#3906)
* Add SecretsSyncQuery

* Add SecretsSync to controller

* Add unit tests

* Add integration tests

* update repo layer
2024-04-25 10:34:08 -05:00
Alex Morask
f7aa56b324
Handle case where Stripe IDs do not relate to Stripe entities (#4021) 2024-04-25 11:07:47 -04:00
renovate[bot]
78b57ba99f
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.81 (#4019)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-25 15:42:53 +02:00
renovate[bot]
be05050e68
[deps] Tools: Update LaunchDarkly.ServerSdk to v8.4.0 (#4020)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-25 15:41:18 +02:00
Alex Morask
eac2b9f0b8
[AC-2488] Return default state for billing metadata when Organization has no Stripe entities (#4018)
* Return default state for billing metadata when no stripe entities

* Fix tests
2024-04-25 09:21:05 -04:00
Alex Morask
b12e881ece
[AC-2488] Add billing endpoint to determine SM standalone for organization (#4014)
* Add billing endpoint to determine SM standalone for org.

* Add missing attribute
2024-04-24 16:29:04 -04:00
cyprain-okeke
d3c964887f
[AC-2512] Admin: Seat Minimum input fields are showing for Reseller-type providers (#4013)
* resolve the issue

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

* remove the unused reference

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-04-24 20:37:21 +01:00
renovate[bot]
9de222d13c
[deps] Auth: Update bootstrap to v5 (#3610)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-04-23 12:41:22 -07:00
renovate[bot]
dd3f094f22
[deps] Auth: Update DuoUniversal to v1.2.3 (#3866)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-04-23 11:39:52 -07:00
renovate[bot]
1e88adc7fa
[deps] Auth: Update sass to v1.75.0 (#3609)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-04-23 10:19:30 -07:00
renovate[bot]
8ffc589dd2
[deps] Auth: Update jquery to v3.7.1 (#3608)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-04-23 09:56:17 -07:00
Kyle Spearrin
3c76f48bdc
Revert "[PM-6977] Migrate to FCM v1 (#3917)" (#4009)
This reverts commit dd8d5955a4.
2024-04-23 13:59:28 +00:00
Kyle Spearrin
dd8d5955a4
[PM-6977] Migrate to FCM v1 (#3917)
* fcmv1 update

* try without nested data obj

* type must be a string

* fcmv1 migration flag

* lint fixes

* fix tests

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-04-23 12:58:35 +01:00
Conner Turnbull
28e8287451
Updated missing logic for 2023 plans (#4000) 2024-04-19 13:15:35 -04:00
Addison Beck
87f710803d
Refactor PolicyService.SaveAsync() (#4001)
* Move dependent policy checks to a dedicated function

* Invert conditional

* Extract enable logic
2024-04-19 10:53:24 -05:00
Alex Morask
821f7620b6
[AC-2461] Scale provider seats on client organization deletion (#3996)
* Scaled provider seats on client organization deletion

* Thomas' feedback
2024-04-19 10:09:18 -04:00
Conner Turnbull
e6bd8779a6
Updated GetIdsByMetadata to support providerId (#3994)
* Refactored the charge succeeded handler a bit

* If refund charge is received, and we don't have a parent transaction stored already, attempt to create one

* Converted else if structure to switch-case

* Moved logic for invoice.upcoming to a private method

* Moved logic for charge.succeeded to a private method

* Moved logic for charge.refunded to a private method

* Moved logic for invoice.payment_succeeded to a private method

* Updated invoice.payment_failed to match the rest

* Updated invoice.created to match the rest with some light refactors

* Added method comment to HandlePaymentMethodAttachedAsync

* Moved logic for customer.updated to a private method

* Updated logger in default case

* Separated customer.subscription.deleted and customer.subscription.updated to be in their own blocks

* Moved logic for customer.subscription.deleted to a private method

* Moved logic for customer.subscription.updated to a private method

* Merged customer sub updated or deleted to switch

* No longer checking if the user has premium before disabling it since the service already checks

* Moved webhook secret parsing logic to private method

* Moved casting of event to specific object down to handler

* Reduced nesting throughout

* When removing secrets manager, now deleting 100% off password manager discount for SM trials

* Added method comment and reduced nesting in RemovePasswordManagerCouponIfRemovingSecretsManagerTrialAsync

* Updated GetIdsByMetadata to support providerId
2024-04-19 09:33:26 -04:00
Conner Turnbull
0171a3150e
[AC-2427] update discount logic for complimentary password manager (#3990)
* Refactored the charge succeeded handler a bit

* If refund charge is received, and we don't have a parent transaction stored already, attempt to create one

* Converted else if structure to switch-case

* Moved logic for invoice.upcoming to a private method

* Moved logic for charge.succeeded to a private method

* Moved logic for charge.refunded to a private method

* Moved logic for invoice.payment_succeeded to a private method

* Updated invoice.payment_failed to match the rest

* Updated invoice.created to match the rest with some light refactors

* Added method comment to HandlePaymentMethodAttachedAsync

* Moved logic for customer.updated to a private method

* Updated logger in default case

* Separated customer.subscription.deleted and customer.subscription.updated to be in their own blocks

* Moved logic for customer.subscription.deleted to a private method

* Moved logic for customer.subscription.updated to a private method

* Merged customer sub updated or deleted to switch

* No longer checking if the user has premium before disabling it since the service already checks

* Moved webhook secret parsing logic to private method

* Moved casting of event to specific object down to handler

* Reduced nesting throughout

* When removing secrets manager, now deleting 100% off password manager discount for SM trials

* Added method comment and reduced nesting in RemovePasswordManagerCouponIfRemovingSecretsManagerTrialAsync
2024-04-19 09:15:48 -04:00
Addison Beck
19a7aa500d
Properly handle new policy enrollments in the public API (#4003)
* Test the use case

* Properly instantiate model from null

* Rename query parameter
2024-04-18 17:04:04 -05:00
Alex Morask
9827ee5f6a
[AC-2420] Fix customer discount ID and SM invite validation (#3966)
* Fix customer discount ID and SM update validation

* Replace constructor needed for autofixture
2024-04-18 11:11:37 -04:00
Colton Hurst
49ed5af517
SM-1179: Rename service accounts to machine accounts (#3974) 2024-04-18 11:01:08 -04:00
Rui Tomé
92716fe319
[PM-3176] Extract IOrganizationService.SaveUserAsync to a command (#3894)
* [PM-3176] Extract IOrganizationService.SaveUserAsync to a command

* [PM-3176] Enabled nullable on command

* [PM-3176] Removed check that was not working
2024-04-18 11:42:30 +01:00
cyprain-okeke
6672019122
[AC-1218] Add ability to delete Provider Portals (#3973)
* add new classes

* initial commit

* revert the changes on this files

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

* revert unnecessary changes

* Add a model

* add the delete token endpoint

* add a unit test for delete provider

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

* add the delete provider method

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

* resolve the failing test

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

* resolve the delete request redirect issue

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

* changes to correct the json issue

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

* resolve errors

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

* resolve pr comment

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

* move ProviderDeleteTokenable to the adminConsole

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

* Add feature flag

* resolve pr comments

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

* add some unit test

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

* resolve the failing test

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

* resolve test

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

* add the remove feature flag

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

* [AC-2378] Added `ProviderId` to PayPal transaction model (#3995)

* Added ProviderId to PayPal transaction model

* Fixed issue with parsing provider id

* [AC-1923] Add endpoint to create client organization (#3977)

* Add new endpoint for creating client organizations in consolidated billing

* Create empty org and then assign seats for code re-use

* Fixes made from debugging client side

* few more small fixes

* Vincent's feedback

* Bumped version to 2024.4.1 (#3997)

* [AC-1923] Add endpoint to create client organization (#3977)

* Add new endpoint for creating client organizations in consolidated billing

* Create empty org and then assign seats for code re-use

* Fixes made from debugging client side

* few more small fixes

* Vincent's feedback

* [AC-1923] Add endpoint to create client organization (#3977)

* Add new endpoint for creating client organizations in consolidated billing

* Create empty org and then assign seats for code re-use

* Fixes made from debugging client side

* few more small fixes

* Vincent's feedback

* add changes after merge conflict

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
Co-authored-by: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com>
Co-authored-by: Bitwarden DevOps <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-04-17 10:09:53 +01:00
Alex Morask
c4ba0dc2a5
[AC-1923] Add endpoint to create client organization (#3977)
* Add new endpoint for creating client organizations in consolidated billing

* Create empty org and then assign seats for code re-use

* Fixes made from debugging client side

* few more small fixes

* Vincent's feedback
2024-04-16 13:55:00 -04:00
Conner Turnbull
73e049f878
[AC-2378] Added ProviderId to PayPal transaction model (#3995)
* Added ProviderId to PayPal transaction model

* Fixed issue with parsing provider id
2024-04-16 17:50:12 +00:00
Thomas Rittson
44412844a0
[AC-2169] Group modal - limit admin access - members tab (#3975)
* Prevent Admins from adding themselves to groups
if they cannot manage all collections and items
2024-04-16 11:39:51 +10:00
renovate[bot]
0512102189
[deps] Tools: Update Handlebars.Net to v2.1.6 (#3982)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 16:56:50 +02:00
renovate[bot]
64c239674f
[deps] Tools: Update SignalR to v8.0.4 (#3984)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 13:28:19 +02:00
renovate[bot]
b73bcc9e4e
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.74 (#3985)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 13:18:10 +02:00
renovate[bot]
9377f93965
[deps] Tools: Update SendGrid to v9.29.3 (#3983)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 11:36:53 +02:00
renovate[bot]
7d161f0c2b
[deps] Tools: Update LaunchDarkly.ServerSdk to v8.3.0 (#3986)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 11:34:07 +02:00
renovate[bot]
312680b495
[deps] Tools: Update MailKit to v4.5.0 (#3987)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 11:29:30 +02:00
Conner Turnbull
6d2b47f036
Removed business name from org edit (#3970) 2024-04-12 10:17:34 -04:00
Thomas Rittson
66f0c4b982
Enable unassigned items banner for self-host (#3978) 2024-04-12 06:40:43 -05:00
cyprain-okeke
736a6f19a5
resolve the issue with changes of payment method (#3976)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-04-11 15:19:28 +01:00
Alex Morask
3cdfbdb22d
Start subscription for provider during setup process. (#3957) 2024-04-10 14:10:53 -04:00
Thomas Rittson
2c36784cda
[AC-2436] Show unassigned items banner (#3967)
* Add endpoint

* Add feature flag

* Only show banner for flexible collections orgs (to avoid affecting self-host)
2024-04-10 09:06:43 -05:00
Jason Ng
c15574721d
AC-2330 add response to put method for updating cipher collections (#3964)
Co-authored-by: gbubemismith <gsmithwalter@gmail.com>
2024-04-09 10:39:26 -04:00
Kyle Spearrin
40221f578f
[PM-6339] Shard notification hub clients across multiple accounts (#3812)
* WIP registration updates

* fix deviceHubs

* addHub inline in ctor

* adjust setttings for hub reg

* send to all clients

* fix multiservice push

* use notification hub type

* feedback

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-04-08 15:39:44 -04:00
Vincent Salucci
de8b7b14b8
feat: generate txt record server-side and remove initial domain verification, refs AC-2350 (#3940) 2024-04-08 14:32:20 -05:00
Conner Turnbull
9a2d383417
[AC-2211] SM Changes (#3938)
* SM changes

* Teams starter bugs
2024-04-08 14:42:01 -04:00
Conner Turnbull
03e65f6d1d
[AC-2416] Resolved Stripe refunds not creating a transaction (#3962)
* Resolved NullReferenceException when refunding a charge

* Downgraded log message for PayPal to warning
2024-04-08 09:40:43 -04:00
cyprain-okeke
5bd2c424aa
[AC-2262] As a Bitwarden Admin, I need a ways to set and update an MSP's minimum seats (#3956)
* initial commit

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

* add the feature flag

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

* Add featureflag for create and edit html pages

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-04-05 15:50:28 +01:00
Jake Fink
108d22f484
[BEEEP] begin 2fa integration tests for identity (#3843)
* begin 2fa integration tests for identity
- fix org mappings and query

* add key length to doc

* lint
2024-04-05 09:30:42 -04:00
Colton Hurst
b164f24c99
SM-1119: Rename service accounts to machine accounts (#3958)
* SM-1119: Rename service accounts to machine accounts

* SM-1119: Undo system management portal changes
2024-04-05 08:54:36 -04:00
Matt Bishop
88f34836f2
Event processor tuning (#3945) 2024-04-02 15:45:18 -04:00
Alex Morask
a048d6d9e3
[AC-1795] Provide extra subscription info when past due (#3950)
* Provide past due data on subscription

* Add feature flag
2024-04-02 13:21:40 -04:00
cyprain-okeke
48da6eba1c
[PM-3891] Remove the dollar threshold changes and Implement time-based threshold (#3948)
* implement time threshold

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

* add code to make failed payment is tried

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
2024-04-02 17:36:53 +01:00
Alex Morask
f0b7074219
Propagate org status from selfhost model (#3930) 2024-04-02 09:29:41 -04:00
Alex Morask
a39a498790
Prevent NRE for missing upcoming invoice when sub is pending cancelation (#3920) 2024-04-02 09:28:57 -04:00
renovate[bot]
b9049cd699
[deps] DbOps: Update Dapper to v2.1.35 (#3947)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-01 09:46:58 -04:00
Alex Morask
2f9daf2149
Update response code (#3949) 2024-04-01 09:13:55 -04:00
renovate[bot]
66593297b9
[deps] Billing: Update Serilog.Sinks.SyslogMessages to v3.0.2 (#3946)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-01 08:46:25 -04:00
renovate[bot]
10d132aa22
[deps] DbOps: Update Microsoft.Data.SqlClient to v5.2.0 (#3944)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-29 13:50:24 -04:00
Matt Bishop
d46527899e
Remove DocumentDB settings placeholders (#3943) 2024-03-29 13:28:16 -04:00
Alex Morask
e2cb406a95
[AC-1910] Allocate seats to a provider organization (#3936)
* Add endpoint to update a provider organization's seats for consolidated billing.

* Fixed failing tests
2024-03-29 11:18:10 -04:00
Matt Bishop
c53e5eeab3
[PM-6762] Move to Azure.Data.Tables (#3888)
* Move to Azure.Data.Tables

* Reorder usings

* Add new package to Renovate

* Add manual serialization and deserialization due to enums

* Properly retrieve just the next page
2024-03-28 16:36:24 -04:00
Alex Morask
ffd988eeda
[AC-1904] Implement endpoint to retrieve Provider subscription (#3921)
* Refactor Core.Billing prior to adding new logic

* Add ProviderBillingQueries.GetSubscriptionData

* Add ProviderBillingController.GetSubscriptionAsync
2024-03-28 08:46:12 -04:00
renovate[bot]
46dba15194
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.63 (#3933)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-28 10:04:31 +01:00
Thomas Rittson
728d49ab5d
[AC-1724] Remove BulkCollectionAccess feature flag (#3928) 2024-03-28 08:08:35 +10:00
Matt Bishop
2790687dc2
[PM-6938] Allow certain database operations to be skipped (#3914)
* Centralize database migration logic

* Clean up unused usings

* Prizatize

* Remove verbose flag from Docker invocation

* Allow certain database operations to be skipped

* Readonly
2024-03-27 11:20:54 -04:00
renovate[bot]
5355b2b969
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.61 (#3925)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-26 09:50:47 +01:00
Thomas Rittson
4c1d24b10a
Use static property for JsonSerializerOptions (#3923) 2024-03-26 08:34:55 +10:00
renovate[bot]
5237b522e5
[deps] Billing: Update Stripe.net to v43.20.0 (#3867)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
2024-03-25 12:47:15 -04:00
cyprain-okeke
1a066d886c
[AC 2261] Emails - direct Secrets Manager members to Secrets Manager product (#3896)
* remove the unwanted test

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

* initial commit

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

* changes to the sm redirect

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

* revert the sm changes for join org

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-03-25 15:33:30 +01:00
Thomas Rittson
c5d5de0aed
[AC-2334] Fix unable to load members when permissions is "null" (#3922)
* Also add xmldoc comment to CoreHelpers.LoadClassFromJsonData to warn about this
2024-03-25 14:26:12 +00:00
Shane Melton
6a0f6e1dac
[PM-2383] Bulk collection assignment (#3919)
* [PM-2383] Add bulk add/remove collection cipher repository methods

* [PM-2383] Add additional authorization helpers for CiphersControlle

* [PM-2383] Add /bulk-collections endpoint to CiphersController.cs

* [PM-2383] Add EF implementation for new CollectionCipherRepository methods

* [PM-2383] Ensure V1 logic only applies when the flag is enabled for new bulk functionality
2024-03-22 13:16:34 -07:00
cyprain-okeke
5dd1a9410a
[AC-1864] Event type for initiation path (#3869)
* initial commit

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

* handle the upgrade path reference

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

* code improvement

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

* resolve pr comment

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

* change the comment

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

* move the private method down

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

* code review changes

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-03-22 21:01:22 +01:00
Thomas Rittson
1c2acbec3a
[AC-2171] Member modal - limit admin access - editing self (#3893)
* Restrict admins from adding themselves to groups

Updated OrganizationUsersController only, GroupsController to be updated
separately

* Delete unused api method
2024-03-22 12:37:30 +10:00
Alex Morask
90a5862840
Remove FF 'AC-1607_present-user-offboarding-survey' and old cancel functionality (#3895) 2024-03-21 15:04:20 -04:00
Alex Morask
9f7e05869e
[AC-1900] Update Vault DB to support provider billing (#3875)
* Add Gateway columns to Provider table

* Add ProviderId column to Transaction table

* Create ProviderPlan table

* Matt's feedback

* Rui's feedback

* Fixed Gateway parameter on Provider
2024-03-21 11:15:49 -04:00
renovate[bot]
43ee5a24ec
[deps] Tools: Update Microsoft.Azure.NotificationHubs to v4.2.0 (#3853)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-21 13:25:21 +00:00
Rui Tomé
366eef7e23
[PM-6934] Prevent enabling two step login policy if any Org member has no master password and no 2FA set up (#3915)
* [PM-6934] Prevent enabling two step login policy if any Org member has no master password and no 2FA set up

* [PM-6934] PR feedback

* [PM-6934] Updated policy check to only check users that will be deleted

* [PM-6934] Removed unnecessary code

* [PM-6934] Fixed unit tests and policy update logic

* [PM-6934] Updated error message
2024-03-21 12:07:13 +00:00
renovate[bot]
78ce1f8a5d
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.59 (#3912)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-19 20:01:06 +01:00
Todd Martin
611a65e0a9
[PM-5437] Handle client_credentials clientId that is not a valid GUID (#3616)
* Return null if the clientId is not a valid Guid.

* Linting
2024-03-19 10:21:15 -04:00
renovate[bot]
84cbd9ee7d
[deps] AC: Update Quartz to v3.8.1 (#3532)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
2024-03-19 11:52:19 +00:00
renovate[bot]
82381e0c42
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.58 (#3907)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-16 17:31:59 +01:00
renovate[bot]
63d5f5604c
[deps] Tools: Update LaunchDarkly.ServerSdk to v8.2.0 (#3903)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-15 17:09:16 +01:00
renovate[bot]
1e5f6ff40e
[deps] Tools: Update SignalR to v8.0.3 (#3898)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-15 16:12:46 +01:00
renovate[bot]
91081b2aa2
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.57 (#3902)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-15 13:26:28 +01:00
Cesar Gonzalez
9786573183
[PM-5551] Removing Autofillv2 and AutofillOverlay Feature Flags (#3692) 2024-03-14 08:48:22 -04:00
Todd Martin
10457c67e3
[PM-6577] Handle any exceptions in Duo HealthCheck (#3861)
* Handle any exceptions in health check to avoid returning a 500.

* Added log message.
2024-03-13 09:56:53 -04:00
cyprain-okeke
dd21d8fcf4
fix the trailing issue when autoscaling (#3889)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-03-12 17:17:46 +01:00
cyprain-okeke
532b70e26c
fix the duplicate email issue (#3891)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-03-12 17:08:59 +01:00
renovate[bot]
3ddb08a315
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.55 (#3886)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-11 16:26:05 +01:00
Conner Turnbull
5e4c5acc48
Removed the need to verify requests as CloudOps added an ACL on the network (#3882) 2024-03-11 10:03:10 -04:00
cyprain-okeke
ab3959fcfb
AC 2266 two email notifications is sent when creating org from sm trial (#3878)
* remove the unwanted test

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

* Fix the double email issue

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

* Resolve the bug issue

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

* change the category name

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

* move private  down the class

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

* move the private method down the class file

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

* Add the RegisterUser Test

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

* modify the test

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

* remove the failing test

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

* revert the test

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

* add the email method

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

* revert changes on the UserServiceTests.cs

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-03-11 14:36:32 +01:00
Thomas Rittson
1a3c1aeb0c
Do not use ApplicationCache when saving OrgUser (#3885)
* Do not use ApplicationCache when saving OrgUser

* dotnet format
2024-03-11 11:01:56 +00:00
Conner Turnbull
f432c18ab5
Added provider_edit to admins in bitwarden portal (#3764) 2024-03-08 16:44:36 -05:00
renovate[bot]
baba9c7b91
[deps] Tools: Update LaunchDarkly.ServerSdk to v8.1.0 (#3876)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-07 18:22:07 +01:00
cyprain-okeke
02d2abd172
initial commit (#3874)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-03-07 13:04:08 +00:00
Conner Turnbull
2dc068a983
[AC-2239] fix automatic tax errors (#3834)
* Ensuring customer has address before enabling automatic tax

* StripeController fixes

* Refactored automatic tax logic to use customer's automatic tax values

* Downgraded refund error in paypal controller to be a warning

* Resolved broken test after downgrading error to warning

* Resolved broken paypal unit tests on windows machines

---------

Co-authored-by: Lotus Scott <148992878+lscottbw@users.noreply.github.com>
2024-03-05 13:04:26 -05:00
Rui Tomé
9d59e4dc9e
[AC-1637] Sanitize Business and Organization Names from html script injection prior to storing in db (#3302)
* [AC-1637] Added HtmlEncodingStringConverter to encode/decode special chars on JSON serialization/deserialization

* [AC-1637] Added unit tests for HtmlEncodingStringConverter

* [AC-1637] Moved expected values on unit tests to the arrange phase

* [AC-1637] Added HtmlEncodingStringConverter to properties that are for input/output of Org Name and Business name

* [AC-1637] Modified views in Admin project to decode values to display

* [AC-1637] Replaced Html.Raw with HttpUtility.HtmlDecode

* [AC-1637] Added JsonConverter to Provider DTOs

* [AC-1637] Modified HandlebarsMailService to decode organization name before sending emails

* Revert "[AC-1637] Added JsonConverter to Provider DTOs"

This reverts commit 94d507cf93.

* [AC-1637] Fixed Admin panel organization search

* [AC-1637] Sanitizing Organization name and business name on creation in Admin panel

* [AC-1637] Sanitizing organization name and business name on creation by a provider

* [AC-1637] Sanitizing provider name on creation and on viewing in admin panel

* [AC-1637] Added sanitization to more places where Org name is used

* [AC-1637] Swapped using HttpUtility for WebUtility since the later is part of the dotnet framework

* [AC-1637] Updated error messages

* [AC-1637] Decoding on Admin panel add existing organization

* [AC-1637] Fix HTML decoding issues

* [AC-1637] Refactor HTML decoding in View and Model classes on Admin panel

* [AC-1637] Refactor provider name and business name usages to use methods that output decoded values

* [AC-1637] Fixed typo

* [AC-1637] Renamed Provider methods to retrieve Decoded Name and BusinessName

* [AC-1637] Renamed Organization methods to retrieve Decoded Name and BusinessName

* [AC-1637] Update the display name method in the `ProviderOrganizationOrganizationDetails` class to `DisplayName()`
2024-03-05 10:56:48 +00:00
Tom
997af0f6ab
[PM-221] Adding CipherId to the Send table, create/update sprocs, and added mi… (#3646)
* Adding CipherId to the Send table, create/update sprocs, and added migrations

* changing migrator script to drop create sprocs

* fixing double brackets

* Revert "changing migrator script to drop create sprocs"

This reverts commit 2d5171e7e5.

* Remove comment I nitpicked

* Script best practices

* Fix typo

* Try recreate again

* Fix missing output

* Revert "Try recreate again"

This reverts commit 38257ebeaa.

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: federicom09 <fmonesiglio@bitwarden.com>
2024-03-04 19:31:33 -05:00
Todd Martin
94d665e6e9
[PM-5435] Handle Fido2VerificationException on WebAuthn 2FA (#3615)
* Handle Fido2VerificationException on WebAuthn 2FA

* Linting!
2024-03-04 11:43:03 -05:00
renovate[bot]
37a22540a9
[deps] Tools: Update MailKit to v4.4.0 (#3868)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-04 17:29:40 +01:00
renovate[bot]
8919f50435
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.54 (#3862)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-04 10:55:39 +01:00
renovate[bot]
f96bcae974
[deps] Billing: Update Sentry.Serilog to v3.41.4 (#3822)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-29 09:41:52 -05:00
Alex Morask
eb1eb0554c
Resolve RisksSubscriptionFailure bugs (#3790) 2024-02-29 08:15:18 -05:00
cyprain-okeke
696883c5e0
[AC-2101] Update welcome emails from trial initiation and org creation (#3836)
* Add the email template

* add changes fro the trial initiation email

* adding featureFlags

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

* adding noopener

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

* Fix  the failing test

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-02-29 09:16:16 +01:00
renovate[bot]
b7dc9feb0e
[deps] Vault: Update aspnet-health-checks monorepo (major) (#3294)
* [deps] Vault: Update aspnet-health-checks monorepo

* [PM-5249] Add updated Azure Storage Queues health check package that was split from the original Azure Storage health check package

* [PM-5249] Remove Azure Queue Storage health checks and dependencies

* [PM-5249] Remove unused Redis, Service Bus, and SendGrid health checks

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Shane Melton <smelton@bitwarden.com>
2024-02-28 11:42:45 -08:00
renovate[bot]
0b56c0e14b
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.53 (#3848)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-28 12:44:57 +01:00
Alex Morask
40a2a567e6
Sent initiation path for organization and user signups (#3723) 2024-02-26 11:50:24 -05:00
Vincent Salucci
8fb64f036c
fix: set orgUser Id for collection access when creating reseller org, refs AC-2214 (#3839) 2024-02-26 09:00:34 +10:00
Thomas Rittson
4ae86b7d34
[AC-2213] Add Flexible Collections information in the Bitwarden Portal (#3801)
* Add Flexible Collections information in the Bitwarden Portal

* Add collection management settings

* Add headings
2024-02-25 10:26:08 -06:00
Shane Melton
6d089d3c26
[AC-2195] Fixes for FC V1 for Custom Users (#3837)
* [AC-2195] Ensure Custom users with EditAnyCollection can always access all ciphers

* [AC-2195] Ensure FC V1 logic is not used for non-migrated organizations
2024-02-23 10:01:14 -08:00
Oscar Hinton
bad9694f6c
[PM-6378] Add noreferrer to external admin urls (#3827) 2024-02-23 14:54:41 +01:00
Thomas Avery
1499d1e2c6
[SM-713] Add database support for secret access policies (#3681)
* mssql add column and migration

* Add secret access policies to EF models and config

* Clear new access policies on service account delete

* Add SM cleanup code on delete

* Fix EF org user bulk delete

* Run EF migrations
2024-02-22 10:06:39 -06:00
Todd Martin
374b59bcfb
[PM-5947] Add self-hosted override to allow Duo redirect flow (#3818) 2024-02-21 14:17:40 -05:00
Justin Baur
70fac808b0
Use FrozenDictionary in StaticClientStore (#3833)
* Add Benchmark

* Use FrozenDictionary

* Use TryGetValue

* Format
2024-02-21 10:29:59 -05:00
Thomas Rittson
0abd52b5be
[AC-1895] AC Team code ownership moves: Bitwarden Portal (#3528)
---------

Co-authored-by: Addison Beck <hello@addisonbeck.com>
2024-02-21 09:18:09 +10:00
Justin Baur
a661ffdb3d
Improve Speed of EncryptedStringAttribute (#3785)
* Improve Speed of EncryptedStringAttribute

- Use Base64.IsValid
- Use SearchValues

* Fix Tests

* Remove SearchValues Change

* Format
2024-02-20 13:07:54 -05:00
Oscar Hinton
80a3979be1
Remove unused job hosted service from billing (#3831) 2024-02-20 18:50:04 +01:00
Matt Bishop
af56ab4159
Remove unnecessary identity column indication (#3830) 2024-02-20 11:42:52 -05:00
Vincent Salucci
e23f37ea1f
[AC-2214] Defect - provider reseller org creation when fc signup flag enabled (#3805)
* fix: supply signup feature flag to provider reseller org creation, refs AC-2214

* feat: extend flexible collections coverage to enhancement bools, refs AC-2214
2024-02-20 09:53:50 -06:00
renovate[bot]
4e6360cc4f
[deps] DbOps: Update EntityFrameworkCore (#3823)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-20 09:42:30 -05:00
renovate[bot]
d384107ef7
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.52 (#3826)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-19 16:37:11 +01:00
renovate[bot]
a98af69e00
[deps] Tools: Update SendGrid to v9.29.2 (#3811)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-19 11:24:47 +01:00
Alex Morask
b866353d2c
Split endpoints for FF 'AC-1607_present-user-offboarding-survey' (#3814) 2024-02-16 13:37:54 -05:00
renovate[bot]
268db7d45e
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.51 (#3804)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-16 09:42:15 +01:00
Shane Melton
da0da772e9
[PM-6325] Include permission details for non FC organizations when creating/updating a collection (#3810) 2024-02-15 09:49:37 -08:00
renovate[bot]
0b486b0585
[deps] Tools: Update SignalR to v8.0.2 (#3803)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-15 11:14:30 +01:00
Jake Fink
d99d3b8380
[PM-6303] Add duo state to 2fa (#3806)
* add duo state to 2fa

* Id to UserId
2024-02-14 18:00:46 -05:00
rkac-bw
744d21ec5e
[PM-4767] Update Grant_Save procedure (#3641)
* modify grant_save sql script to migration and Auth SQL scripts to not use merge

* Update formatting for sql files

* Fix formatting for sql files

* Format using Prettier

* Rename 2024-01-03_00_FixGrantSave.sql to 2024-02-12_00_FixGrantSave.sql

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-02-14 09:48:58 -07:00
Rui Tomé
4830a352e8
[AC-2154] Log backup data in OrganizationEnableCollectionEnhancementsCommand as Json (#3802) 2024-02-14 14:42:16 +00:00
Thomas Rittson
06dcdd7d13
Fix Flexible Collections block in Public API (#3800)
Only throw if collection.Manage is true
2024-02-14 08:42:07 -06:00
Thomas Rittson
a07aa8330c
[AC-2206] Fix assigning Manage access to default collection (#3799)
* Fix assigning Manage access to default collection

The previous implementation did not work when creating an org as a
provider because the ownerId is null in OrganizationService.SignUp.
Added a null check and handled assigning access in ProviderService
instead.

* Tweaks
2024-02-14 08:41:51 -06:00
Alex Morask
97018e2501
Upgrade logging packages for .NET 8 (#3798) 2024-02-13 14:34:55 -05:00
cyprain-okeke
accff663c5
[PM 5864] Resolve root cause of double-charging customers with implementation of PM-3892 (#3762)
* Getting dollar threshold to work

* Added billing cycle anchor to invoice upcoming call

* Added comments for further work

* add featureflag

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

* resolve pr comments

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

* Resolve pr comment

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
Co-authored-by: Conner Turnbull <cturnbull@bitwarden.com>
2024-02-13 20:28:14 +01:00
Thomas Rittson
0258f4949c
[AC-2184] Fix push sync notification on opt-in to Flexible Collections (#3794)
* Fix push sync notification on opt-in to Flexible Collections

* Fix tests

* Fix tests more
2024-02-13 12:15:07 -06:00
Todd Martin
1a3146f776
[PM-5800] Remove feature flag checks for PasswordlessLogin (#3713)
* Removed feature flag checks for PasswordlessLogin

* Removed unused reference.
2024-02-13 11:15:24 -05:00
Thomas Rittson
789e266791
Delete unused .sql files from updating Collection permissions (#3792) 2024-02-13 13:19:15 +10:00
renovate[bot]
186a96af30
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.48 (#3778)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-12 13:31:00 +01:00
Daniel García
fd3f05da47
[PM-6137] Fix invalid Swagger generation in knowndevice (#3760)
* Fix invalid swagger generation in knowndevice

* Format
2024-02-12 11:04:00 +01:00
Thomas Rittson
1d9fe79ef6
Give creating owner Manage permissions for default collection (#3776) 2024-02-12 08:50:41 +10:00
Kyle Spearrin
17118bc74f
[PM-6208] Move TOTP cache validation logic to providers (#3779)
* move totp cache validation logic to providers

* remove unused usings

* reduce TTL
2024-02-09 12:44:31 -08:00
Ike
a19ae0159f
[PM-5424] fix TDE provider user (#3771)
* Add Test Asserting Problem

* Fix Test

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-02-09 12:08:22 -08:00
Rui Tomé
de294b8299
[AC-2154] Logging organization data before migrating for flexible collections (#3761)
* [AC-2154] Logging organization data before migrating for flexible collections

* [AC-2154] Refactored logging command to perform the data migration

* [AC-2154] Moved validation inside the command

* [AC-2154] PR feedback

* [AC-2154] Changed logging level to warning

* [AC-2154] Fixed unit test

* [AC-2154] Removed logging unnecessary data

* [AC-2154] Removed primary constructor

* [AC-2154] Added comments
2024-02-09 17:57:01 +00:00
Rui Tomé
a9b9231cfa
[AC-2114] Downgrade Custom roles to User if flexible collections are enabled and only active permissions are 'Edit/Delete assigned collections' (#3770)
* [AC-2114] Downgrade Custom roles to User if flexible collections are enabled and only active permissions are 'Edit/Delete assigned collections'

* [AC-2114] Undo changes to OrganizationsController

* [AC-2114] Updated public API MembersController responses to have downgraded Custom user types for flexible collections
2024-02-09 17:42:01 +00:00
Alex Morask
59fa6935b4
[AC-1608] Send offboarding survey response to Stripe on subscription cancellation (#3734)
* Added offboarding survey response to cancellation when FF is on.

* Removed service methods to prevent unnecessary upstream registrations

* Forgot to actually remove the injected command in the services

* Rui's feedback

* Add missing summary

* Missed [FromBody]
2024-02-09 11:58:37 -05:00
Rui Tomé
a08541173d
[PM-3571] Address HTML injection in passwordless login emails (#3623)
* [PM-3571] Update HandlebarsMailService for Passwordless login email URL, using AbsoluteUri which has html encoding

* [PM-3571] Switched from AbsoluteUri to OriginalString

---------

Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
2024-02-09 08:42:11 -05:00
Kyle Spearrin
6174df0874
[PM-6196] Cleanup distributed cache for identity (#3704)
* cleanup distributed cache for identity

* removed unused using

* use persistent IDistributedCache
2024-02-09 07:43:28 -05:00
Oscar Hinton
0766806279
[PM-6165] Add x-enum-varnames to improve swagger generation (#3767)
Improves code generation of enums for the server bindings in the sdk. Bindings will now use the appropiate variable name from the server.

Works by adding a filter which appends x-enum-varnames to enums with the name from c#.
2024-02-09 09:47:03 +01:00
Thomas Rittson
b6255a64fe
[AC-2184] Force sync after opting in to Flexible Collections (#3766) 2024-02-09 10:27:47 +10:00
Shane Melton
636f716d62
[AC-1124] Restrict admins from accessing items in Collections tab (#3676)
* [AC-1124] Add GetManyUnassignedOrganizationDetailsByOrganizationIdAsync to the CipherRepository

* [AC-1124] Introduce IOrganizationCiphersQuery.cs to replace some CipherService queries

* [AC-1124] Add additional CipherDetails model that includes CollectionIds

* [AC-1124] Update CiphersController and response models
- Add new endpoint for assigned ciphers
- Update existing endpoint to only return all ciphers when feature flag is enabled the user has access

* [AC-1124] Add migration script

* [AC-1124] Add follow up ticket for Todos

* [AC-1124] Fix feature service usage after merge with main

* [AC-1124] Optimize unassigned ciphers query

* [AC-1124] Update migration script date

* [AC-1124] Update migration script date

* [AC-1124] Formatting
2024-02-08 14:07:58 -08:00
Kyle Spearrin
707347ce3e
[PM-3570] Adjust refresh token lifetimes (#3697)
* adjust refresh token lifetimes

* fix broken grant delete

* Update ApiClient.cs

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-02-08 21:36:15 +00:00
Kyle Spearrin
9ecc4794fe
[PM-6177] Persistent distributed cache using Cosmos (#3772)
* cosmos distributed cache

* rename container to default
2024-02-08 14:34:53 -05:00
Kyle Spearrin
3e73f1cb4a
[PM-6167] Remove cosmos logging sink (#3769)
* get rid of cosmos logging sink

* remove logs from layout

* delete log models

* remove logs_view permission

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-02-08 18:35:45 +00:00
Alex Morask
6cc53b4739
Fix PayPal IPN Logging (#3768)
* Remove request logging, fix txn_id correlation

* Respond 400 when txn_id is missing

* More cleanup
2024-02-08 15:37:41 +00:00
Vincent Salucci
d29755de5a
[AC-1880] Public API - Deprecated properties (#3706)
* feat: remove required for AccessAll and add xmldoc for usage restrictions, refs AC-1880

* feat: add validation for create group workflow wrt manage property, refs AC-1880

* feat: add validation for update group workflow wrt manage property, refs AC-1880

* feat: add validation for create and update member workflow wrt manage property, refs AC-1880

* feat: add validation for update collection workflow wrt manage property, refs AC-1880

* fix: flaky Public/GroupsControllerTests + more test coverage, refs AC-1880
2024-02-08 07:44:36 -06:00
Kyle Spearrin
7747744ff9
[PM-6153] Dedicated redis connection for rate limiter (#3763)
* rearrange how redis is registered

* separate redis connection string for rate limiter
2024-02-07 17:38:18 -05:00
renovate[bot]
039d3cbce7
[deps] Auth: Update Otp.NET to v1.3.0 (#3605)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-07 17:37:10 -05:00
Kyle Spearrin
f0a8fd63ca
remove the redis grant store (#3757) 2024-02-07 14:50:23 -05:00
Kyle Spearrin
a019355ab4
[PM-6141] Remove rate limiting ip blocker (#3754)
* remove rate limiting ip blocker

* remove using

* fix tests
2024-02-07 12:23:26 -05:00
Kyle Spearrin
6e6b50fd86
update rate limiter library (#3756)
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-02-07 12:23:05 -05:00
Kyle Spearrin
fc1d7c7059
[PM-3561] Clean the return url of any whitespace (#3696)
* clean the return url of any whitespace

* ReplaceWhiteSpace helper

* tests for ReplaceWhiteSpace helper

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-02-06 13:30:37 -05:00