1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00
Commit Graph

4232 Commits

Author SHA1 Message Date
github-actions[bot]
1800e6ffd3
Bumped version to 2023.10.0 (#3396)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-10-31 09:32:34 -04:00
Vince Grassia
96decdb9ba
Add Directory.Build.props to CODEOWNERS (#3395) 2023-10-31 09:27:37 -04:00
Vince Grassia
bf815484ed
Update CODEOWNERS for packages.lock.json (#3393) 2023-10-31 09:19:43 -04:00
Thomas Rittson
15268db4be
Add Billing folders to code ownership (#3390) 2023-10-31 08:13:53 -04:00
Conner Turnbull
1af105a9e2
[BEEEP] Update development and QA dashboard URLs for payment gateways (#3291)
* Update development and QA dashboard URLs for payment gateways

* Refactor gateway URL creation to utility method

---------

Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
2023-10-30 14:15:33 -04:00
Kyle Spearrin
44c559c723
Support for passkey registration (#2885)
* support for fido2 auth

* stub out registration implementations

* stub out assertion steps and token issuance

* verify token

* webauthn tokenable

* remove duplicate expiration set

* revert sqlproj changes

* update sqlproj target framework

* update new validator signature

* [PM-2014] Passkey registration (#2915)

* [PM-2014] chore: rename `IWebAuthnRespository` to `IWebAuthnCredentialRepository`

* [PM-2014] fix: add missing service registration

* [PM-2014] feat: add user verification when fetching options

* [PM-2014] feat: create migration script for mssql

* [PM-2014] chore: append to todo comment

* [PM-2014] feat: add support for creation token

* [PM-2014] feat: implement credential saving

* [PM-2014] chore: add resident key TODO comment

* [PM-2014] feat: implement passkey listing

* [PM-2014] feat: implement deletion without user verification

* [PM-2014] feat: add user verification to delete

* [PM-2014] feat: implement passkey limit

* [PM-2014] chore: clean up todo comments

* [PM-2014] fix: add missing sql scripts

Missed staging them when commiting

* [PM-2014] feat: include options response model in swagger docs

* [PM-2014] chore: move properties after ctor

* [PM-2014] feat: use `Guid` directly as input paramter

* [PM-2014] feat: use nullable guid in token

* [PM-2014] chore: add new-line

* [PM-2014] feat: add support for feature flag

* [PM-2014] feat: start adding controller tests

* [PM-2014] feat: add user verification test

* [PM-2014] feat: add controller tests for token interaction

* [PM-2014] feat: add tokenable tests

* [PM-2014] chore: clean up commented premium check

* [PM-2014] feat: add user service test for credential limit

* [PM-2014] fix: run `dotnet format`

* [PM-2014] chore: remove trailing comma

* [PM-2014] chore: add `Async` suffix

* [PM-2014] chore: move delay to constant

* [PM-2014] chore: change `default` to `null`

* [PM-2014] chore: remove autogenerated weirdness

* [PM-2014] fix: lint

* Added check for PasswordlessLogin feature flag on new controller and methods. (#3284)

* Added check for PasswordlessLogin feature flag on new controller and methods.

* fix: build error from missing constructor argument

---------

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

* [PM-4171] Update DB to support PRF (#3321)

* [PM-4171] feat: update database to support PRF

* [PM-4171] feat: rename `DescriptorId` to `CredentialId`

* [PM-4171] feat: add PRF felds to domain object

* [PM-4171] feat: add `SupportsPrf` column

* [PM-4171] fix: add missing comma

* [PM-4171] fix: add comma

* [PM-3263] fix identity server tests for passkey registration (#3331)

* Added WebAuthnRepo to EF DI

* updated config to match current grant types

* Remove ExtensionGrantValidator (#3363)

* Linting

---------

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com>
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
Co-authored-by: Todd Martin <tmartin@bitwarden.com>
2023-10-30 09:40:06 -04:00
Oscar Hinton
330e41a6d9
[PM-4589] Fix 2023-09-11_01_2023-02-FutureMigration (#3373) 2023-10-30 11:33:06 +01:00
Thomas Avery
1053f49fb1
[SM-943] [BEEEP] Swap to SQLite in-memory for integration tests (#3292)
* Swap to sqlite in-memory for integration tests

* Fix integration tests

* Remove EF Core in-memory dependency
2023-10-27 11:13:52 -05:00
Thomas Rittson
ad230fb6a5
[AC-1200] Admin Console code ownership - move OrganizationFeatures (#3369) 2023-10-26 16:47:44 -05:00
Thomas Rittson
26dd8b0e47
[AC-1284] AC Team code ownership moves - Provider (#3359) 2023-10-26 13:38:29 -04:00
Cesar Gonzalez
c8bcc32764
[PM-2855] Add Feature Flag to Enable Autofill Overlay (#3248) 2023-10-25 12:52:30 -05:00
Shane Melton
2701321659
[AC-1685] Add ViewAllCollections check to GetOrganizationCollectionsAsync method (#3323) 2023-10-24 11:30:08 -07:00
Alex Morask
9007aa6556
Fix broken test (#3374) 2023-10-24 08:44:37 -04:00
Alex Morask
c442bae2bc
[AC-1693] Send InvoiceUpcoming Notification to Client Owners (#3319)
* Add Organization_ReadOwnerEmailAddresses SPROC

* Add IOrganizationRepository.GetOwnerEmailAddressesById

* Add SendInvoiceUpcoming overload for multiple emails

* Update InvoiceUpcoming handler to send multiple emails

* Cy's feedback

* Updates from testing

Hardened against missing entity IDs in Stripe events in the StripeEventService. Updated ValidateCloudRegion to not use a refresh/expansion for the customer because the invoice.upcoming event does not have an invoice.Id. Updated the StripeController's handling of invoice.upcoming to not use a refresh/expansion for the subscription because the invoice does not have an ID.

* Fix broken test
2023-10-23 13:46:29 -04:00
Oscar Hinton
18b43130e8
[PM-4252] Change attachment Size to be represented as a string (#3335) 2023-10-23 16:56:04 +02:00
Alex Morask
19e2215376
Added percent off to discount, removed discount from user sub (#3326) 2023-10-23 15:02:02 +01:00
cyprain-okeke
d7c544a116
[AC 1536] Breakdown The SubscriptionUpdate.cs into multiple files (#3356)
* Move sub-subscription classes to a separate files

* Refactor the sub-class to a separate files

* format whitespace

* remove directive that is unnecessary

* Remove the baseSeat class
2023-10-23 11:28:13 +01:00
Thomas Avery
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
Thomas Rittson
c1cf07d764
[AC-1750] AC Team code ownership moves - Groups (#3358) 2023-10-20 06:37:46 +10:00
Joseph Flinn
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
renovate[bot]
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
cyprain-okeke
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
Thomas Rittson
37e9d70bee
AC Team code ownership moves - Api project (#3351) 2023-10-18 11:27:56 -04:00
Thomas Rittson
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
Andreas Coroiu
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
Michał Chęciński
f7349b4ff2
Enable MsSqlMigratorUtility Dockerfile to run with additional parameters (#3348) 2023-10-18 09:40:49 -04:00
Rui Tomé
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
Rui Tomé
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
Andreas Coroiu
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
cyprain-okeke
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
Matt Gibson
1c3bd4d252
bump minor sdk version (#3347) 2023-10-17 09:22:38 -04:00
Thomas Avery
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
Michał Chęciński
eec2763e78
Automate Lock File Generation (#3345) 2023-10-16 16:33:29 +02:00
cd-bitwarden
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
Michał Chęciński
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
Oscar Hinton
27314ac375
Add identity tests to test solution (#3342) 2023-10-13 14:15:11 +02:00
MtnBurrit0
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
Thomas Rittson
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
Justin Baur
79648b311e
[PM-3555] Remove ClearTracker() (#3213)
* Remove ClearTracker

* Remove from CipherRepositoryTests
2023-10-12 11:15:02 +02:00
Alex Morask
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
Daniel James Smith
3a71e7b081
Add tech-leads as default owners (#3330)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2023-10-06 18:28:02 +02:00
renovate[bot]
4dcd467a5f
Update crazy-max/ghaction-import-gpg action to v6 (#3315)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-05 14:59:23 -04:00
renovate[bot]
8c3ca2f1fa
Update bitwarden/gh-actions digest to f112580 (#3314)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-05 14:58:13 -04:00
Conner Turnbull
cc68d84301
Added billing patterns to codeowners (#3322) 2023-10-04 12:05:44 -04:00
Todd Martin
9af9d121bf
Updated client minimum version to reflect previous hotfixes. (#3311) 2023-09-29 15:44:54 -04:00
Alex Morask
46117b194e
Return discount info in Subscription responses [AC-1657] (#3278)
* Return whether customer has Stripe discount applied from /api/accounts/subscription

* Return whether customer has Stripe discount applied from /api/organizations/{id}/subscription
2023-09-29 12:29:43 -04:00
github-actions[bot]
12b03482ae
Bumped version to 2023.9.1 (#3309)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-09-29 15:40:07 +00:00
Michał Chęciński
3e90f57797
[DEVOPS-1519] Add transition mode to mssql migrator utility (#3259)
* Add RerunableSqlTableJournal

* Add extension to use rerunable sql table journal

* Use rerunable sql journal

* format

* Enable logging

* FIx

* Disable logging

* Rename to SqlTableJournalExtensions

* Move RerunableSqlTableJournal to Extension class

* Fix usings

* Add rerunable schema

* Format

* Fix typo

* Enable logging in db migrator

* add rerunable column in dbo migrations table migration

* Trying

* Fix journal table name

* Trying to migrate first

* After migration

* Testing

* Add update from rerunable to not rerunable script

* Change name

* Add rerunable option and script folder name

* Add rerunable options and folder

* Fix

* Add transition (aka rerunable) migrations to Setup

* Parse parameters on migrator utility

* Fix sql scripts

* Remove CreateSchemaTableSql as it'll be migrated using migration

* Embed dbScripts_data_migration folder

* Remove testing sql script

* Add optins parsing nuget for msSqlMigratorUtility

* Fix sql journal

* Ran dotnet format

* Comment out index

* ▫️Revert "Comment out index"

This reverts commit df15fa91e0.

* Disable logging

* Add newline

* Rename rerunable to repeatable

* remove repeatable journal

* Remove migration adding the repeatable column in  dbo.Migrations table

* Add using

* Enable log for testing

* Disable logging in the setup

* Remove unused method

* Add migrator constants

* Use constants in yet another place

* Fix

* Add constant

* Fix

* Fix
2023-09-28 16:29:52 +02:00
Todd Martin
7ede956c32
Individual Vault Item Encryption Feature (#3256)
* [SG-966] [SG-967] Add new cipher properties, update DB objects and create migrations (#2681)

* Updated cipher entity with two new columns

* Added sqlserver mifgration and updated applicable stored procedures and table

* Added EF Migrations

* Made changes to response model to include new column properties

* Fixed formatting

* Modified scripts to reflect suggestions made on PR

* Added column to cipher table using default

* Include constraint in create cipher table script

* Added key and forcerotatekey property to request model (#2716)

* Added key update on the Cipher_UpdateWithCollection stored procedure, ef (#2855)

* Added key and forceKeyRotation to BuildCiphersTable method (#2893)

* [PM-2211] Remove forceKeyRotation column (#2921)

* Removed forceKeyRotation column

* Adjusted date for migrtaion file

* Passed key column to update cipher script to update cipher key when it is rotated (#2967)

* [PM-2448] Update CipherDetails_Update SP to update attachment column (#2992)

* Updated the cipherdetails_update stored procedure to update the attachement column when encrypted with the cipher key

* Moved migration and renamed old migration file

* Fixed lint issues

* Fixed lint issues

* renamed sqlserver migration to have a more recent date

* [PM-2548] Added validation to edit and add attachments methods (#3130)

* PM-2548 Added validation to edit and add attachments methods

* PM-2548 Moved the validation to a private method

* PM-2548 Minor refactor

* Bumped up minimum version

* Bumped up minimum version

* Changed version for tests purposes

* Bumped up minimum version

* Updated encryption minimum version to match clients for QA.

* PM-3976 Passed Key column to update cipher on bulk edit (#3299)

* Updated minimum client version in preparation for release.

* Renamed migration with current date. (#3303)

---------

Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
Co-authored-by: gbubemismith <gsmithwalter@gmail.com>
Co-authored-by: Carlos Gonçalves <cgoncalves@bitwarden.com>
Co-authored-by: Carlos Gonçalves <carlosmaccam@gmail.com>
2023-09-28 08:45:13 -04:00
renovate[bot]
464dac8f4d
Update bitwarden/gh-actions digest to fdcf1fc (#3230)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-26 10:30:28 -04:00