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

3889 Commits

Author SHA1 Message Date
Oscar Hinton
109d915d9e
Disable storage in tests (#2689) 2023-02-13 18:10:53 +01:00
Oscar Hinton
c24b086275
[SM-500] Upload sql diff for database validation (#2690) 2023-02-13 15:07:42 +01:00
Thomas Avery
35b832dbc9
[SM-485] Add access policy on project creation (#2678)
* Add bootstrap access policy on create

* Update project integration tests
2023-02-09 08:58:05 -06:00
Andreas Coroiu
04c4be8a15
[EC-489] chore: remove obsolete identifier field (#2635)
* [EC-489] chore: remove obsolete `identifier` field

* [EC-489] chore: remove identifier from org response model
2023-02-08 16:33:45 +01:00
Andreas Coroiu
e3fdb2636b
[EC-1055] [Tech Debt/Bug] Sql.sqlproj is missing sprocs (#2664)
* [EC-1055] fix: add missing sprocs to sqlproj

* [EC-1055] fix: remove duplicate sproc
2023-02-08 10:39:40 +01:00
Stepan Goremykin
d32cd79535
[PS-2425] Upgrade vulnerable packages (#2669)
* Upgrade vulnerable packages

* Added packages.lock.json files

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2023-02-07 17:44:40 -06:00
Thomas Avery
1ee14d93e6
[SM-473] Access Policies - Service Accounts (#2658)
* Add service account access policy endpoints

* Add unit & integration tests for new endpoints

* Fix formatting on response models

* Cleanup unit tests
2023-02-07 14:30:22 -06:00
Thomas Avery
cf669286ed
[SM-429] Add permission checks to access policy endpoints (#2628)
* Add permission checks to access policy endpoints

* Fix unit tests

* Add service account grant permission checks

* Add service account grant tests

* Add new endpoint unit tests

* Cleanup unit tests add integration tests

* User permission enum in create tests

* Swap to NotFoundException for access checks

* Add filter for potential grantees

* Add in AccessSecretsManager check and test it

* Add code review updates

* Code review updates

* Refactor potential grantees endpoint

* Code review updates
2023-02-06 11:26:06 -06:00
Brandon Maharaj
9110efa44e
fix: update to 10 (#2670) 2023-02-06 11:36:03 -05:00
Andreas Coroiu
113ee8a680
[EC-861] feat: Add external id to member api (#2594) 2023-02-06 15:54:44 +01:00
Andreas Coroiu
55cc022d9b
[EC-1003] feat: remove externalId from PUT/POST (#2589) 2023-02-06 10:27:40 +01:00
Kyle Spearrin
6514bdbb7e
add more CSPs to the default correction check (#2668)
* add more CSPs to the default correction check

* add Dec2020ContentSecurityPolicy
2023-02-03 16:04:03 -05:00
Kyle Spearrin
0e84678150
[PS-2416 and PS-2417] dont set CSP config value by default (#2667)
* dont set CSP config value by default

* space
2023-02-03 14:50:33 -05:00
Kyle Spearrin
7e74695afc
add timestamps to user table for security related events (#2660)
* add timestamps to user table for security related events

* ef migrations

* fix lint problems

* formatting

* add missing namespace back

* move `now` up some

* review fixes

* add missing view rebuild to migration script
2023-02-02 14:39:57 -05:00
Thomas Avery
0ce95ec147
[SM-465] Add access policy on service account creation (#2649)
* Add access policy on service account creation
2023-02-02 12:25:14 -06:00
Justin Baur
6390aaa011
Send in Guid instead of Cipher (#2662) 2023-02-02 12:12:41 -05:00
Michael Zimmermann
e019f0191d
fix bumping AccountRevisionDate when creating and updating ciphers (#2634)
When the user is not part of an organization,
`UserBumpAccountRevisionDateByCipherIdQuery` doesn't work. In that case
we have to use `UserBumpAccountRevisionDateAsync` instead.

This was already done by most parts of the code but a few more were
missing.

Fixes #2615
2023-02-02 09:33:35 -05:00
Thomas Avery
28a3d4ad92
Add EF migrations for SecretsManager flag (#2659)
* Add EF migrations for SecretsManager flag
2023-02-01 12:27:13 -06:00
Kyle Spearrin
522df6e91a
add wasm-unsafe-eval to CSP (#2656) 2023-01-31 16:21:06 -05:00
Thomas Rittson
285b2ae55b
Add explicit options to db migration script (#2637) 2023-01-31 13:41:11 -05:00
Oscar Hinton
cf25d55090
[SM-378] Enable SM on a user basis (#2590)
* Add support for giving individual users access to secrets manager
2023-01-31 18:38:53 +01:00
Kyle Spearrin
54353f8b6c
HeartbeatHostedService use cancel token (#2654) 2023-01-31 11:20:21 -05:00
Kyle Spearrin
8ba806667c
add custom dp services to more projects (#2653) 2023-01-31 11:20:05 -05:00
Kyle Spearrin
814ca7b30b
Fix HeartbeatHostedService logger (#2650) 2023-01-31 09:59:15 -05:00
Kyle Spearrin
62327137b0
create /var/lib/nginx/tmp (#2651) 2023-01-31 08:23:07 -05:00
Thomas Rittson
82908b1fb7
[EC-826] Merge license sync feature branch to master (#2587)
* [EC-634] Extract GenerateLicenseAsync to a query (#2373)

* [EC-637] Add license sync to server (#2453)

* [EC-1036] Show correct license sync date (#2626)

* Update method name per new pattern
2023-01-31 07:42:10 +10:00
Opeyemi
d0355fcd12
Add update for PROD ACR upload (#2643)
* Add update for PROD ACR upload

* Add update image tags

* add suggestions

* delete comment
2023-01-30 16:12:09 -05:00
Thomas Rittson
328bee40bc
Add Rider launch configurations (#2646) 2023-01-31 06:20:46 +10:00
Rui Tomé
28e6275063
[EC-1015] Fixed OrganizationService InviteUser unit tests to not depend on random Org seat number (#2607) 2023-01-30 10:54:44 +00:00
Oscar Hinton
9ea520e038
Move CI testing to Ubuntu (#2638)
Change the CI for testing job from Windows to Ubuntu
2023-01-30 11:07:20 +01:00
Kyle Spearrin
2646d9200c
apply trailing slash to attachments location (#2639) 2023-01-27 10:32:26 -05:00
Jared Snider
b412a01d2a
Defect/SG-992 ProviderOrgs Missing Plan Type & EC-591/SG-996 - Provider Org Autoscaling Email Invites Working (#2596)
* SG-992 - Provider receives free org prompt when trying to auto scale org seats because plan type was missing and defaulting to free. PlanType has now been added to provider orgs returned as part of the profile sync.

* SG-992 - Updated Stored proc name to match convention

* EC-591 / SG-996 - (1) Update ProviderUserRepo.GetManyDetailsByProviderAsync to accept optional ProviderUserStatusType (2) Update OrganizationService.cs autoscaling user logic to check if an org is a provider org and send owner emails to the confirmed provider users instead of the managed org owners. Prevents scenario where newly created, managed orgs would not have an owner yet, and ownerEmails would be null and the email service would explode.

* EC-591 / SG-996 - Remove comments

* EC-591 / SG-996 - ES lint fix.

* SG-996 - SQL files must have SQL extensions.

* SG-996 / EC-591 - Update alter sql to be actually backwards compatible

* SG-996 - Make Status actually optional and backwards compatible for ProviderUserUserDetails_ReadByProvider.sql

* SG-992 - Update migrations to meet standards - (1) use CREATE OR ALTER and (2) Update view metadata after change if necessary

* EC-591 / SG-996 - Update Stored Proc migration to use proper standards: (1) Remove unnecessary code and (2) Use CREATE OR ALTER instead of just ALTER

* SG-992 / EC-591 / SG-996 - Refactor separate migrations into single migrations file per PR feedback

* SG-992/SG-996 - Add SyncControllerTests.cs with basic test suite + specific test suite to ensure provider orgs have plan type mapped to output product type properly.

* Fix lint issues by removing unnecessary using statements

* SG-992 - Refresh of view metadata has to target the stored procs that reference the view -- not the view itself.
2023-01-26 11:51:26 -05:00
Thomas Rittson
6dfbd06e8f
[EC-1043] Fix syntax error in ReadKdfByEmail query (#2631) 2023-01-26 15:34:18 +10:00
Kyle Spearrin
7c55d56561
fix lint issues and sql csproj (#2627) 2023-01-25 12:44:32 -05:00
Jake Fink
64c15ed8cd
[EC-1032] if name is Empty, set to null before saving (#2619) 2023-01-25 11:07:33 -05:00
Bernd Schoolmann
cb1ba50ce2
[PS-2267] Add KdfMemory and KDFParallelism fields (#2583)
* Add KdfMemory and KDFParallelism fields

* Revise argon2 support

This pull request makes the new attribues for argon2, kdfMemory and
kdfParallelism optional. Furthermore it adds checks for the argon2
parametrs and improves the database migration script.

* Add validation for argon2 in RegisterRequestModel

* update validation messages

* update sql scripts

* register data protection with migration factories

* add ef migrations

* update kdf option validation

* adjust validation

* Centralize and Test KDF Validation

Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2023-01-25 07:56:54 -05:00
Oscar Hinton
59f5285c88
[SM-460] Isolate SecretsManager files (#2616)
Move SecretsManager files to directories called SecretsManager and add CodeOwners
2023-01-24 19:57:28 +01:00
Vince Grassia
4041d7f009
Remove old Digital Ocean Marketplace files (#2622) 2023-01-24 13:26:21 -05:00
Vince Grassia
fe2fda5776
Update README example commands for self-host scripts (#2620) 2023-01-24 13:05:36 -05:00
Matt Bishop
0e32cb944a
Upgrade Swagger (#2611) 2023-01-24 12:10:00 -05:00
Thomas Avery
aa9f859306
[SM-382] Service Account access policy checks (#2603)
The purpose of this PR is to add access policy checks to service account endpoints.
2023-01-24 09:50:04 -06:00
Oscar Hinton
bdea036c1f
[SM-454] Refresh OrganizationView (#2605) 2023-01-23 18:03:45 +01:00
Rui Tomé
68989442c8
[EC-427] Add provider types (MSP/Reseller) to Provider table (#2518)
* [EC-427] Add columns 'Type' and 'BillingPhone' to Provider table

* [EC-427] Provider table Type and BillingPhone MySql migrations

* [EC-427] Provider table Type and BillingPhone Postgres migrations

* [EC-427] Add mysql migration script

* [EC-427] Add mysql migration script

* [EC-427] Updated Provider sql script to include default column value

* [EC-427] Removed default value from Provider.Type column

* [EC-427] Changed migration script to include a default value constraint instead of updating the null type

* [EC-427] Updated Sql project Provider table script

* [EC-427] Changed migration script to use 'Create OR Alter' for views and sprocs

* [EC-427] Added default values for 'BillingPhone' and 'Type' fields on sprocs [dbo].[Provider_Create] and [dbo].[Provider_Update]

* [EC-427] Adjusting metadata in migration script

* [EC-427] Updated Provider sprocs SQL script files

* [EC-427] Fixed migration script

* [EC-427] Added sqlite migration

* [EC-427] Add missing Provider_Update sproc default value

* [EC-427] Added missing GO action to migration script

* [EC-428] Redirect to Edit after creating Provider

* Revert "[EC-428] Redirect to Edit after creating Provider"

This reverts commit 6347bca1ed.
2023-01-23 16:08:05 +00:00
Rui Tomé
c6c0f95ed7
[EC-741 Single Organization policy exception when an Invited status user is also in the Revoked status (#2568)
* [EC-741] Check that OrganizationUsers to be removed have a UserId

* [EC-741] Filtering Revoked users in query for users to remove from organization
2023-01-23 16:05:12 +00:00
Dane Powell
266d426c80
Quotes break adminSettings__admins (#2572) 2023-01-22 16:02:08 -05:00
Daniel James Smith
76ed711f89
Remove gravatar.com from CSP rules (#2526) 2023-01-21 02:12:56 +01:00
Brandon Maharaj
862ce01bf4
[SG-927] Pull the user's selected avatar color from the state store and display on Emergency Contacts page (#2582)
* work: backend changes

* fix: lets not mix up Grantor and Grantee

* work: update view
2023-01-20 13:11:16 -05:00
Jake Fink
7b4c9b0e59
[EC-943] remove deprecated permissions (#2578) 2023-01-20 11:36:17 -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
Oscar Hinton
5cd571df64
[SM-380] Access checks for listing projects (#2496)
* Add project access checks for listing
2023-01-20 16:33:11 +01:00