1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-08 05:02:21 -05:00

5796 Commits

Author SHA1 Message Date
Hinton
933c5c82ca
Change to using Theory 2025-05-08 11:21:51 +02:00
Hinton
e1f5c90e8a
Resolve pr feedback 2025-05-05 16:00:08 +02:00
Oscar Hinton
5c7fa7aae6
Merge branch 'main' into arch/seed-org-users 2025-05-05 15:59:46 +02:00
Alex Morask
7fe022e26f
Add SmMaxProjects to OrganizationLicense (#5678)
* Add SmMaxProjects to OrganizationLicense

* Run dotnet format
2025-05-05 09:48:43 -04:00
Brant DeBow
4b49b04409
[PM-17562] Revert event route optimization (#5766) 2025-05-05 08:05:38 -04:00
Brant DeBow
75a2da3c4b
[PM-17562] Add support for extended properties on event integrations (#5755)
* [PM-17562] Add support for extended properties on event integrations

* Clean up IntegrationEventHandlerBase

* Respond to PR feedback
2025-05-05 08:04:59 -04:00
Github Actions
9511c26683 Bumped version to 2025.5.0 2025-05-05 10:29:50 +00:00
Conner Turnbull
077d0fa6d7
Resolved an issue where autoscaling always happened (#5765) 2025-05-02 12:53:06 -04:00
Conner Turnbull
cd3f16948b
Resolved the ambiguous build error (#5762) 2025-05-02 12:25:52 +00:00
Alex Morask
2d4ec530c5
[PM-18955] Implement OrganizationWarningsQuery (#5713)
* Add GetWarnings endpoint to OrganizationBillingController

* Add OrganizationWarningsQueryTests
2025-05-01 17:13:10 -04:00
Thomas Rittson
41001fefae
Support use of organizationId parameter in authorization (#5758) 2025-05-02 07:00:48 +10:00
Matt Bishop
9da98d8e97
Run LD reference check on all pushes (#5760)
* Run LD reference check on all pushes

* Fix syntax of code-references.yml

---------

Co-authored-by: Matt Andreko <mandreko@bitwarden.com>
2025-05-01 12:25:52 -07:00
Jonas Hendrickx
011298c9ff
PM-16517: Create personal use plan for additional storage (#5205)
* PM-16517: Create personal use plan for additional storage

* f

* f

* f

* fix

* f

---------

Co-authored-by: Jonas Hendrickx <jhendrickx@bitwarden.com>
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
2025-05-01 17:53:03 +00:00
Alex Morask
0fa6962d17
Register EF OrganizationInstallationRepository (#5751) 2025-05-01 13:39:04 -04:00
Matt Bishop
706d7a5768
Migrate to new LD Action for code references (#5759) 2025-05-01 10:08:39 -07:00
Alex Morask
e77acbc5ad
[PM-19956] [PM-18795] Require provider payment method during setup behind FF (#5752)
* Require provider payment method during setup behind FF

* Fix failing test

* Run dotnet format

* Rui's feedback
2025-05-01 12:12:45 -04:00
cyprain-okeke
dc5db5673f
[PM-17775] (#5699)
* Changes to allow admin to send F4E sponsorship

* Fix the failing unit tests

* Fix the failing test

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

* Merge Changes with pm-17777

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

* Add changes for autoscale

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

* Return the right error response

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

* Resolve the failing unit test

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2025-05-01 16:35:51 +01:00
Brandon Treston
8ecd9c5fb3
[PM-19332] Create InitPendingOrganizationCommand (#5584)
* wip

* implement CommandResult

* remove auth handler

* fix import

* remove method from OrganizationService

* cleanup, add tests

* clean up

* fix auth in tests

* clean up comments

* clean up comments

* clean up test
2025-05-01 10:07:19 -04:00
Oscar Hinton
09a03ebae8
Merge branch 'main' into arch/seed-org-users 2025-05-01 15:00:54 +02:00
Hinton
b131bf29ab
Update comment 2025-05-01 14:59:09 +02:00
Hinton
01093e8bbd
Additional cleanup 2025-05-01 14:14:26 +02:00
Hinton
107e2fc0c3
Cleanup and re-organize the code slightly 2025-05-01 13:43:17 +02:00
Shane Melton
92701d8cd0
[PM-20550] Add JSON validation to Cipher Delete/Update attachment sprocs (#5656)
* Add JSON validation to Cipher Delete/Update attachment sprocs

* Remove [Attachment] assignment from cipher create/update sprocs

* Add additional validation and use JSON_PATH_EXISTS for delete sproc check

* Update migration script date
2025-04-30 08:43:39 -07:00
Conner Turnbull
cf7a59c077
[Innovation Sprint] Phishing Detection (#5516)
* Initial stubbing out of the phishing service

* Add the phishing domain controller

* Add changes for the phishing domain get

* Add distributed cache to the phishing domain

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

* Rename the variable name

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

* Removed IPhishingDomainService

* Feature/phishing detection cronjob (#5512)

* Added caching to EF implementation. Added error handling and logging

* Refactored update method to use sqlbulkcopy instead of performing a round trip for each new insert

* Initial implementation for quartz job to get list of phishing domains

* Updated phishing domain settings to be its own interface

* Add phishing domain detection with checksum-based updates

* Updated auth for phishing domain endpoints to either require api, or licensing claims to support both web and browser clients, and selfhost api clients

* [Innovation Sprint] Updated Phishing domains to rely on blob storage (#5517)

* Updated phishing detection data layer to rely on azure blob storage instead of sql server

* dotnet format

* Took rider refactors

* Ensuring phishing.testcategory.com exists to test against

* Added redis to dev's docker-compose

* Removed redis from cloud profile

* Remove the Authorize attribute

* error whitespace fix whitespace formatting

* error WHITESPACE: Fix whitespace formatting

* Wrapped phishing detection feature behind feature flag (#5532)

* Increased timeout for fetching source list a bunch

* Removed PhishingDomains policy

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
Co-authored-by: Cy Okeke <cokeke@bitwarden.com>
2025-04-30 11:03:59 -04:00
Conner Turnbull
7ebf312b84
Updated seat count logic to ensure that only the correct sponsorships are counted towards the seat count (#5711) 2025-04-30 07:19:28 -04:00
cyprain-okeke
9fdf12e955
fix microsoft data sqlClient sqlException (#5749)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2025-04-29 14:19:08 +01:00
renovate[bot]
887791cdce
[deps] DbOps: Update Dapper to 2.1.66 (#5721)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 22:06:05 -04:00
renovate[bot]
75c49f5cbc
[deps] DbOps: Pin dependencies (#5715)
* [deps] DbOps: Pin dependencies

* You don't pin .NET tools

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2025-04-28 22:04:00 -04:00
renovate[bot]
b177a13e2f
[deps] DbOps: Update Microsoft.Azure.Cosmos to 3.49.0 (#5734)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 20:06:44 -04:00
Alex Morask
db0079cebb
[PM-19009] Remove feature flag: pm-15179-add-existing-orgs-from-provider-portal (#5664)
* Remove feature flag

* Run dotnet format
2025-04-28 16:22:20 -04:00
Alex Morask
00b9ba2392
Allow for deletion of pending providers (#5679) 2025-04-28 15:50:40 -04:00
cyprain-okeke
07a2c0e9d2
[PM-18569]Add admin sponsored families to organization license (#5569)
* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Add `Notes` column to `OrganizationSponsorships` table

* Add feature flag to `CreateAdminInitiatedSponsorshipHandler`

* Unit tests for `CreateSponsorshipHandler`

* More tests for `CreateSponsorshipHandler`

* Forgot to add `Notes` column to `OrganizationSponsorships` table in the migration script

* `CreateAdminInitiatedSponsorshipHandler` unit tests

* Fix `CreateSponsorshipCommandTests`

* Encrypt the notes field

* Wrong business logic checking for invalid permissions.

* Wrong business logic checking for invalid permissions.

* Remove design patterns

* duplicate definition in Constants.cs

* initial commit

* Merge Change with pm-17830 and use the property

* Add the new property to download licence

* Add the new property

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

* Remove the unsed failing test

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

* Remove unused method

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
Co-authored-by: Jonas Hendrickx <jhendrickx@bitwarden.com>
2025-04-28 19:21:52 +01:00
Jared McCannon
12fc9dffd4
[PM-20586] - Fixing allowing seats to increase to limit. (#5705) 2025-04-28 09:55:55 -05:00
Daniel James Smith
60f6189314
Move feature flags owned by Data Insights and Reporting team into their own section (#5691)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-04-28 10:41:49 -04:00
Brant DeBow
ad19d3d3ad
[PM-17562] Add feature flag for event-based organization integrations (#5710)
* Added EventBasedOrganizationIntegrations feature flag; Added enforcement of flag at the API layer

* [PM-17562] Use EventBasedOrganizationIntegrations feature flag to turn on/off event queue

* Optimization that removes the need for EventRouteService (from @justindbaur)
2025-04-28 08:20:47 -04:00
SmithThe4th
9a7fddd77c
Removed feature flag (#5707) 2025-04-25 10:15:26 -07:00
Alex Morask
5184d10995
Create customer for client organization that was converted to BU upon unlinking (#5706) 2025-04-25 13:06:06 -04:00
Vincent Salucci
cb2860c0c1
chore: update public api members delete xmldoc, refs PM-20520 (#5708) 2025-04-25 11:54:54 +01:00
renovate[bot]
0434191bca
[deps] Tools: Update aws-sdk-net monorepo (#5704)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-25 05:47:21 +02:00
Hinton
a98eeac602
Fix indentation 2025-04-24 17:58:47 +02:00
Hinton
f4a026868d
Merge branch 'main' of github.com:bitwarden/server into arch/seed-org-users
# Conflicts:
#	bitwarden-server.sln
2025-04-24 17:54:46 +02:00
Hinton
cd2969d970
Clean up appsettings 2025-04-24 17:53:29 +02:00
Conner Turnbull
8a2012bb83
[PM-17777] sponsorships consume seats (#5694)
* Admin initiated sponsorships now use seats similarly to inviting an organization user

* Updated f4e endpoint to not expect a user ID, and instead just send a boolean

* Fixed failing tests

* Updated OrganizationUserReadOccupiedSeatCountByOrganizationIdQuery to ensure both left and right sides are selecting the same columns
2025-04-24 10:53:34 -04:00
Hinton
6e92ccf273
Skip tests by default 2025-04-24 14:04:22 +02:00
Hinton
a4418bb775
Wire up automatic test 2025-04-24 13:50:08 +02:00
Hinton
92553822f0
Extract recipe to separate file 2025-04-24 10:58:30 +02:00
renovate[bot]
d265e62f6d
[deps] Auth: Lock file maintenance (#5507)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Patrick-Pimentel-Bitwarden <ppimentel@bitwarden.com>
2025-04-23 15:59:20 -04:00
Nick Krantz
6809709628
[PM-20064] Add cascade deletion for cipher with tasks (#5690)
* add cascade deletion for cipher tasks

* add migrations for cascade delete on ciphers and security tasks

* remove trailing comma

* add SQL migration for PasswordHealthReportApplication

- Allow cascade delete when an organization is deleted
2025-04-23 13:16:29 -05:00
Brant DeBow
90d831d9ef
[PM-17562] API For Organization Integrations/Configurations, Refactored Distributed Events, Slack Integration (#5654)
* [PM-17562] Slack Event Investigation

* Refactored Slack and Webhook integrations to pull configurations dynamically from a new Repository

* Added new TemplateProcessor and added/updated unit tests

* SlackService improvements, testing, integration configurations

* Refactor SlackService to use a dedicated model to parse responses

* Refactored SlackOAuthController to use SlackService as an injected dependency; added tests for SlackService

* Remove unnecessary methods from the IOrganizationIntegrationConfigurationRepository

* Moved Slack OAuth to take into account the Organization it's being stored for. Added methods to store the top level integration for Slack

* Organization integrations and configuration database schemas

* Format EF files

* Initial buildout of basic repositories

* [PM-17562] Add Dapper Repositories For Organization Integrations and Configurations

* Update Slack and Webhook handlers to use new Repositories

* Update SlackOAuth tests to new signatures

* Added EF Repositories

* Update handlers to use latest repositories

* [PM-17562] Add Dapper and EF Repositories For Ogranization Integrations and Configurations

* Updated with changes from PR comments

* Adjusted Handlers to new repository method names; updated tests to naming convention

* Adjust URL structure; add delete for Slack, add tests

* Added Webhook Integration Controller

* Add tests for WebhookIntegrationController

* Added Create/Delete for  OrganizationIntegrationConfigurations

* Prepend ConnectionTypes into IntegrationType so we don't run into issues later

* Added Update to OrganizationIntegrationConfigurtionController

* Moved Webhook-specific integration code to being a generic controller for everything but Slack

* Removed delete from SlackController - Deletes should happen through the normal Integration controller

* Fixed SlackController, reworked OIC Controller to use ids from URL and update the returned object

* Added parse/type checking for integration and integration configuration JSONs, Cleaned up GlobalSettings to remove old values

* Cleanup and fixes for Azure Service Bus support

* Clean up naming on TemplateProcessorTests

* Address SonarQube warnings/suggestions

* Expanded test coverage; Cleaned up tests

* Respond to PR Feedback

* Rename TemplateProcessor to IntegrationTemplateProcessor

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2025-04-23 10:44:43 -04:00
Rui Tomé
722fae81b3
[PM-18237] Add RequireSsoPolicyRequirement (#5655)
* Add RequireSsoPolicyRequirement and its factory to enforce SSO policies

* Enhance WebAuthnController to support RequireSsoPolicyRequirement with feature flag integration. Update tests to validate behavior when SSO policies are applicable.

* Integrate IPolicyRequirementQuery into request validators to support RequireSsoPolicyRequirement. Update validation logic to check SSO policies based on feature flag.

* Refactor RequireSsoPolicyRequirementFactoryTests to improve test coverage for SSO policies. Add tests for handling both valid and invalid policies in CanUsePasskeyLogin and SsoRequired methods.

* Remove ExemptStatuses property from RequireSsoPolicyRequirementFactory to use default values from BasePolicyRequirementFactory

* Restore ValidateRequireSsoPolicyDisabledOrNotApplicable

* Refactor RequireSsoPolicyRequirement to update CanUsePasskeyLogin and SsoRequired properties to use init-only setters

* Refactor RequireSsoPolicyRequirementFactoryTests to enhance test clarity

* Refactor BaseRequestValidatorTests to improve test clarity

* Refactor WebAuthnController to replace SSO policy validation with PolicyRequirement check

* Refactor BaseRequestValidator to replace SSO policy validation with PolicyRequirement check

* Refactor WebAuthnControllerTests to update test method names and adjust policy requirement checks

* Add tests for AttestationOptions and Post methods in WebAuthnControllerTests to validate scenario where SSO is not required

* Refactor RequireSsoPolicyRequirement initialization

* Refactor SSO requirement check for improved readability

* Rename test methods in RequireSsoPolicyRequirementFactoryTests for clarity on exempt status conditions

* Update RequireSsoPolicyRequirement to refine user status checks for SSO policy requirements
2025-04-23 15:43:36 +01:00