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

3999 Commits

Author SHA1 Message Date
cyprain-okeke
4fcb9da4d6 Remove unused constant 2023-07-24 17:13:58 +01:00
Thomas Rittson
c72d29b8b5 [AC-1521] Address checkmarx security feedback (#3124)
* Reinstate target attribute but add noopener noreferrer
2023-07-20 08:40:29 +10:00
cyprain-okeke
1087f66197 Resolved the checkmarx issues 2023-07-19 16:58:30 +01:00
Thomas Rittson
10f671a9a5 Merge branch 'master' into feature/sm-billing 2023-07-19 09:59:00 +10:00
Thomas Rittson
1b6898e188 [AC-1522] Fix service account check on upgrading (#3111) 2023-07-19 07:36:39 +10:00
Colton Hurst
1fe2f0fb57 SM-503: Add EmptySecretsManagerTrashJob (#2863)
* SM-503: Add EmptySecretsManagerJob

* SM-503: Fix date logic and refactor a few lines

* SM-503: Add logging

* SM-503: Move EmptySecretsManagerTrashJob to src/Api/SecretsManager/Jobs

* SM-503: Update trigger time for EmptySecretsManagerTrashJob

* SM-503: Switch to scope on one line

* SM-768: Update EFCore and related packages to >= 7.0

* SM-768: Update more packages for the EF 7 upgrade

* SM-768: Update the PostgreSQL package

* SM-768: Run dotnet restore --force-evaluate

* SM-768: Revert package upgrades for 3 projects

* SM-768: Update the dotnet-ef tool

* SM-503: Switch to using ExecuteDeleteAsync and fix param name

* SM-503: Rename trigger to smTrashCleanupTrigger

* SM-503: Fix OSS job issue

* SM-503: Only add trigger if not OSS for SM Trash Job
2023-07-18 15:32:47 -04:00
Shane Melton
a095e02e86 [AC-1435] Single Organization policy prerequisite for Account Recovery policy (#3082)
* [AC-1435] Automatically enable Single Org policy when selecting TDE

* [AC-1435] Add test for automatic policy enablement

* [AC-1435] Prevent disabling single org when account recovery is enabled

* [AC-1435] Require Single Org policy when enabling Account recovery

* [AC-1435] Add unit test to check for account recovery policy when attempting to disable single org

* [AC-1435] Add test to verify single org policy is enabled for account recovery policy

* [AC-1435] Fix failing test
2023-07-18 10:00:49 -05:00
Thomas Rittson
e3387c2e2b Add UsePasswordManager to sync data (#3114) 2023-07-18 18:53:11 +10:00
Shane Melton
fe570cb6c8 [AC-1487] Update queries to use [User] table instead of [OrganizationUser] for email address (#3083) 2023-07-17 13:00:32 -05:00
Conner Turnbull
a79a52395d Merge branch 'master' into feature/sm-billing 2023-07-14 14:04:14 -04:00
Daniel García
4f87e4e1a4 [PM-2196] Improvements to the Swagger generator (#2914)
* Swagger fixes

Co-Authored-By: Oscar Hinton <Hinton@users.noreply.github.com>

* Make Response Models return Guids instead of strings

* Change strings into guids in ScimApplicationFactory

---------

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2023-07-14 17:18:26 +02:00
Matt Bishop
966614c7e2 Add DevOps as workflow code owners (#3105) 2023-07-14 16:17:14 +02:00
renovate[bot]
3f3bd66a33 Update actions/stale action to v8 (#3061)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-14 10:11:26 -04:00
Thomas Rittson
99b598ae8e Merge branch 'master' into feature/sm-billing 2023-07-14 11:17:23 +10:00
mimartin12
22ae86fd0a Pin webapp deploy to v.2.2.9 (#3088) 2023-07-13 14:53:13 -07:00
Matt Bishop
0196f4a885 Solution and editor configuration cleanup (#3099)
* Solution and editor configuration cleanup

* Editor tweaks
2023-07-13 17:34:11 -04:00
Thomas Avery
1d9aeb37aa [SM-707] Refactor authorization for Access Policy Commands (#2905)
* Extract authorization from access policy commands

* Use auto mapper to ignore unwanted properties

---------
2023-07-13 11:46:01 -05:00
Thomas Rittson
a9dcc32515 Merge branch 'master' into feature/sm-billing 2023-07-13 10:56:59 +10:00
Thomas Rittson
aa5c2001e7 Move NoopServiceAccountRepository to SM and update namespace 2023-07-13 10:56:08 +10:00
Thomas Rittson
b14c383aa3 Revert ReferenceEventType change 2023-07-13 10:52:38 +10:00
Thomas Rittson
e1bede1108 Revert changes to ReferenceEvent code (#3091)
* Revert changes to ReferenceEvent code

This will be done in AC-1481
2023-07-13 09:27:54 +10:00
Thomas Avery
d6a45d4802 [SM-789] Extract authorization from service account delete command (#2999)
* Extract authorization from SA delete command

* swap to IEnumerable

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2023-07-12 15:32:40 -05:00
Thomas Rittson
38ff56917b Merge branch 'master' into feature/sm-billing 2023-07-12 10:22:08 +10:00
cyprain-okeke
0ec3020ecc [AC-1510] Enable access to Secrets Manager to Organization owner for new Subscription (#3089) 2023-07-12 09:36:30 +10:00
Thomas Avery
b629c31de9 [SM-787] Extract authorization from project delete command (#2987)
* Extract authorization from project delete command

* Support service account write access

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2023-07-11 15:15:18 -05:00
github-actions[bot]
4dea376aa3 Bumped version to 2023.7.0 (#3090)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-07-11 17:28:06 +00:00
Rui Tomé
3ea14a2205 [AC-1488] Changed SM Signup and Upgrade paths to set SmServiceAccounts to include the plan BaseServiceAccount (#3086) 2023-07-11 14:34:09 +01:00
Thomas Rittson
3a6b17bf19 [AC-1504] Allow SM max autoscale limits to be disabled (#3085) 2023-07-11 19:08:57 +10:00
Thomas Rittson
cab23cb109 [AC-1503] Fix Stripe integration on organization upgrade (#3084)
* Fix SM parameters not being passed to Stripe

* Fix flaky test

* Fix error message
2023-07-11 19:07:57 +10:00
Thomas Rittson
a5efec301e [AC-1495] Extract UpgradePlanAsync into a command (#3081)
* This is a pure lift & shift with no refactors

* Only register subscription commands in Api

---------

Co-authored-by: cyprain-okeke <cokeke@bitwarden.com>
2023-07-11 19:01:20 +10:00
Thomas Rittson
ce03d3859d Merge branch 'master' into feature/sm-billing 2023-07-10 18:52:15 +10:00
cyprain-okeke
a1f8ca85cb [AC 1410] Secrets Manager subscription adjustment back-end changes (#3036)
* Create UpgradeSecretsManagerSubscription command

---------

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2023-07-10 17:46:32 +10:00
Colton Hurst
a565b19ffb SM-768: Update EFCore and related packages to >= 7.0 (#3006)
* SM-768: Update EFCore and related packages to >= 7.0

* SM-768: Update more packages for the EF 7 upgrade

* SM-768: Update the PostgreSQL package

* SM-768: Run dotnet restore --force-evaluate

* SM-768: Revert package upgrades for 3 projects

* SM-768: Update the dotnet-ef tool
2023-07-07 09:56:31 -04:00
Vincent Salucci
3b4c8afea0 [AC-1191] TDE admin approval email (#3044)
* feat: add new command for updating request and emailing user, refs AC-1191

* feat: inject service with organization service collection extensions, refs AC-1191

* feat: add function to send admin approval email to mail services (interface/noop/handlebars), refs AC-1191

* feat: add html/text mail templates and add view model for email data, refs AC-1191

* feat: update org auth request controller to use new command during auth request update, refs AC-1191

* fix: dotnet format, refs AC-1191

* refactor: update user not found error, FirstOrDefault for enum type display name, refs AC-1191

* refactor: update user not found to log error instead of throws, refs AC-1191

* fix: remove whitespace lint errors, refs AC-1191

* refactor: update hardcoded UTC timezone string, refs AC-1191

* refactor: add unit test for new command, refs AC-1191

* refactor: improve enum name fallback and identifier string creation, refs AC-1191

* refactor: add addtional unit tests, refs AC-1191

* refactor: update success test to use more generated params, refs AC-1191

* fix: dotnet format...again, refs AC-1191

* refactor: make UTC display a constant for handlebars mail service, refs AC-1191

* refactor: update displayTypeIdentifer to displayTypeAndIdentifier for clarity, refs AC-1191
2023-07-06 10:03:49 -05:00
cyprain-okeke
692c7ff843 [AC 1460] Update Stripe Configuration (#3070)
* change the stripeseat id

* change service accountId to align with new product

* make all the Id name for consistent
2023-07-04 14:36:58 +01:00
Thomas Rittson
4a88894d7f Merge remote-tracking branch 'origin/master' into feature/sm-billing 2023-07-04 14:44:02 +10: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
Shane Melton
6c0c9c62ad [AC-1418] Add missing SecretsManagerPlan property to OrganizationResponseModel (#3055) 2023-07-03 15:51:51 -07:00
Rui Tomé
b151605c28 [PM-2594] Added new property "CloudRegion" to GlobalSettings and ConfigResponseModel to be able to override the cloud url value for selfhost instances (#3024)
* [PM-2594] Added new property "CloudVault" to GlobalSettings and ConfigResponseModel to be able to override this value for selfhost instances

* [PM-2594] Renamed EnvironmentConfigResponseModel.CloudVault to CloudWebVault

* [PM-2594] Added default value for globalSettings__baseServiceUri__cloudWebVault on EnvironmentFileBuilder

* [PM-2594] Erased CloudWebVault environment variable and added CloudVaultRegion

* [PM-2594] Changed var name on EnvironmentFileBuilder

* [PM-2594] Renamed the env. variable and also the output property to CloudRegion
2023-07-03 21:43:13 +01:00
renovate[bot]
4e089286e5 Update actions/setup-dotnet action to v3 (#2977)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-03 10:46:36 -06:00
renovate[bot]
69ee329af8 Update actions/upload-artifact digest to 0b7f8ab (#2971)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-03 10:40:49 -06:00
renovate[bot]
3689fb701d Update gh minor (#2974)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-03 10:36:42 -06:00
Matt Bishop
693f79c041 Add complexity to load tests via scenarios (#3034) 2023-07-03 10:30:05 -04:00
cyprain-okeke
46b22605d1 [AC 1409] Secrets Manager Subscription Stripe Integration (#3019)
* Adding the Secret manager to the Plan List

* Adding the unit test for the StaticStoreTests class

* Fix whitespace formatting

* Fix whitespace formatting

* Price update

* Resolving the PR comments

* Resolving PR comments

* Fixing the whitespace

* only password manager plans are return for now

* format whitespace

* Resolve the test issue

* Fixing the failing test

* Refactoring the Plan separation

* add a unit test for SingleOrDefault

* Fix the whitespace format

* Separate the PM and SM plans

* Fixing the whitespace

* Remove unnecessary directive

* Fix imports ordering

* Fix imports ordering

* Resolve imports ordering

* Fixing imports ordering

* Fix response model, add MaxProjects

* Fix filename

* Fix format

* Fix: seat price should match annual/monthly

* Fix service account annual pricing

* Changes for secret manager signup and upgradeplan

* Changes for secrets manager signup and upgrade

* refactoring the code

* Format whitespace

* remove unnecessary using directive

* Resolve the PR comment on Subscription creation

* Resolve PR comment

* Add password manager to the error message

* Add UseSecretsManager to the event log

* Resolve PR comment on plan validation

* Resolving pr comments for service account count

* Resolving pr comments for service account count

* Resolve the pr comments

* Remove the store procedure that is no-longer needed

* Rename a property properly

* Resolving the PR comment

* Resolve PR comments

* Resolving PR comments

* Resolving the Pr comments

* Resolving some PR comments

* Resolving the PR comments

* Resolving the build identity build

* Add additional Validation

* Resolve the Lint issues

* remove unnecessary using directive

* Remove the white spaces

* Adding unit test for the stripe payment

* Remove the incomplete test

* Fixing the failing test

* Fix the failing test

* Fix the fail test on organization service

* Fix the failing unit test

* Fix the whitespace format

* Fix the failing test

* Fix the whitespace format

* resolve pr comments

* Fix the lint message

* Resolve the PR comments

* resolve pr comments

* Resolve pr comments

* Resolve the pr comments

* remove unused code

* Added for sm validation test

* Fix the whitespace format issues

---------

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2023-07-01 12:25:15 +01:00
Justin Baur
b0214ae1be [PM-863] Fix Organization Folders in EF Databases (#2856)
* Fix Setting Organization Folders

* Fix Formatting

* Added ReplaceAsync Test

* Fix SQL Server Test

* Update Replace Call Also

* Be Case Insensitive With Guids

* Fix Assignment to Cipher
2023-06-30 18:41:11 -04:00
Justin Baur
49e849deb9 [PM-1198] Modify AuthRequest Purge Job (#3048)
* Add PasswordlessAuth Settings

* Update Repository Method to Take TimeSpan

* Update AuthRequest_DeleteIfExpired

- Take Configurable Expiration
- Add Special Cases for AdminApproval AuthRequests

* Add AuthRequestRepositoryTests

* Run Formatting

* Remove Comment

* Fix Bug in EF Repo

* Add Test Covering Expired Rejected AuthRequest

* Use Longer Param Names

* Use Longer Names in Test Helpers
2023-06-30 14:13:31 -04:00
cd-bitwarden
3f3f52399b [SM-716] Adding ability for service account to have write access (#3021)
* adding ability for service account to have write access

* Suggested changes

* fixing tests

* dotnet format changes

* Adding RunAsServiceAccountWIthPermission logic to ProjectAuthorizationhandlerTests

* Removing logic that prevents deleting and updating a secret. Adding Service Account logic to tests inside of secretAuthorizationhandlerTests.

* Removing Service Account from CanUpdateSecret_NotSupportedClientTypes_DoesNotSuceed because it is a supported client type now :)

* thomas sugested changes

* using Arg.Any<AccessClientType>() instead of default in tests

* merge conflict changes and code updates to remove service account tests that are  outdated

* fixing tests

* removing extra  spaces that lint hates
2023-06-30 17:17:41 +00:00
SmithThe4th
b87e6d4a38 [SG-497] Prevent registering health check on self hosted (#3058)
* Prevent registering health check on self hosted

* Fixed linting issues

* Allow endpoint only when it is not self-hosted

* Fixed linting issues
2023-06-30 12:57:13 -04:00
renovate[bot]
c2b429c6de Update bitwarden/gh-actions digest to 74f4ac0 (#2972)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-29 15:39:50 -06:00
Thomas Avery
74ab7e8672 [SM-771] Add new endpoint for bulk enabling users for Secrets Manager (#3020)
* Add new endpoint for bulk enabling users for sm

* Review updates
2023-06-29 12:42:44 -04:00