1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 08:32:50 -05:00
Commit Graph

4323 Commits

Author SHA1 Message Date
728cd1c0b5 [SM-949] Add endpoint to fetch events by service account (#3336)
* Add ability to fetch events by service account

* Extract GetDateRange into ApiHelpers util

* Add dapper implementation

* Add EF repo implementation

* Add authz handler case

* unit + integration tests for controller

* swap to read check

* Adding comments

* Fix integration tests from merge

* Enabled SM events controller for self-hosting
2023-10-19 16:57:14 -05:00
c1cf07d764 [AC-1750] AC Team code ownership moves - Groups (#3358) 2023-10-20 06:37:46 +10:00
1e2908ba5e [AC-1139] Updated CollectionsController GetManyWithDetails and Get to check for flexible collections flag 2023-10-19 20:58:01 +01:00
8c1a3a6e2d [AC-1748] Set resource as null when reading OrganizationUserUserDetailsResponseModel list 2023-10-19 16:16:07 +01:00
049fc2eb5b [AC-1748] Removed GroupAuthorizationHandler 2023-10-19 16:15:20 +01:00
dd8ffa2cbc Manually move future migrations (#3263)
* Manually move finalization migrations

* Rename the migrations to adhere to current EDD process

* Updated future migration for dropping UnknownDeviceVerificationEnabled column on User

* Moving src/Sql/dbo_future to src/Sql/dbo

* Delete files asking to be deleted

* Fix tab

* Updated migration for User tables update store procedures

* Fix formatting

* Fix User.sql table end comma

* Remove the future scripts that were added back in as finalization scripts by https://github.com/bitwarden/server/pull/3192/files

---------

Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
Co-authored-by: Hinton <hinton@users.noreply.github.com>
2023-10-19 07:59:46 -07:00
72b9392dea Merge branch 'feature/flexible-collections' into flexible-collections/deprecate-custom-collection-perm 2023-10-19 12:57:00 +01:00
1cad986900 [AC-1748] Reverted changes on OrganizationService 2023-10-19 12:43:28 +01:00
85de4351b0 [AC-1748] Created OrganizationUserAuthorizationHandler and modified OrganizationUsersController.Get to use that if flexible collections feature flag is enabled 2023-10-19 12:35:44 +01:00
09be61669f [AC-1748] Created GroupAuthorizationHandler and modified GroupsController.Get to use it if flexible collections feature flag is enabled 2023-10-19 12:34:55 +01:00
2f974d6b06 [AC-1748] Updated CurrentContext EditAssignedCollections, DeleteAssignedCollections, ViewAssignedCollections to check for flexible collections feature flag 2023-10-19 12:33:32 +01:00
1c0c6cc879 Update bitwarden/gh-actions digest to c970b0f (#3332)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-18 12:22:12 -04:00
95bf85dc6e [AC-1705] Update PayPal Verification URL to point to updated domain (#3338)
* change the url to match the paypal documentation

* Adding user-agent to the header

* Add a missing using statement

* Add more logs

* Resolving pr comments
2023-10-18 16:06:15 +00:00
37e9d70bee AC Team code ownership moves - Api project (#3351) 2023-10-18 11:27:56 -04:00
d230b10f82 Fix flaky UpdateSecretsManagerSubscriptionCommandTests (#3355)
Fix flaky UpdateSubscriptionAsync_ThrowsBadRequestException_WhenOccupiedSeatsExceedNewSeatTotal
test by expressly setting SmSeat value instead of relying on autodata.
This ensures that the new smSeat value is actually different.
2023-10-18 10:00:55 -05:00
e9be7f11f6 Add LaunchDarkly flag override file to .gitignore (#3357)
* Add `src/Identity/flags.json` to .gitignore

* Change to cover all OSS projects

* Include `bitwarden_license` projects
2023-10-18 15:54:07 +02:00
f7349b4ff2 Enable MsSqlMigratorUtility Dockerfile to run with additional parameters (#3348) 2023-10-18 09:40:49 -04:00
21219262a2 [PM-3779] idor allow the attacker to delete the victim domain (#3308)
* [PM-3779] Added IOrganizationDomainRepository.GetDomainByIdAndOrganizationIdAsync and SQL stored procedure

* [PM-3779] Changed GetOrganizationDomainByIdQuery to also take OrgId as a parameter. Updated existing unit tests and added new. Updated controller to match command changes

* [PM-3779] Removed type from url routes

* [PM-3779] Renamed IGetOrganizationDomainByIdAndOrganizationIdQuery to IGetOrganizationDomainByIdOrganizationIdQuery

* [PM-3779] Renamed GetOrganizationDomainByIdOrganizationIdQueryTests file and added more tests
2023-10-18 11:57:59 +01:00
cb73056c42 [AC-1654] idor allow the attacker to disable any one scim provising (#3325)
* [AC-1654] Added IOrganizationConnectionRepository.GetByIdOrganizationIdAsync and modified OrganizationConnectionsController to use it to get a connection matching both Id and OrganizationId

* [AC-1654] Fixed unit tests
2023-10-18 11:39:00 +01:00
ae18e76442 Merge remote-tracking branch 'origin/master' into feature/flexible-collections 2023-10-18 10:07:08 +10:00
3b049a64b8 [AC-1713] [Flexible collections] Add feature flags to server (#3334)
* Add feature flags for FlexibleCollections and BulkCollectionAccess

* Flag new routes and behaviour

---------

Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
2023-10-18 07:16:01 +10:00
8c77c65ce8 [PM-1222] Passkeys in the Bitwarden vault (#2679)
* [EC-598] feat: add support for saving fido2 keys

* [EC-598] feat: add additional data

* [EC-598] feat: add counter, nonDiscoverableId; remove origin

* [EC-598] fix: previous incomplete commit

* [EC-598] fix: previous incomplete commit.. again

* [EC-598] fix: failed merge

* [EC-598] fix: move files around to match new structure

* [EC-598] feat: add implementation for non-discoverable credentials

* [EC-598] chore: remove some changes introduced by vs

* [EC-598] fix: linting issues

* [PM-1500] Add feature flag to enable pass keys (#2916)

* Added feature flag to enable pass keys

* Renamed enable pass keys to fido2 vault credentials

* only sync fido2key ciphers on clients >=2023.9.0 (#3244)

* Renamed fido2key property username to userDisplayName (#3172)

* [PM-1859] Renamed NonDiscoverableId to credentialId (#3198)

* PM-1859 Refactor to credentialId

* PM-1859 Removed unnecessary import

---------

Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com>

* [PM-3807] Store all passkeys as login cipher type (#3261)

* [PM-3807] feat: add discoverable property to fido2key

* [PM-3807] feat: remove standalone Fido2Key

* [PM-3807] chore: clean up unusued constant

* [PM-3807] fix: remove standadlone Fido2Key property that I missed

* [PM-3807] Store passkeys in array (#3268)

* [PM-3807] feat: store passkeys in array

* [PM-3807] amazing adventures with the c# linter

* [PM-3980] Added creationDate property to the Fido2Key object (#3279)

* Added creationDate property to the Fido2Key object

* Fixed lint issues

* fixed comments

* made createionDate required

* [PM-3808] [Storage v2] Add old client/new server backward compatibility (#3262)

* [PM-3807] feat: add discoverable property to fido2key

* [PM-3807] feat: remove standalone Fido2Key

* [PM-3807] chore: clean up unusued constant

* [PM-3808] feat: add fido2 compatibility check before saving ciphers

* Resolved merge conflicts.

* Setting minimum version for QA.

---------

Co-authored-by: Todd Martin <tmartin@bitwarden.com>

* [PM-4054] Rename Fido2Key to Fido2Credential (#3306)

* Add server version compatibility check for Fido2Credentials on sharing with org (#3328)

* Added compatibility checks.

* Refactored into separate methods for easier removal.

* Added check on ShareMany

* Updated method order to be consistent.

* Linting

* Updated minimum server version for release, as well as defaulting the feature on for self-hosted.

* Added trailing space.

* Removed extra assignment

---------

Co-authored-by: gbubemismith <gsmithwalter@gmail.com>
Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: Carlos Gonçalves <carlosmaccam@gmail.com>
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2023-10-17 12:17:13 -04:00
8177821e8b [AC 1451] Refactor staticstore plans and consuming logic (#3164)
* refactor the plan and create new objects

* initial commit

* Add new plan types

* continue the refactoring by adding new plantypes

* changes for plans

* Refactoring continues

* making changes for plan

* Fixing the failing test

* Fixing  whitespace

* Fix some in correct values

* Resolve the plan data

* rearranging the plan

* Make the plan more immutable

* Resolve the lint errors

* Fix the failing test

* Add custom plan

* Fix the failing test

* Fix the failing test

* resolve the failing addons after refactoring

* Refactoring

* Merge branch 'master' into ac-1451/refactor-staticstore-plans-and-consuming-logic

* merge from master

* Merge branch 'master' into ac-1451/refactor-staticstore-plans-and-consuming-logic

* format whitespace

* resolve the conflict

* Fix some pr comments

* Fixing some of the pr comments

* fixing some of the pr comments

* Resolve some pr comments

* Resolve pr comments

* Resolves some pr comments

* Resolving some or comments

* Resolve a failing test

* fix the failing test

* Resolving some pr comments

* Fix the failing test

* resolve pr comment

* add a using statement fir a failing test

---------

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2023-10-17 15:56:35 +01:00
c2b5d45165 [AC-1139] Disabled the ability to set the custom permissions 'Delete/Edit Assigned Collections' if flexible collections feature flag is enabled 2023-10-17 15:35:41 +01:00
9f4df46444 [AC-1139] Marked as obsolete the methods EditAssignedCollections, DeleteAssignedCollections and ViewAssignedCollections on ICurrentContext 2023-10-17 15:32:14 +01:00
1c3bd4d252 bump minor sdk version (#3347) 2023-10-17 09:22:38 -04:00
69529d394b [SM-891] Include Secrets Manager in organization license for self-hosting (#3222)
* Remove self-hosted restrictions from SM endpoints

* Add SM properties to organization license
2023-10-16 15:47:12 -05:00
eec2763e78 Automate Lock File Generation (#3345) 2023-10-16 16:33:29 +02:00
b772784af3 [SM-896] restricting access to disabled orgs (#3287)
* restricting access to disabled orgs

* Unit Test Updates

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

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

* Covering all test cases

* making organization enabled NOT default

---------

Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2023-10-16 14:29:02 +00:00
abb23dac61 Finish changing to property 2023-10-16 17:07:13 +10:00
fc68bf2f0f Change FlexibleCollectionsIsEnabled method to property
Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
2023-10-16 16:56:27 +10:00
4ff41e9604 Add gitkeep files to preserve DbScript folders even if there's no sql scripts in them (#3341) 2023-10-13 15:05:27 +02:00
27314ac375 Add identity tests to test solution (#3342) 2023-10-13 14:15:11 +02:00
b2f4b66193 Merge branch 'feature/flexible-collections' into flexible-collections/add-feature-flags 2023-10-13 15:59:08 +10:00
6bc38ac3d1 Merge branch 'master' into feature/flexible-collections 2023-10-13 15:51:44 +10:00
f228dcd668 Rename DbScripts_future and DbScripts_data_migrations (#3192)
* Rename DbScripts_future and DbScripts_data_migrations

* Rename embeded folder name

* Remove new files from stale PR

---------

Co-authored-by: Michał Chęciński <mchecinski@bitwarden.com>
Co-authored-by: Michał Chęciński <michal.checinski@outlook.com>
2023-10-12 12:42:28 -06:00
53f5eee215 [AC-1638] Disallow Secrets Manager for MSP-managed organizations (#3297)
* Block MSPs from creating orgs with SM

* Block MSPs from adding SM to a managed org

* Prevent manually adding SM to an MSP-managed org

* Revert "Prevent manually adding SM to an MSP-managed org"

This change is no longer required

This reverts commit 51b086243b.

* Block provider from adding org with SM

* Update error message when adding existing org with SM to provider

* Update check to match client

* Revert "Update check to match client"

This reverts commit f195c1c1f6.
2023-10-12 15:56:50 +01:00
79648b311e [PM-3555] Remove ClearTracker() (#3213)
* Remove ClearTracker

* Remove from CipherRepositoryTests
2023-10-12 11:15:02 +02:00
01518de737 Use fixture instead of calling nsubstitute directly 2023-10-12 14:31:08 +10:00
5bdeb7fbd2 Set feature flag to ON for auth handler tests 2023-10-12 12:15:11 +10:00
a87236a520 Fix formatting 2023-10-12 12:12:14 +10:00
b2af73f00f [PM-212] Sync Organization Billing Email from Stripe Webhook (#3305)
* Add StripeFacade and StripeEventService

* Add StripeEventServiceTests

* Handle customer.updated event in StripeController
2023-10-11 15:57:51 -04:00
98b60cf817 Remove unused method 2023-10-11 14:49:46 +10:00
60ea32bb1d Add FeatureServiceFixtures to set feature flags in test 2023-10-11 14:49:26 +10:00
ea4b282c6b Restore legacy tests 2023-10-10 14:26:44 +10:00
05192a9a8d Add EnableFeatureFlag extension method for tests 2023-10-10 14:15:43 +10:00
d9b0f01b72 Fix tests 2023-10-09 14:44:18 +10:00
343ab2d8a9 Fix logic, add comment 2023-10-09 14:29:48 +10:00
1dad2af7c3 Add missing flags 2023-10-09 14:15:33 +10:00
8ebac62dff Restore old logic behind flags 2023-10-09 13:55:14 +10:00