* Add AccessToSecretsAsync to the repository
* Add BulkSecretAuthorizationHandler
* Update controller to use the new authz handler
* Add integration test coverage
* Optionally Run `docker-compose`
* Use Traversal Projects Over Solution Files
* Cleanup VSCode Tasks
* Bind DataProtection Keys to Host
- Makes it so the container can be rebuilt without corrupting data
* Update .vscode/tasks.json
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
* 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>
* 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
* Add BaseProviderController, update some endpoints to ServiceUser permissions
* Prevent service user from scaling provider seats above seat minimum
* Expand invoice response to include DueDate
* 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
* 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
* 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'
* 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>
* 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>
* 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
* 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
* 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>
* 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
* 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
* Bump Microsoft.AspNetCore.Mvc.Testing to 8.0.1
* Bump Microsoft.NET.Test.Sdk to 17.8.0
* Nuget bumps on Infrastructure.Integration to be equal to solution
* Use global setting
* Use global setting
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
* SM-1012: Phase 2, removing SM Beta from the server (but not db)
* SM-1012: Add migration for RemoveSMBetaFromOrganization
* SM-1012: Dotnet format
* SM-1012: Undo RemoveSMBetaFromOrganization EF migration
* SM-1012: Redo RemoveSMBetaFromOrganization EF migration
* SM-1012: Ran dotnet format
* Upgrade to .NET 8
* Linting
* Clean up old JSON deserialization code
* More .NET 8-oriented linting
* Light feedback
* Get rid of old test we don't know the root issue for
* Fix a new test
* Remove now-unnecessary Renovate constraint
* Use Any()
* Somehow a 6.0 tooling config we don't need snuck back in
* Space out properties that always change per release
* Bump a few core packages since the last update
* Initial commit
* resolve pr comment
* adding some unit test
* Resolve pr comments
* Adding some unit test
* Resolve pr comment
* changes to find the bug
* revert back changes on admin
* Fix the failing Test
* fix the bug
* refactoring replace logic
* model for policies + authz handler + unit tests
* update AP repository
* add new endpoints to controller
* update unit tests and integration tests
---------
Co-authored-by: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com>