mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05:00
all not self-hosted gets cloud storage dp keys
This commit is contained in:
parent
698f918f73
commit
f396869aaf
@ -305,15 +305,6 @@ namespace Bit.Core.Utilities
|
|||||||
return JsonConvert.DeserializeObject<T>(JsonConvert.SerializeObject(obj));
|
return JsonConvert.DeserializeObject<T>(JsonConvert.SerializeObject(obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool FullFramework()
|
|
||||||
{
|
|
||||||
#if NET461
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool SettingHasValue(string setting)
|
public static bool SettingHasValue(string setting)
|
||||||
{
|
{
|
||||||
if(string.IsNullOrWhiteSpace(setting) || setting.Equals("SECRET") || setting.Equals("REPLACE"))
|
if(string.IsNullOrWhiteSpace(setting) || setting.Equals("SECRET") || setting.Equals("REPLACE"))
|
||||||
|
@ -16,9 +16,7 @@ using Microsoft.AspNetCore.Identity;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
#if NET461
|
|
||||||
using Microsoft.WindowsAzure.Storage;
|
using Microsoft.WindowsAzure.Storage;
|
||||||
#endif
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using SqlServerRepos = Bit.Core.Repositories.SqlServer;
|
using SqlServerRepos = Bit.Core.Repositories.SqlServer;
|
||||||
@ -238,7 +236,6 @@ namespace Bit.Core.Utilities
|
|||||||
.PersistKeysToFileSystem(new DirectoryInfo(globalSettings.DataProtection.Directory));
|
.PersistKeysToFileSystem(new DirectoryInfo(globalSettings.DataProtection.Directory));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NET461
|
|
||||||
if(!globalSettings.SelfHosted)
|
if(!globalSettings.SelfHosted)
|
||||||
{
|
{
|
||||||
var dataProtectionCert = CoreHelpers.GetCertificate(globalSettings.DataProtection.CertificateThumbprint);
|
var dataProtectionCert = CoreHelpers.GetCertificate(globalSettings.DataProtection.CertificateThumbprint);
|
||||||
@ -247,7 +244,6 @@ namespace Bit.Core.Utilities
|
|||||||
.PersistKeysToAzureBlobStorage(storageAccount, "aspnet-dataprotection/keys.xml")
|
.PersistKeysToAzureBlobStorage(storageAccount, "aspnet-dataprotection/keys.xml")
|
||||||
.ProtectKeysWithCertificate(dataProtectionCert);
|
.ProtectKeysWithCertificate(dataProtectionCert);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GlobalSettings AddGlobalSettingsServices(this IServiceCollection services,
|
public static GlobalSettings AddGlobalSettingsServices(this IServiceCollection services,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user