1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-03 10:42:21 -05:00

5767 Commits

Author SHA1 Message Date
renovate[bot]
a158dec551
[deps] BRE: Update mysql Docker tag to v9 2025-05-01 21:03:43 +00: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
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
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
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
Matt Bishop
9667ecaf9e
Make EF migration script executable (#5696) 2025-04-22 14:51:57 -07:00
Matt Bishop
f336d959c7
Cascade deletion for organization integration configurations (#5695)
* Cascade deletion for organization integration configurations

* I always forget to format
2025-04-22 14:13:10 -07:00
MtnBurrit0
2644efc2b7
Add env variable to override /installations domain (#5669)
* Add env variable to override /installations domain
2025-04-22 11:21:19 -06:00
Github Actions
4320649468 Bumped version to 2025.4.3 2025-04-22 14:36:03 +00:00
Todd Martin
465ec08f3a
fix(sso): Revert [deps] Auth: Update Duende.IdentityServer to 7.1.0
This reverts commit 4c5bf495f31f42036d492b088535b28590037aa1.
2025-04-22 10:02:47 -04:00
Alex Morask
eaae4b69c7
Only automatically set collection method for MSP (#5680) 2025-04-22 08:20:41 -04:00
Daniel James Smith
cbb1168da8
Remove export-attachments feature flag (#5659)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-04-22 08:14:56 -04:00
Todd Martin
b38c75267f
[PM-19691] Remove duo-redirect feature flag (#5576)
* Completed grouping of feature flags by team.

* Completed grouping feature flags by team.

* Remove email delay feature flag

* Removed feature flag

* Fixed reference.

* Remove flag after merge.
2025-04-21 12:36:38 -04:00
Bernd Schoolmann
d818a271dd
Fix bug where password was not validated during reset enrollment when sso config was disabled (#5677) 2025-04-21 18:21:09 +02:00
Opeyemi
735dcb7653
BRE-757: add label for Renovate PR that touches Production workflows (#5661) 2025-04-21 07:36:18 -07:00
Github Actions
b728107c78 Bumped version to 2025.4.2 2025-04-21 14:22:38 +00:00
Bernd Schoolmann
c195f83402
[PM-19728] Add keys on devices list and get responses (#5633)
* Add keys on devices list and get responses

* Mark retrieve device keys endpoint as deprecated
2025-04-21 13:49:17 +02:00
Jared McCannon
159e4fe502
Corrected the number sent to stripe. Corrected the test. (#5667) 2025-04-18 14:38:15 -05:00
Jared McCannon
dc758c5176
[PM-19128] - Optimize Update Collections (#5626)
* added data clean up to test

* Added indices and edited sproc to avoid merge commands

* Forgot GO

* Adding some more GOs
2025-04-18 11:51:50 -05:00
Robyn MacCallum
9218ac0d7c
Add android-chrome-autofill flag (#5668) 2025-04-18 12:47:54 -04:00
Maciej Zieniuk
bfd98c703a
[PM-18017] Move Key Connector endpoints into Key Management team ownership (#5563)
* Move Key Connector controller endpoints into Key Management team ownership

* revert new key management endpoints
2025-04-18 09:26:51 -05:00
Jared McCannon
89fc27b014
[PM-20230] - Send owners email when autoscaling (#5658)
* Added email when autoscaling. Added tests as well.

* Wrote tests. Renamed methods.
2025-04-18 08:13:55 -05:00
Alex Morask
4379e326a5
Revert "[PM-20264] Replace StaticStore with PricingClient in `MaxProjects…" (#5665)
This reverts commit e943a2f051a254c4a031f39f2638d418bdd2e4a2.
2025-04-17 14:37:11 -04:00
Jonas Hendrickx
bd90c34af2
[PM-19180] Calculate sales tax correctly for sponsored plans (#5611)
* [PM-19180] Calculate sales tax correctly for sponsored plans

* Cannot divide by zero if total amount excluding tax is zero.

* Unit tests for families & families for enterprise

---------

Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
2025-04-17 11:33:16 -04:00