mirror of
https://github.com/bitwarden/server.git
synced 2025-03-16 14:13:10 +01:00
Add configuration support for QA cloud environment (#1572)
* Adding a QA environment specific configuration * separating the bitwarden environment and stripe environment checks * adding a logging statement for the PayPal webhook key check * adding more logging * switched logging type * Changing the log level on the PayPal webhook. Removing the debugging log from the Stripe Controller
This commit is contained in:
parent
0fc5c4de75
commit
d07a68e3cc
23
bitwarden_license/src/Portal/appsettings.QA.json
Normal file
23
bitwarden_license/src/Portal/appsettings.QA.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"globalSettings": {
|
||||
"baseServiceUri": {
|
||||
"vault": "https://vault.qa.bitwarden.pw",
|
||||
"api": "https://api.qa.bitwarden.pw",
|
||||
"identity": "https://identity.qa.bitwarden.pw",
|
||||
"admin": "https://admin.qa.bitwarden.pw",
|
||||
"notifications": "https://notifications.qa.bitwarden.pw",
|
||||
"sso": "https://sso.qa.bitwarden.pw",
|
||||
"portal": "http://portal.qa.bitwarden.pw",
|
||||
"internalNotifications": "https://notifications.qa.bitwarden.pw",
|
||||
"internalAdmin": "https://admin.qa.bitwarden.pw",
|
||||
"internalIdentity": "https://identity.qa.bitwarden.pw",
|
||||
"internalApi": "https://api.qa.bitwarden.pw",
|
||||
"internalVault": "https://vault.qa.bitwarden.pw",
|
||||
"internalSso": "https://sso.qa.bitwarden.pw",
|
||||
"internalPortal": "https://portal.qa.bitwarden.pw"
|
||||
},
|
||||
"braintree": {
|
||||
"production": false
|
||||
}
|
||||
}
|
||||
}
|
32
bitwarden_license/src/Sso/appsettings.QA.json
Normal file
32
bitwarden_license/src/Sso/appsettings.QA.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"globalSettings": {
|
||||
"baseServiceUri": {
|
||||
"vault": "https://vault.qa.bitwarden.pw",
|
||||
"api": "https://api.qa.bitwarden.pw",
|
||||
"identity": "https://identity.qa.bitwarden.pw",
|
||||
"admin": "https://admin.qa.bitwarden.pw",
|
||||
"notifications": "https://notifications.qa.bitwarden.pw",
|
||||
"sso": "https://sso.qa.bitwarden.pw",
|
||||
"portal": "http://portal.qa.bitwarden.pw",
|
||||
"internalNotifications": "https://notifications.qa.bitwarden.pw",
|
||||
"internalAdmin": "https://admin.qa.bitwarden.pw",
|
||||
"internalIdentity": "https://identity.qa.bitwarden.pw",
|
||||
"internalApi": "https://api.qa.bitwarden.pw",
|
||||
"internalVault": "https://vault.qa.bitwarden.pw",
|
||||
"internalSso": "https://sso.qa.bitwarden.pw",
|
||||
"internalPortal": "https://portal.qa.bitwarden.pw"
|
||||
},
|
||||
"braintree": {
|
||||
"production": false
|
||||
},
|
||||
"sso": {
|
||||
"saml": {
|
||||
"NameIdFormat": "Unspecified",
|
||||
"WantAssertionsSigned": true,
|
||||
"OutboundSigningAlgorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",
|
||||
"SigningBehavior": "IfIdpWantAuthnRequestsSigned",
|
||||
"ValidateCertificates": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
40
src/Admin/appsettings.QA.json
Normal file
40
src/Admin/appsettings.QA.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"globalSettings": {
|
||||
"baseServiceUri": {
|
||||
"vault": "https://vault.qa.bitwarden.pw",
|
||||
"api": "https://api.qa.bitwarden.pw",
|
||||
"identity": "https://identity.qa.bitwarden.pw",
|
||||
"admin": "https://admin.qa.bitwarden.pw",
|
||||
"notifications": "https://notifications.qa.bitwarden.pw",
|
||||
"sso": "https://sso.qa.bitwarden.pw",
|
||||
"portal": "http://portal.qa.bitwarden.pw",
|
||||
"internalNotifications": "https://notifications.qa.bitwarden.pw",
|
||||
"internalAdmin": "https://admin.qa.bitwarden.pw",
|
||||
"internalIdentity": "https://identity.qa.bitwarden.pw",
|
||||
"internalApi": "https://api.qa.bitwarden.pw",
|
||||
"internalVault": "https://vault.qa.bitwarden.pw",
|
||||
"internalSso": "https://sso.qa.bitwarden.pw",
|
||||
"internalPortal": "https://portal.qa.bitwarden.pw"
|
||||
},
|
||||
"braintree": {
|
||||
"production": false
|
||||
}
|
||||
},
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
},
|
||||
"Console": {
|
||||
"IncludeScopes": true,
|
||||
"LogLevel": {
|
||||
"Default": "Warning",
|
||||
"System": "Warning",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -136,7 +136,7 @@ namespace Bit.Api
|
||||
config.Conventions.Add(new PublicApiControllersModelConvention());
|
||||
}).AddNewtonsoftJson(options =>
|
||||
{
|
||||
if (Environment.IsProduction() && Configuration["swaggerGen"] != "true")
|
||||
if ((Environment.IsProduction() || Environment.IsEnvironment("QA")) && Configuration["swaggerGen"] != "true")
|
||||
{
|
||||
options.SerializerSettings.ContractResolver = new DefaultContractResolver();
|
||||
}
|
||||
|
43
src/Api/appsettings.QA.json
Normal file
43
src/Api/appsettings.QA.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"globalSettings": {
|
||||
"baseServiceUri": {
|
||||
"vault": "https://vault.qa.bitwarden.pw",
|
||||
"api": "https://api.qa.bitwarden.pw",
|
||||
"identity": "https://identity.qa.bitwarden.pw",
|
||||
"admin": "https://admin.qa.bitwarden.pw",
|
||||
"notifications": "https://notifications.qa.bitwarden.pw",
|
||||
"sso": "https://sso.qa.bitwarden.pw",
|
||||
"portal": "http://portal.qa.bitwarden.pw",
|
||||
"internalNotifications": "https://notifications.qa.bitwarden.pw",
|
||||
"internalAdmin": "https://admin.qa.bitwarden.pw",
|
||||
"internalIdentity": "https://identity.qa.bitwarden.pw",
|
||||
"internalApi": "https://api.qa.bitwarden.pw",
|
||||
"internalVault": "https://vault.qa.bitwarden.pw",
|
||||
"internalSso": "https://sso.qa.bitwarden.pw",
|
||||
"internalPortal": "https://portal.qa.bitwarden.pw"
|
||||
},
|
||||
"braintree": {
|
||||
"production": false
|
||||
},
|
||||
"bitPay": {
|
||||
"production": false
|
||||
}
|
||||
},
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
},
|
||||
"Console": {
|
||||
"IncludeScopes": true,
|
||||
"LogLevel": {
|
||||
"Default": "Warning",
|
||||
"System": "Warning",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -48,6 +48,7 @@ namespace Bit.Billing.Controllers
|
||||
[HttpPost("ipn")]
|
||||
public async Task<IActionResult> PostIpn()
|
||||
{
|
||||
_logger.LogDebug("PayPal webhook has been hit.");
|
||||
if (HttpContext?.Request?.Query == null)
|
||||
{
|
||||
return new BadRequestResult();
|
||||
@ -57,6 +58,7 @@ namespace Bit.Billing.Controllers
|
||||
HttpContext.Request.Query["key"].ToString() : null;
|
||||
if (key != _billingSettings.PayPal.WebhookKey)
|
||||
{
|
||||
_logger.LogWarning("PayPal webhook key is incorrect or does not exist.");
|
||||
return new BadRequestResult();
|
||||
}
|
||||
|
||||
|
49
src/Billing/appsettings.QA.json
Normal file
49
src/Billing/appsettings.QA.json
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
"globalSettings": {
|
||||
"baseServiceUri": {
|
||||
"vault": "https://vault.qa.bitwarden.pw",
|
||||
"api": "https://api.qa.bitwarden.pw",
|
||||
"identity": "https://identity.qa.bitwarden.pw",
|
||||
"admin": "https://admin.qa.bitwarden.pw",
|
||||
"notifications": "https://notifications.qa.bitwarden.pw",
|
||||
"sso": "https://sso.qa.bitwarden.pw",
|
||||
"portal": "http://portal.qa.bitwarden.pw",
|
||||
"internalNotifications": "https://notifications.qa.bitwarden.pw",
|
||||
"internalAdmin": "https://admin.qa.bitwarden.pw",
|
||||
"internalIdentity": "https://identity.qa.bitwarden.pw",
|
||||
"internalApi": "https://api.qa.bitwarden.pw",
|
||||
"internalVault": "https://vault.qa.bitwarden.pw",
|
||||
"internalSso": "https://sso.qa.bitwarden.pw",
|
||||
"internalPortal": "https://portal.qa.bitwarden.pw"
|
||||
},
|
||||
"braintree": {
|
||||
"production": false
|
||||
},
|
||||
"bitPay": {
|
||||
"production": false
|
||||
}
|
||||
},
|
||||
"billingSettings": {
|
||||
"payPal": {
|
||||
"production": false,
|
||||
"businessId": "AD3LAUZSNVPJY"
|
||||
}
|
||||
},
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
},
|
||||
"Console": {
|
||||
"IncludeScopes": true,
|
||||
"LogLevel": {
|
||||
"Default": "Warning",
|
||||
"System": "Warning",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -43,8 +43,8 @@ namespace Bit.Core.Services
|
||||
return null;
|
||||
}
|
||||
var validEnvironment = _globalSettings.AppleIap.AppInReview ||
|
||||
(!_hostingEnvironment.IsProduction() && receiptStatus.Environment == "Sandbox") ||
|
||||
(_hostingEnvironment.IsProduction() && receiptStatus.Environment != "Sandbox");
|
||||
(!(_hostingEnvironment.IsProduction() || _hostingEnvironment.IsEnvironment("QA")) && receiptStatus.Environment == "Sandbox") ||
|
||||
((_hostingEnvironment.IsProduction() || _hostingEnvironment.IsEnvironment("QA")) && receiptStatus.Environment != "Sandbox");
|
||||
var validProductBundle = receiptStatus.Receipt.BundleId == "com.bitwarden.desktop" ||
|
||||
receiptStatus.Receipt.BundleId == "com.8bit.bitwarden";
|
||||
var validProduct = receiptStatus.LatestReceiptInfo.LastOrDefault()?.ProductId == "premium_annually";
|
||||
|
37
src/Events/appsettings.QA.json
Normal file
37
src/Events/appsettings.QA.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"globalSettings": {
|
||||
"baseServiceUri": {
|
||||
"vault": "https://vault.qa.bitwarden.pw",
|
||||
"api": "https://api.qa.bitwarden.pw",
|
||||
"identity": "https://identity.qa.bitwarden.pw",
|
||||
"admin": "https://admin.qa.bitwarden.pw",
|
||||
"notifications": "https://notifications.qa.bitwarden.pw",
|
||||
"sso": "https://sso.qa.bitwarden.pw",
|
||||
"portal": "http://portal.qa.bitwarden.pw",
|
||||
"internalNotifications": "https://notifications.qa.bitwarden.pw",
|
||||
"internalAdmin": "https://admin.qa.bitwarden.pw",
|
||||
"internalIdentity": "https://identity.qa.bitwarden.pw",
|
||||
"internalApi": "https://api.qa.bitwarden.pw",
|
||||
"internalVault": "https://vault.qa.bitwarden.pw",
|
||||
"internalSso": "https://sso.qa.bitwarden.pw",
|
||||
"internalPortal": "https://portal.qa.bitwarden.pw"
|
||||
}
|
||||
},
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
},
|
||||
"Console": {
|
||||
"IncludeScopes": true,
|
||||
"LogLevel": {
|
||||
"Default": "Warning",
|
||||
"System": "Warning",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
19
src/EventsProcessor/appsettings.QA.json
Normal file
19
src/EventsProcessor/appsettings.QA.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
},
|
||||
"Console": {
|
||||
"IncludeScopes": true,
|
||||
"LogLevel": {
|
||||
"Default": "Warning",
|
||||
"System": "Warning",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
19
src/Icons/appsettings.QA.json
Normal file
19
src/Icons/appsettings.QA.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
},
|
||||
"Console": {
|
||||
"IncludeScopes": true,
|
||||
"LogLevel": {
|
||||
"Default": "Warning",
|
||||
"System": "Warning",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
40
src/Identity/appsettings.QA.json
Normal file
40
src/Identity/appsettings.QA.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"globalSettings": {
|
||||
"baseServiceUri": {
|
||||
"vault": "https://vault.qa.bitwarden.pw",
|
||||
"api": "https://api.qa.bitwarden.pw",
|
||||
"identity": "https://identity.qa.bitwarden.pw",
|
||||
"admin": "https://admin.qa.bitwarden.pw",
|
||||
"notifications": "https://notifications.qa.bitwarden.pw",
|
||||
"sso": "https://sso.qa.bitwarden.pw",
|
||||
"portal": "http://portal.qa.bitwarden.pw",
|
||||
"internalNotifications": "https://notifications.qa.bitwarden.pw",
|
||||
"internalAdmin": "https://admin.qa.bitwarden.pw",
|
||||
"internalIdentity": "https://identity.qa.bitwarden.pw",
|
||||
"internalApi": "https://api.qa.bitwarden.pw",
|
||||
"internalVault": "https://vault.qa.bitwarden.pw",
|
||||
"internalSso": "https://sso.qa.bitwarden.pw",
|
||||
"internalPortal": "https://portal.qa.bitwarden.pw"
|
||||
},
|
||||
"braintree": {
|
||||
"production": false
|
||||
}
|
||||
},
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
},
|
||||
"Console": {
|
||||
"IncludeScopes": true,
|
||||
"LogLevel": {
|
||||
"Default": "Warning",
|
||||
"System": "Warning",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
37
src/Notifications/appsettings.QA.json
Normal file
37
src/Notifications/appsettings.QA.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"globalSettings": {
|
||||
"baseServiceUri": {
|
||||
"vault": "https://vault.qa.bitwarden.pw",
|
||||
"api": "https://api.qa.bitwarden.pw",
|
||||
"identity": "https://identity.qa.bitwarden.pw",
|
||||
"admin": "https://admin.qa.bitwarden.pw",
|
||||
"notifications": "https://notifications.qa.bitwarden.pw",
|
||||
"sso": "https://sso.qa.bitwarden.pw",
|
||||
"portal": "http://portal.qa.bitwarden.pw",
|
||||
"internalNotifications": "https://notifications.qa.bitwarden.pw",
|
||||
"internalAdmin": "https://admin.qa.bitwarden.pw",
|
||||
"internalIdentity": "https://identity.qa.bitwarden.pw",
|
||||
"internalApi": "https://api.qa.bitwarden.pw",
|
||||
"internalVault": "https://vault.qa.bitwarden.pw",
|
||||
"internalSso": "https://sso.qa.bitwarden.pw",
|
||||
"internalPortal": "https://portal.qa.bitwarden.pw"
|
||||
}
|
||||
},
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
},
|
||||
"Console": {
|
||||
"IncludeScopes": true,
|
||||
"LogLevel": {
|
||||
"Default": "Warning",
|
||||
"System": "Warning",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user