1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00
Commit Graph

2522 Commits

Author SHA1 Message Date
Oscar Hinton
1cad0268c0
[SM-142] Rename CommCore to Commercial.Core (#2158)
* Rename CommCore to Commercial.Core
2022-08-02 20:41:18 +02:00
Rui Tomé
038d5e7734
[EC-276] Admin with custom permission is unable to manage all collections (#2143)
* Updated CollectionService.GetOrganizationCollections to check if the user has permissions to view all collections

Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
2022-07-28 17:23:43 +01:00
Rui Tomé
169a4381dd
[EC-247] Add columns to provider portal clients table (#2136)
* Added migration script to alter ProviderOrganizationOrganizationDetailsView to add new columns UserCount, Seats and Plan

* Modified EF query ProviderOrganizationOrganizationDetailsReadByProviderIdQuery

* Modified model to output new view columns

* Updated view to count only active users

* Filtering the organization user count by only confirmed users
2022-07-28 09:31:03 +01:00
Addison Beck
d1db4d31cb
[fix] Address QA found defects for the Stripe Subscriptions admin tool (#2150)
* [fix] Clear the page on Stripe Subscription search change
[SG-404]

* [fix] Ensure page is null when selecting all Stripe Subscriptions for an action
[SG-404]

* [feat] Allow Stripe Subscriptions to be filtered by a test clock
[SG-404]
2022-07-26 13:59:41 -04:00
Chad Scharf
d1a2e58ce1
EC-261 - Update OrganizationLicense for SCIM (#2151) 2022-07-26 13:04:59 -04:00
Matt Gibson
c0f2255569
[PS-617] Fix null value detection on ssoToken parameter (#2085)
* Fix null value detection on ssoToken parameter

* Use TryGet

* Format

Co-authored-by: Justin Baur <admin@justinbaur.com>
2022-07-26 10:53:16 -04:00
Oscar Hinton
2979fde0f7
Remove unused qwerty helpers (#2149) 2022-07-26 13:27:09 +02:00
Rui Tomé
7dfb04298d
[EC-92] Add organization vault export to event logs (#2128)
* Added nullable OrganizationId to EventModel

* Added EventType Organization_ClientExportedVault

* Updated CollectController to save the event Organization_ClientExportedVault

* Added OrganizationExportResponseModel to encapsulate Organization Export data

* Added OrganizationExportController to have a single endpoint for Organization vault export

* Added method GetOrganizationCollections to ICollectionService to get collections for an organization

* Added GetOrganizationCiphers to ICipherService to get ciphers for an organization

* Updated controllers to use new methods in ICollectionService and ICipherService
2022-07-25 09:56:23 +01:00
Thomas Rittson
f6a18db582
[EC-338] Update SCIM code naming conventions (revoked/restore) (#2140)
* Keep old endpoints but mark as deprecated
* Do not change existing sproc naming
2022-07-25 10:47:44 +10:00
Robyn MacCallum
378b54524f
[SG 475] Fix error thrown when changing payment method (#2137)
* Add null check for sources

* Add expand to get customer sources
2022-07-21 12:55:57 -04:00
Thomas Rittson
ac183363bd
Set UseScim flag for new organizations (#2134) 2022-07-21 08:26:51 -04:00
Shane Melton
4e3d8172ff
Re-evaluate lock files to ensure they match project dependencies (#2132) 2022-07-20 09:10:08 -07:00
Thomas Rittson
4f145b3938
Update restore/revoke error message wording (#2126) 2022-07-20 11:42:06 +10:00
Thomas Rittson
28ca17109a
Configure EventsProcessor to use Azurite for local dev (#2120) 2022-07-20 09:26:21 +10:00
Shane Melton
7d40b38352
[PS-93] Distributed Ip rate limiting (#2060)
* Upgrade AspNetCoreRateLimiter and enable redis distributed cache for rate limiting.

- Upgrades AspNetCoreRateLimiter to 4.0.2, which required updating NewtonSoft.Json to 13.0.1.
- Replaces Microsoft.Extensions.Caching.Redis with Microsoft.Extensions.Caching.StackExchangeRedis as the original was deprecated and conflicted with the latest AspNetCoreRateLimiter
- Adds startup task to Program.cs for Api/Identity projects to support AspNetCoreRateLimiters breaking changes for seeding its stores.
- Adds a Redis connection string option to GlobalSettings

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Cleanup Redis distributed cache registration

- Add new AddDistributedCache service collection extension to add either a Memory or Redis distributed cache.
- Remove distributed cache registration from Identity service collection extension.
- Add IpRateLimitSeedStartupService.cs to run at application startup to seed the Ip rate limiting policies.

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Add caching configuration to SSO Startup.cs

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Add ProjectName as an instance name for Redis options

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Use distributed cache in CustomIpRateLimitMiddleware.cs

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Undo changes to Program.cs and launchSettings.json

* Move new service collection extensions to SharedWeb

* Upgrade Caching.StackExchangeRedis package to v6

* Cleanup and fix leftover merge conflicts

* Remove use of Newtonsoft.Json in distributed cache extensions

* Cleanup more formatting

* Fix formatting

* Fix startup issue caused by merge and fix integration test

Signed-off-by: Shane Melton <smelton@bitwarden.com>

* Linting fix

Signed-off-by: Shane Melton <smelton@bitwarden.com>
2022-07-19 11:58:32 -07:00
Thomas Avery
8c0996efec
[SM-82] Add HttpController Attribute to protect secrets manager controllers during development (#2117)
* Adding development only attribute for sm API

* dotnet format changes

* Swapping attribute name to SecretsManager
2022-07-18 09:05:26 -05:00
Jake Fink
be146a8f62
update OrgUserDetailsView to include PlanType and other sponsorship parameters previously removed (#2122) 2022-07-17 20:28:46 -04:00
Thomas Rittson
6628dc3336
[EC-315] Record user IP and device type for OrgUser and ProviderUser events (#2119) 2022-07-18 10:24:46 +10:00
Rui Tomé
6e19bfeb22
[EC-307] Fresh desk custom fields integration (#2114)
* Using correct ILogger on FreshdeskController

* Submitting custom fields to Freshdesk

* Set up FreshdeskController to use IHttpClientFactory

* Added unit test for FreshdeskController

* Moved ControllerCustomizeAttribute and ControllerCustomization to Common

* Modified FreshdeskController to use FreshdeskWebhookModel; Edited unit tests to use AutoFixture
2022-07-15 17:10:56 +01:00
Chad Scharf
19b8d8281a
[EC-261] SCIM (#2105)
* scim project stub

* some scim models and v2 controllers

* implement some v2 scim endpoints

* fix spacing

* api key auth

* EC-261 - SCIM Org API Key and connection type config

* EC-261 - Fix lint errors/formatting

* updates for okta implementation testing

* fix var ref

* updates from testing with Okta

* implement scim context via provider parsing

* support single and list of ids for add/remove groups

* log ops not handled

* touch up scim context

* group list filtering

* EC-261 - Additional SCIM provider types

* EC-265 - UseScim flag and license update

* EC-265 - SCIM provider type of default (0)

* EC-265 - Add Scim URL and update connection validation

* EC-265 - Model validation and cleanup for SCIM keys

* implement scim org connection

* EC-265 - Ensure ServiceUrl is not persisted to DB

* EC-265 - Exclude provider type from DB if not configured

* EC-261 - EF Migrations for SCIM

* add docker builds for scim

* EC-261 - Fix failing permissions tests

* EC-261 - Fix unit tests and pgsql migrations

* Formatting fixes from linter

* EC-265 - Remove service URL from scim config

* EC-265 - Fix unit tests, removed wayward validation

* EC-265 - Require self-hosted for billing sync org conn

* EC-265 - Fix formatting issues - whitespace

* EC-261 - PR feedback and cleanup

* scim constants rename

* no scim settings right now

* update project name

* delete package lock

* update appsettings configs for scim

* use default scim provider for context

Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
2022-07-14 15:58:48 -04:00
Addison Beck
c5852db6ed
[feat] Allow CS to perform bulk actions on Stripe subscriptions from the Admin portal (#2116)
* [feat] Allow CS to perform bulk actions on Stripe subscriptions from the Admin portal

* [fix] An unrelated lint error
2022-07-13 10:04:58 -04:00
Jake Fink
54cf3de11b
[EC-284] Prevent duplicate organization invites (#2113)
* prevent duplicate organization invites with test

* formatting
2022-07-13 09:21:28 -04:00
Federico Maccaroni
ddd3e47df5
Update GlobalSettings.cs (#2112) 2022-07-11 18:31:08 -03:00
Federico Maccaroni
5ba988ebd8
[EC-309] Change Device Verification default global setting value to false (#2106)
* EC-309 Change device verification default global setting value to false

* Update src/Core/Settings/GlobalSettings.cs

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2022-07-11 18:23:31 -03:00
Thomas Avery
b60357eee9
Fixing missed email template (#2099) 2022-07-11 12:45:55 -05:00
Brandon Maharaj
0a334cc928
[SG-199] Move MP hint to MP change form (#2080)
* chore: backend changes

* fixed: test

* fix: lint
2022-07-11 09:28:14 -04:00
Gbubemi Smith
e9a88b5505
made the get plans endpoint anonymous (#2107) 2022-07-08 17:40:36 +01:00
Federico Maccaroni
580987f0e5
EC-293 Fix device verification state when getting its settings (#2094) 2022-07-05 18:44:07 -03:00
Oscar Hinton
45a005d652
Fix failing tests (#2095) 2022-07-05 18:39:43 +02:00
Oscar Hinton
113627dcd5
Add Swagger generation for Identity (#2058) 2022-07-04 12:05:46 +02:00
Justin Baur
1a89056c61
Create new file when adding license file and updating (#2092) 2022-06-30 12:19:15 -04:00
Justin Baur
231eb84e69
Turn On ImplicitUsings (#2079)
* Turn on ImplicitUsings

* Fix formatting

* Run linter
2022-06-29 19:46:41 -04:00
Justin Baur
890e6bb48a
Add Seats to Org note (#2086) 2022-06-29 06:34:34 -04:00
Justin Baur
cc21a04801
Address Analyzer Warnings (#2078)
* Address potential errors

* Add tests

* Add clarity

* Run formatting
2022-06-28 12:17:14 -04:00
Brandon Maharaj
9ff071e926
[SG-357] Update email text to reflect EUVR updates (#2073)
* fix: made text changes

* chore: html changes
2022-06-28 11:52:49 -04:00
Addison Beck
fe062dc987
[fix] Payment Failed webhook fix (#2076) 2022-06-24 17:20:32 -04:00
Addison Beck
75ab5826e0
[fix] Only cancel premium subscriptions after failed payments (#2075) 2022-06-24 15:17:58 -04:00
Justin Baur
daeaa42851
[PS-40] Upgrade to .NET 6 (#2056)
* Bump to .NET 6

* Update Docker images

* Update docs

* Update workflow for linter

* Add all common versions to props file

* Update tools manifest

* Update csproj files

* Update packages.lock.json files

* Switch to setup-dotnet

* Remove msbuild

* Fix deps breaking changes

* Manually install msbuild

* Use msbuild for build

* Fix verbosity switch

* Remove unused exceptions

* Address linter feedback

* Make Obsolete warnings suggestions for now.

* Force Evaluate

* Format on tests

* Run formatting again.

* Use windows 2022

* force evaluate

* Fix restore

* Fix linter

* Skip test

* Update Directory.Build.props

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>

* Address PR feedback

* Add IntegationTest for Rate limiter

* Fix test

* Reenable test

* Reorder test

* Skip test again

* Add tracking link

* Update .github/workflows/build.yml

Co-authored-by: Micaiah Martin <77340197+mimartin12@users.noreply.github.com>

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Micaiah Martin <77340197+mimartin12@users.noreply.github.com>
2022-06-24 10:39:34 -04:00
Thomas Avery
b8d41b47f1
[PS-794] Fix password reset email templates email format (#2068)
* Fix password reset email templates email format
2022-06-23 10:44:41 -05:00
Justin Baur
94059a2b06
Fix OrganizationConnection Update (#2071)
* Force CloudOrganizationId to be read only

* Fix tests
2022-06-23 07:50:10 -04:00
Matt Gibson
d918f5aae3
Check for ascii-only in entire local part of emails (#2072) 2022-06-22 17:51:16 -05:00
Robyn MacCallum
f2a02e040c
[SG-378] Get and send collectionIds when a cipher is updated (#2066)
* Get and send collectionIds when a cipher is updated

* Make Put method parameters Guids instead of strings
2022-06-21 08:25:54 -04:00
Thomas Avery
b19cded4f8
[PS-721] Left align all email template text (#2033)
Make all email template text left-aligned, excluding call-to-actions buttons which should remain centered

In the emails needing updates, remove font styling from HTML tags other than <td> and <p>

Add an additional margin above and below each call-to-action button

For emails that include only the “ignore” warning below the call-to-action button move the warning up, so the button is the last item displayed

Fix the unit test that allows developers to locally generate test emails
2022-06-20 09:20:28 -05:00
André Filipe da Silva Bispo
904193560c
[PS-293] Update admin portal to use the new version.json (#2006)
* PS-293: Get latest version no comes from GitHub instead of DockerHub.

* PS-293: format fixes

* PS-293: code refactor and clean up

* PS-293: deserialization to class, argument typification.

* PS-293: formating fix

* PS-293: Moved ProjectType to HomeController

* PS-293: updated version endpoint to CDN

* PS-293: Update endpoint to CF protected
2022-06-20 12:53:09 +01:00
Chad Scharf
ee5946c4b9
EC-262 - add missing validation on deactivate (#2064) 2022-06-17 11:04:25 -04:00
Thomas Rittson
3360d40592
[EC-243] Grant premium status when member accepts org invite (#2043) 2022-06-17 06:30:50 +10:00
Chad Scharf
b2a0aa2860
EC-262 - implement org user deactivated flag and behavior server (#2050)
* SM-47 - Add Disabled status to enum + schema

* SM-47 - Enable and disable sprocs and repositories

* SM-47 - Organization service enble/disable user

* SM-47 - Fix lint errors

* SM-47 - add disable/enable endpoints to API

* SM-47 - Add bulk operations for enable/disable

* SM-47 - Fix linting errors, one of these days I'll do this first

* SM-47 - Codesense fix DRY warnings

* EC-262 - Code review changes, async cleanup

* EC-262 - Fix build issues, async refs

* EC-262 - Update controller param types

* EC-262 - Ensure mutable state is correct

* EC-262 - rename disabled to deactivated
2022-06-16 15:59:57 -04:00
Gbubemi Smith
8e79c20dce
[SG-72] Sync changed email address with stripe (#2042)
* sync changed email address with strip

* sync changed email address with strip

* fixed formatting

* throw exception if not successful

* Added revert if stripe sync fails

* Added revert if stripe sync fails

* Added revert if stripe sync fails

* created stripe sync service

* fixed lint issue

* reverted to use stripe exception message

* added null checks to customer id and email address

* added braces

* removed empty email
2022-06-16 17:45:26 +01:00
Thomas Rittson
b39a43210d
[EC-235] Reapply permissions fix for Admin cipher endpoint (#2061)
* Reapply fix from PR 2036, accidentally clobbered by PR 2022
2022-06-15 12:47:36 +10:00
Robyn MacCallum
d626174f7e
Fix null collectionIds after live-syncing a cipher (#2057) 2022-06-13 13:50:44 -04:00