1
0
mirror of https://github.com/bitwarden/server synced 2025-12-06 00:03:34 +00:00
Commit Graph

66 Commits

Author SHA1 Message Date
Thomas Rittson
ee26a701e9 [BEEEP] [PM-28808] Fix invalid identity URL in Swagger (#6653)
- in generated JSON (used in help center), only show cloud options
  (with corrected identity URL)
- in self-host and dev, only show local option
2025-12-02 23:20:56 +00:00
Matt Bishop
b3573c15fd Validate any SQL migration scripts are the most recent (#6652)
* Validate any SQL migration scripts are the most recent

* Make string checks more robust

* Clarify script location

* Remove need given the additional validations that are immediately valuable

* Allow past incorrectly-named migrations but now enforce

* Centralize validation logic to PowerShell script
2025-12-02 08:15:47 -05:00
Matt Gibson
20cd3f5ceb Use consistent naming of containers (#6584)
The specified names are override compose project naming conventions. Each specified name was the same as the service name, with the exceptions of mysql and redis, which break our naming convention.
2025-11-18 22:08:38 -05:00
Brant DeBow
a565fd9ee4 Add Microsoft Teams integration (#6410)
* Add Microsoft Teams integration

* Fix method naming error

* Expand and clean up unit test coverage

* Update with PR feedback

* Add documentation, add In Progress logic/tests for Teams

* Fixed lowercase Slack

* Added docs; Updated PR suggestions;

* Fix broken tests
2025-10-10 10:39:31 -04:00
Thomas Rittson
474e3f163c Fix MariaDB support for development (#6420)
- fix volume error when starting Docker container
- fix overlapping indexes of integration test databases
- add ef profile to start all EF containers at once
2025-10-08 06:59:43 +10:00
renovate[bot]
28fa3037a4 [deps] BRE: Update rabbitmq Docker tag to v4.1.3 (#6205)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-01 13:04:44 -04:00
Patrick-Pimentel-Bitwarden
e0ccd7f578 chore(global-settings): [PM-24717] New Global Settings For New Device Verification - Updated secrets in the example secrets.json (#6387) 2025-09-29 13:06:52 -04:00
Brant DeBow
747e212b1b Add Datadog integration (#6289)
* Event integration updates and cleanups

* Add Datadog integration

* Update README to include link to Datadog PR

* Move doc update into the Datadog PR; Fix empty message on ArgumentException

* Adjust exception message

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

* Removed unnecessary nullable enable; Moved Docs link to PR into this PR

* Remove unnecessary nullable enable calls

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2025-09-08 12:39:59 -04:00
Daniel García
a180317509 [PM-25182] Improve swagger OperationIDs: Part 1 (#6229)
* Improve swagger OperationIDs: Part 1

* Fix tests and fmt

* Improve docs and add more tests

* Fmt

* Improve Swagger OperationIDs for Auth

* Fix review feedback

* Use generic getcustomattributes

* Format

* replace swaggerexclude by split+obsolete

* Format

* Some remaining excludes
2025-09-02 18:30:53 +02:00
Daniel García
6971f0a976 Update Swashbuckle and improve generated OpenAPI files (#6066)
* Improve generated OpenAPI files

* Nullable

* Fmt

* Correct powershell command

* Fix name

* Add some tests

* Fmt

* Switch to using json naming policy
2025-08-18 18:40:50 +02:00
Brant DeBow
f6cd661e8e [PM-17562] Add HEC integration support (#6010)
* [PM-17562] Add HEC integration support

* Re-ordered parameters per PR suggestion

* Apply suggestions from code review

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

* Refactored webhook request model validation to be more clear

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2025-07-01 08:52:38 -04:00
Justin Baur
2da1b43c10 Devcontainer restart enhancements (#5965)
* Add environment variable options to quickly start the devcontainer

Co-authored-by: tangowithfoxtrot <tangowithfoxtrot@users.noreply.github.com>

* Fix DEV_CERT_CONTENTS

---------

Co-authored-by: tangowithfoxtrot <tangowithfoxtrot@users.noreply.github.com>
2025-06-23 20:23:23 -04:00
sneakernuts
ce61a01f29 SRE-2299 cleanup (#5926) 2025-06-05 12:23:01 -06:00
Brant DeBow
59f5fafb87 [PM-17562] Add strict delay support for RabbitMQ; Refactor implementation (#5899)
* [PM-17562] Add strict delay support for RabbitMQ

* fix lint error

* Added more robust FailureReason handling and some additional tests

* Fix two issues noted by SonarQube

* Fix typo; Add alternate handling if MessageId is null or empty

* Set MessageId on all message publishers
2025-06-03 10:48:24 -04:00
Brant DeBow
6486354fbc [PM-17562] Add Azure Service Bus support for event integration retries (#5880)
* [PM-17562] Add Azure Service Bus support for event integration retries

* Cleanup AzureServiceBusIntegrationListenerService.cs; add nullable

* Removed IntegrationHandlerBase* since it is no longer used (We removed the subclasses previously)

* Changed strategy to assume ApplyRetry always gives us a non-null DelayUntilDate; Added test to confirm as well
2025-05-29 08:22:11 -04:00
Thomas Rittson
3bf4f11c3a Add MariaDB as development and test database (#5816) 2025-05-16 13:55:13 +10: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
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
Matt Bishop
9667ecaf9e Make EF migration script executable (#5696) 2025-04-22 14:51:57 -07:00
Brant DeBow
02262476d6 [PM-17562] Add Azure Service Bus for Distributed Events (#5382)
* [PM-17562] Add Azure Service Bus for Distributed Events

* Fix failing test

* Addressed issues mentioned in SonarQube

* Respond to PR feedback

* Respond to PR feedback - make webhook opt-in, remove message body from log
2025-02-11 10:20:06 -05:00
Brant DeBow
5efd68cf51 [PM-17562] Initial POC of Distributed Events (#5323)
* Initial POC of Distributed Events

* Apply suggestions from code review

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* Clean up files to support accepted changes. Address PR Feedback

* Removed unneeded using to fix lint warning

* Moved config into a common EventLogging top-level item. Fixed issues from PR review

* Optimized per suggestion from justinbaur

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* Updated to add IAsyncDisposable as suggested in PR review

* Updated with suggestion to use KeyedSingleton for the IEventWriteService

* Changed key case to lowercase

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2025-01-30 12:07:02 -05:00
Matt Bishop
8f8a599c07 Use .db extension for SQLite configuration example (#5313) 2025-01-22 13:09:46 -05:00
Addison Beck
0e0dd8203a [PM-14818] Update migrate.ps1 to support test database used by integration tests (#4912)
* Check for correct database in an old MySql migration

* Update `migrate.ps1` to support integration test databases
2025-01-22 11:41:18 -05:00
Thomas Rittson
7a509d20da Remove OpenLDAP docker configuration (#4902)
This has been moved to the Directory Connector repository.
2024-10-17 07:50:42 +10:00
Maciej Zieniuk
9dedaa5acf Move from Azure SQL Edge to native SQL Server (#4786)
* Move from Azure SQL Edge to native SQL Server

* Update .devcontainer/bitwarden_common/docker-compose.yml

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Update dev/docker-compose.yml

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

---------

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2024-09-20 11:12:52 +02:00
Justin Baur
3f1127489d Print DB Logs (#4754)
* Print DB Logs

* Fake Fail Test

* Remove Test Stuff

* Prefer Long-Hand Options

* Remove Test Failure

* Print deadlocks
2024-09-10 13:22:37 -04:00
Thomas Rittson
59cbe3e428 db migrations - remove comments before parsing secrets (#4519) 2024-07-17 07:03:07 +10:00
Justin Baur
b61b1eadaf Devcontainer Improvements (#4466)
* 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>
2024-07-08 10:48:02 -04:00
Thomas Rittson
a60f70dde5 [AC-2300] Remove mssql utility migration record migrator (#4171)
* Remove mssql utility migration record migrator

* Remove old/unused files
2024-06-11 06:25:52 +10:00
rkac-bw
b40d9ab70d Set mysql version to 8.0 in docker compose, prevent upgrading to 8.4 (#4045)
* Set mysql version to 8.0 in docker compose to prevent upgrading to 8.4 for now

* touched file to trigger test

* revert tocuhed file
2024-05-02 14:05:49 -06:00
Thomas Rittson
0a43d8335d Add IntegrationTest project to setup_secrets (#3941) 2024-04-11 11:31:36 +10:00
Thomas Rittson
386ff744ef [BEEEP] Use MsSqlMigratorUtility for local development databases (#3850)
* Update migrate.ps1 to use MsSqlMigratorUtility for dev databases
* Remove old handwritten scripts
* Migrate existing migration records
* Update Github Workflow to call MsSqlMigratorUtility directly
2024-03-13 09:25:20 +10:00
Thomas Rittson
b829812a3f [AC-2025] Add Organization.FlexibleCollections to database and sprocs (#3642)
* Add Organization.FlexibleCollections property and column

* Add new property to OrganizationAbility

* Add SQL and EF migrations
2024-01-11 13:25:57 +10:00
Justin Baur
8d36dfa5d3 Make development easier (#3504)
* Remove Certificate Steps from Setup

* Add Helpers to VSCode Tasks

* Force Ephermal Key in Integration Tests

* Add Property to Interface
2023-12-08 15:14:49 -05:00
tangowithfoxtrot
66c5ccf82d Vscode devcontainers (#3080)
* add devcontainers for `server`

* run db migrations automatically in dev environment

* remove curl

* remove trailing comma; causes parsing with `jq`

* use existing .env

* add initializeCommand

* use better search string

* restructure common files

* chmod +x scripts

* remove problematic env config scripts

* add mention of var that is needed for devcontainer

* remove ref to deleted script

* Update .devcontainer/community_dev/devcontainer.json

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* Update .devcontainer/internal_dev/devcontainer.json

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* use dev image for `6.0.416` SDK

* revert to manual DB migrations

* reuse SQL connection string var

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2023-11-06 16:58:32 -05:00
Oscar Hinton
1fcf070765 Setup secrets, use switch instead of bool (#3269) 2023-09-14 14:39:13 +02:00
Alex Morask
f080763b6c Add -legacy flag to openssl invocations (#3265) 2023-09-13 15:17:19 -04:00
renovate[bot]
952e77d3d7 Update kenchan0130/simplesamlphp Docker tag to v1.19.8 (#3060)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-05 14:57:29 -06:00
Calum Lind
62beb7d1e8 [PM-2300] Add Linux script to create dev certificates (#2941)
* Add Linux script to create dev certificates

A script based on the macOS script that can be used on Linux, either
Debian or Red-hat derived distros.

* Fix invalid trailing comma in secrets json example
2023-07-03 22:47:12 -04:00
Todd Martin
5b27800c46 Added RBAC to example JSON. (#2951) 2023-05-24 16:26:29 -04:00
Jim Hays
8262af3c53 [PM-1969] Spellcheck other (#2878)
* Fix typo in error message: 'Unkown' -> 'Unknown'

* Fix typos in error message

* Fix typo in example text: 'licence' -> 'license'

* Fix typo in validation: 'Ooganization' -> 'Organization'

* Fix typo in text string: 'compatibilty' -> 'compatibility'

* Fix typo: 'ProviderDisllowedOrganizationTypes' -> 'ProviderDisallowedOrganizationTypes'

* Fix typo: 'NSubstitueVersion' -> 'NSubstituteVersion'

* Fix typo: 'CreateIntialInvite' -> 'CreateInitialInvite'

* Fix typo: '_queuryScheme' -> '_queryScheme'

* Fix typo: 'GetApplicationCacheServiceBusSubcriptionName' -> 'GetApplicationCacheServiceBusSubscriptionName'

* Fix typo: 'metaDataRespository' -> 'metaDataRepository'

* Fix typo: 'cipherAttachements' -> 'cipherAttachments'

* Fix typo: 'savedEmergencyAccesss' -> 'savedEmergencyAccesses'

* Fix typo: 'owerOrgUser' -> 'ownerOrgUser'

* Fix typo: 'Organiation' -> 'Organization'

* Fix typo: 'extistingUser' -> 'existingUser'

* Fix typo: 'availibleAccess' -> 'availableAccess'

* Fix typo: 'HasEnouphStorage' -> 'HasEnoughStorage'

* Fix typo: 'extistingOrg' -> 'existingOrg'

* Fix typo: 'subcriber' -> 'subscriber'

* Fix typo: 'availibleCollections' -> 'availableCollections'

* Fix typo: 'Succes' -> 'Success'

* Fix typo: 'CreateAsync_UpdateWithCollecitons_Works' -> 'CreateAsync_UpdateWithCollections_Works'

* Fix typo: 'BadInsallationId' -> 'BadInstallationId'

* Fix typo: 'OrgNotFamiles' -> 'OrgNotFamilies'

* Revert "Fix typo: 'Organiation' -> 'Organization'"

This reverts commit 8aadad1c25.

* Revert "Fix typos in error message"

This reverts commit 81d201fc09.

---------

Co-authored-by: Daniel James Smith <djsmith@web.de>
2023-05-17 12:14:36 +02:00
Jim Hays
f9038472ce Fix typos in comments (#2876) 2023-05-09 17:38:47 +02:00
Stephen Kaiser
3b50ccb9f8 fix: mssql error when running docker compose (#2810)
Fixes the error message, "services.mssql.environment.ACCEPT_EULA must be a string, number or null" when running `docker compose --profile mssql --profile mail up -d` during initial dev setup on MacOS.
2023-03-23 12:14:40 -04:00
Stephen Kaiser
a680dec0d4 [PM-1507] fix: Use camel case for docker default network (#2811)
* fix: Use camel case for docker default network

* Update project name in .env.example
2023-03-23 16:43:18 +01:00
SmithThe4th
7d0bba3a29 Improve EF Migration Workflow by Starting Required Docker Services Automatically (#2725)
* Added check to detremine if certain docker services are running and if not starts them

* used to docker no recreate flag to simplify the process
2023-02-23 12:01:01 -05:00
Thomas Rittson
285b2ae55b Add explicit options to db migration script (#2637) 2023-01-31 13:41:11 -05:00
Justin Baur
6cb236ebcb Add Tool For Adding EF Migrations (#2576)
* Add Tool For Adding EF Migrations

* Update dev/ef_migrate.ps1

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2023-01-20 11:28:24 -05:00
Matt Gibson
09e524c9a2 Include SQLite in migrations (#2559) 2023-01-12 07:59:00 -06:00
Matt Bishop
503630497e [PS-2185] Update defaults for SQL Server to trust the server certificate (#2563)
* Update defaults for SQL Server to trust the server certificate

* Use an explicit
2023-01-10 17:13:33 -05:00
Matt Gibson
7cbc4a8970 Add Sqlite as EF DB provider (#2487)
* Add Sqlite as EF DB provider

Note: In-memory sqlite does not work across projects, since the migrator
only runs on the Admin project

Co-authored-by: Justin Baur <justindbaur@users.noreply.github.com>

* Include example sqlite connection string

* Add migrator assembly to sqlite connection

* Update initial migration to current schema state

* dotnet format 🤖

* Update package locks

* Respect name set in BW_SSL_KEY for cert generation (#2490)

(cherry picked from commit 2469e10110)

* [PS-2016] Add ability to change UID/GID for Bitwarden unified (#2495)

(cherry picked from commit c6fbe8cc44)

* Add SqliteMigrations project to unified Dockerfile

Co-authored-by: Justin Baur <justindbaur@users.noreply.github.com>
Co-authored-by: accolon <mail@accolon.net>
Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2022-12-14 08:28:51 -06:00