mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01:00
Fix Stripe object lock timeouts (#1735)
* Fix Stripe object lock timeouts * Move stripe config into globalSetting.stripe * add MaxNetworkRetries config option with smart defaults * Rename stripeApiKey to apiKey
This commit is contained in:
parent
8dffb27667
commit
90a2a55438
@ -36,7 +36,8 @@ namespace Bit.Sso
|
||||
var globalSettings = services.AddGlobalSettingsServices(Configuration);
|
||||
|
||||
// Stripe Billing
|
||||
StripeConfiguration.ApiKey = globalSettings.StripeApiKey;
|
||||
StripeConfiguration.ApiKey = globalSettings.Stripe.ApiKey;
|
||||
StripeConfiguration.MaxNetworkRetries = globalSettings.Stripe.MaxNetworkRetries;
|
||||
|
||||
// Data Protection
|
||||
services.AddCustomDataProtectionServices(Environment, globalSettings);
|
||||
|
@ -3,7 +3,9 @@
|
||||
"selfHosted": false,
|
||||
"siteName": "Bitwarden",
|
||||
"projectName": "SSO",
|
||||
"stripeApiKey": "SECRET",
|
||||
"stripe": {
|
||||
"apiKey": "SECRET"
|
||||
},
|
||||
"oidcIdentityClientKey": "SECRET",
|
||||
"sqlServer": {
|
||||
"connectionString": "SECRET"
|
||||
|
@ -44,7 +44,8 @@ namespace Bit.Admin
|
||||
services.AddCustomDataProtectionServices(Environment, globalSettings);
|
||||
|
||||
// Stripe Billing
|
||||
StripeConfiguration.ApiKey = globalSettings.StripeApiKey;
|
||||
StripeConfiguration.ApiKey = globalSettings.Stripe.ApiKey;
|
||||
StripeConfiguration.MaxNetworkRetries = globalSettings.Stripe.MaxNetworkRetries;
|
||||
|
||||
// Repositories
|
||||
services.AddSqlServerRepositories(globalSettings);
|
||||
|
@ -3,7 +3,9 @@
|
||||
"selfHosted": false,
|
||||
"siteName": "Bitwarden",
|
||||
"projectName": "Admin",
|
||||
"stripeApiKey": "SECRET",
|
||||
"stripe": {
|
||||
"apiKey": "SECRET"
|
||||
},
|
||||
"sqlServer": {
|
||||
"connectionString": "SECRET"
|
||||
},
|
||||
|
@ -61,7 +61,8 @@ namespace Bit.Api
|
||||
}
|
||||
|
||||
// Stripe Billing
|
||||
StripeConfiguration.ApiKey = globalSettings.StripeApiKey;
|
||||
StripeConfiguration.ApiKey = globalSettings.Stripe.ApiKey;
|
||||
StripeConfiguration.MaxNetworkRetries = globalSettings.Stripe.MaxNetworkRetries;
|
||||
|
||||
// Repositories
|
||||
services.AddSqlServerRepositories(globalSettings);
|
||||
|
@ -3,7 +3,9 @@
|
||||
"selfHosted": false,
|
||||
"siteName": "Bitwarden",
|
||||
"projectName": "Api",
|
||||
"stripeApiKey": "SECRET",
|
||||
"stripe": {
|
||||
"apiKey": "SECRET"
|
||||
},
|
||||
"sqlServer": {
|
||||
"connectionString": "SECRET"
|
||||
},
|
||||
|
@ -35,7 +35,8 @@ namespace Bit.Billing
|
||||
services.Configure<BillingSettings>(Configuration.GetSection("BillingSettings"));
|
||||
|
||||
// Stripe Billing
|
||||
StripeConfiguration.ApiKey = globalSettings.StripeApiKey;
|
||||
StripeConfiguration.ApiKey = globalSettings.Stripe.ApiKey;
|
||||
StripeConfiguration.MaxNetworkRetries = globalSettings.Stripe.MaxNetworkRetries;
|
||||
|
||||
// Repositories
|
||||
services.AddSqlServerRepositories(globalSettings);
|
||||
|
@ -3,7 +3,9 @@
|
||||
"selfHosted": false,
|
||||
"siteName": "Bitwarden",
|
||||
"projectName": "Billing",
|
||||
"stripeApiKey": "SECRET",
|
||||
"stripe": {
|
||||
"apiKey": "SECRET"
|
||||
},
|
||||
"sqlServer": {
|
||||
"connectionString": "SECRET"
|
||||
},
|
||||
|
@ -18,7 +18,6 @@ namespace Bit.Core.Settings
|
||||
public bool SelfHosted { get; set; }
|
||||
public virtual string KnownProxies { get; set; }
|
||||
public virtual string SiteName { get; set; }
|
||||
public virtual string StripeApiKey { get; set; }
|
||||
public virtual string ProjectName { get; set; }
|
||||
public virtual string LogDirectory
|
||||
{
|
||||
@ -68,6 +67,7 @@ namespace Bit.Core.Settings
|
||||
public virtual ServiceBusSettings ServiceBus { get; set; } = new ServiceBusSettings();
|
||||
public virtual AppleIapSettings AppleIap { get; set; } = new AppleIapSettings();
|
||||
public virtual SsoSettings Sso { get; set; } = new SsoSettings();
|
||||
public virtual StripeSettings Stripe { get; set; } = new StripeSettings();
|
||||
|
||||
public string BuildExternalUri(string explicitValue, string name)
|
||||
{
|
||||
@ -465,5 +465,11 @@ namespace Bit.Core.Settings
|
||||
public string HCaptchaSecretKey { get; set; }
|
||||
public string HCaptchaSiteKey { get; set; }
|
||||
}
|
||||
|
||||
public class StripeSettings
|
||||
{
|
||||
public string ApiKey { get; set; }
|
||||
public int MaxNetworkRetries { get; set; } = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,9 @@
|
||||
"selfHosted": false,
|
||||
"siteName": "Bitwarden",
|
||||
"projectName": "Identity",
|
||||
"stripeApiKey": "SECRET",
|
||||
"stripe": {
|
||||
"apiKey": "SECRET"
|
||||
},
|
||||
"oidcIdentityClientKey": "SECRET",
|
||||
"sqlServer": {
|
||||
"connectionString": "SECRET"
|
||||
|
Loading…
Reference in New Issue
Block a user