2022-03-15 18:00:53 +00:00
|
|
|
|
// (c) Copyright Ascensio System SIA 2010-2022
|
|
|
|
|
//
|
|
|
|
|
// This program is a free software product.
|
|
|
|
|
// You can redistribute it and/or modify it under the terms
|
|
|
|
|
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
|
|
|
|
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
|
|
|
|
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
|
|
|
|
// any third-party rights.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
|
|
|
|
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
|
|
|
|
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
|
|
|
|
//
|
|
|
|
|
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
|
|
|
|
//
|
|
|
|
|
// The interactive user interfaces in modified source and object code versions of the Program must
|
|
|
|
|
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
|
|
|
|
//
|
|
|
|
|
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
|
|
|
|
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
|
|
|
|
// trademark law for use of our trademarks.
|
|
|
|
|
//
|
|
|
|
|
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
|
|
|
|
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
|
|
|
|
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
|
|
|
|
|
2022-01-26 11:33:32 +00:00
|
|
|
|
using Tenant = ASC.Core.Tenants.Tenant;
|
2020-09-18 17:57:51 +00:00
|
|
|
|
|
2022-02-10 11:24:16 +00:00
|
|
|
|
namespace ASC.Data.Storage.Encryption;
|
|
|
|
|
|
|
|
|
|
[Transient(Additional = typeof(EncryptionOperationExtension))]
|
|
|
|
|
public class EncryptionOperation : DistributedTaskProgress
|
|
|
|
|
{
|
2022-03-25 16:26:06 +00:00
|
|
|
|
private const string ProgressFileName = "EncryptionProgress.tmp";
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
|
|
|
|
private readonly IServiceScopeFactory _serviceScopeFactory;
|
2022-03-17 14:33:16 +00:00
|
|
|
|
private bool _hasErrors;
|
2022-02-10 11:24:16 +00:00
|
|
|
|
private EncryptionSettings _encryptionSettings;
|
|
|
|
|
private bool _isEncryption;
|
|
|
|
|
private bool _useProgressFile;
|
|
|
|
|
private IEnumerable<string> _modules;
|
|
|
|
|
private IEnumerable<Tenant> _tenants;
|
|
|
|
|
private string _serverRootPath;
|
|
|
|
|
|
|
|
|
|
public EncryptionOperation(IServiceScopeFactory serviceScopeFactory)
|
|
|
|
|
{
|
|
|
|
|
_serviceScopeFactory = serviceScopeFactory;
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-23 19:06:22 +00:00
|
|
|
|
public void Init(EncryptionSettings encryptionSettings, string id, string serverRootPath)
|
2022-02-10 11:24:16 +00:00
|
|
|
|
{
|
|
|
|
|
Id = id;
|
2022-05-23 19:06:22 +00:00
|
|
|
|
_encryptionSettings = encryptionSettings;
|
2022-02-10 11:24:16 +00:00
|
|
|
|
_isEncryption = _encryptionSettings.Status == EncryprtionStatus.EncryptionStarted;
|
2022-05-23 19:06:22 +00:00
|
|
|
|
_serverRootPath = serverRootPath;
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void DoJob()
|
|
|
|
|
{
|
|
|
|
|
using var scope = _serviceScopeFactory.CreateScope();
|
|
|
|
|
var scopeClass = scope.ServiceProvider.GetService<EncryptionOperationScope>();
|
|
|
|
|
var (log, encryptionSettingsHelper, tenantManager, notifyHelper, coreBaseSettings, storageFactoryConfig, storageFactory, configuration) = scopeClass;
|
|
|
|
|
notifyHelper.Init(_serverRootPath);
|
|
|
|
|
_tenants = tenantManager.GetTenants(false);
|
2022-09-05 11:27:38 +00:00
|
|
|
|
_modules = storageFactoryConfig.GetModuleList(exceptDisabledMigration: true);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
_useProgressFile = Convert.ToBoolean(configuration["storage:encryption:progressfile"] ?? "true");
|
|
|
|
|
|
|
|
|
|
Percentage = 10;
|
|
|
|
|
PublishChanges();
|
|
|
|
|
|
|
|
|
|
try
|
2020-09-30 12:23:35 +00:00
|
|
|
|
{
|
2022-02-10 11:24:16 +00:00
|
|
|
|
if (!coreBaseSettings.Standalone)
|
|
|
|
|
{
|
|
|
|
|
throw new NotSupportedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_encryptionSettings.Status == EncryprtionStatus.Encrypted || _encryptionSettings.Status == EncryprtionStatus.Decrypted)
|
|
|
|
|
{
|
2022-05-20 15:24:41 +00:00
|
|
|
|
log.DebugStorageAlready(_encryptionSettings.Status);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Percentage = 30;
|
2020-09-30 12:23:35 +00:00
|
|
|
|
PublishChanges();
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
|
|
|
|
foreach (var tenant in _tenants)
|
|
|
|
|
{
|
|
|
|
|
var dictionary = new Dictionary<string, DiscDataStore>();
|
2020-09-30 12:23:35 +00:00
|
|
|
|
|
2022-02-10 11:24:16 +00:00
|
|
|
|
foreach (var module in _modules)
|
|
|
|
|
{
|
2022-10-31 18:15:23 +00:00
|
|
|
|
dictionary.Add(module, (DiscDataStore)storageFactory.GetStorage(tenant.Id, module));
|
2020-09-30 12:23:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-02-10 11:24:16 +00:00
|
|
|
|
Parallel.ForEach(dictionary, (elem) =>
|
|
|
|
|
{
|
2022-04-14 19:42:15 +00:00
|
|
|
|
EncryptStoreAsync(tenant, elem.Key, elem.Value, storageFactoryConfig, log).Wait();
|
2022-02-10 11:24:16 +00:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Percentage = 70;
|
|
|
|
|
PublishChanges();
|
|
|
|
|
|
|
|
|
|
if (!_hasErrors)
|
|
|
|
|
{
|
2022-04-14 19:42:15 +00:00
|
|
|
|
DeleteProgressFilesAsync(storageFactory).Wait();
|
2022-02-10 11:24:16 +00:00
|
|
|
|
SaveNewSettings(encryptionSettingsHelper, log);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Percentage = 90;
|
|
|
|
|
PublishChanges();
|
|
|
|
|
|
|
|
|
|
ActivateTenants(tenantManager, log, notifyHelper);
|
|
|
|
|
|
|
|
|
|
Percentage = 100;
|
|
|
|
|
PublishChanges();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
Exception = e;
|
2022-05-20 15:24:41 +00:00
|
|
|
|
log.ErrorEncryptionOperation(e);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-26 17:53:48 +00:00
|
|
|
|
private async Task EncryptStoreAsync(Tenant tenant, string module, DiscDataStore store, StorageFactoryConfig storageFactoryConfig, ILogger log)
|
2022-02-10 11:24:16 +00:00
|
|
|
|
{
|
2022-09-05 11:27:38 +00:00
|
|
|
|
var domains = storageFactoryConfig.GetDomainList(module).ToList();
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
|
|
|
|
domains.Add(string.Empty);
|
|
|
|
|
|
2022-04-14 19:42:15 +00:00
|
|
|
|
var progress = await ReadProgressAsync(store);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
2022-04-14 19:42:15 +00:00
|
|
|
|
foreach (var domain in domains)
|
|
|
|
|
{
|
|
|
|
|
var logParent = $"Tenant: {tenant.Alias}, Module: {module}, Domain: {domain}";
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
2022-04-14 19:42:15 +00:00
|
|
|
|
var files = await GetFilesAsync(domains, progress, store, domain);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
|
|
|
|
EncryptFiles(store, domain, files, logParent, log);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StepDone();
|
|
|
|
|
|
2022-05-20 15:24:41 +00:00
|
|
|
|
log.DebugPercentage(Percentage);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-04-14 19:42:15 +00:00
|
|
|
|
private Task<List<string>> ReadProgressAsync(DiscDataStore store)
|
2022-02-10 11:24:16 +00:00
|
|
|
|
{
|
|
|
|
|
if (!_useProgressFile)
|
|
|
|
|
{
|
2022-04-14 19:42:15 +00:00
|
|
|
|
return Task.FromResult(new List<string>());
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
2022-02-23 19:42:34 +00:00
|
|
|
|
|
2022-04-14 19:42:15 +00:00
|
|
|
|
return InternalReadProgressAsync(store);
|
|
|
|
|
}
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
2022-04-14 19:42:15 +00:00
|
|
|
|
private async Task<List<string>> InternalReadProgressAsync(DiscDataStore store)
|
|
|
|
|
{
|
|
|
|
|
var encryptedFiles = new List<string>();
|
|
|
|
|
|
|
|
|
|
if (await store.IsFileAsync(string.Empty, ProgressFileName))
|
2022-02-10 11:24:16 +00:00
|
|
|
|
{
|
2022-04-14 19:42:15 +00:00
|
|
|
|
using var stream = await store.GetReadStreamAsync(string.Empty, ProgressFileName);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
using var reader = new StreamReader(stream);
|
2022-04-14 19:42:15 +00:00
|
|
|
|
string line;
|
|
|
|
|
|
|
|
|
|
while ((line = reader.ReadLine()) != null)
|
|
|
|
|
{
|
|
|
|
|
encryptedFiles.Add(line);
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-02-10 11:24:16 +00:00
|
|
|
|
else
|
|
|
|
|
{
|
2022-03-25 16:26:06 +00:00
|
|
|
|
store.GetWriteStream(string.Empty, ProgressFileName).Close();
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return encryptedFiles;
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-14 19:42:15 +00:00
|
|
|
|
private async Task<IEnumerable<string>> GetFilesAsync(List<string> domains, List<string> progress, DiscDataStore targetStore, string targetDomain)
|
2022-02-10 11:24:16 +00:00
|
|
|
|
{
|
2022-04-14 19:42:15 +00:00
|
|
|
|
IEnumerable<string> files = await targetStore.ListFilesRelativeAsync(targetDomain, "\\", "*.*", true).ToListAsync();
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
2022-04-14 19:42:15 +00:00
|
|
|
|
if (progress.Count > 0)
|
2022-02-10 11:24:16 +00:00
|
|
|
|
{
|
|
|
|
|
files = files.Where(path => !progress.Contains(path));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(targetDomain))
|
|
|
|
|
{
|
|
|
|
|
return files;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var notEmptyDomains = domains.Where(domain => !string.IsNullOrEmpty(domain));
|
|
|
|
|
|
|
|
|
|
if (notEmptyDomains.Any())
|
|
|
|
|
{
|
|
|
|
|
files = files.Where(path => notEmptyDomains.All(domain => !path.Contains(domain + Path.DirectorySeparatorChar)));
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-25 16:26:06 +00:00
|
|
|
|
files = files.Where(path => !path.EndsWith(ProgressFileName));
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
|
|
|
|
return files;
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-26 17:53:48 +00:00
|
|
|
|
private void EncryptFiles(DiscDataStore store, string domain, IEnumerable<string> files, string logParent, ILogger log)
|
2022-02-10 11:24:16 +00:00
|
|
|
|
{
|
|
|
|
|
foreach (var file in files)
|
|
|
|
|
{
|
2022-04-14 19:42:15 +00:00
|
|
|
|
var logItem = $"{logParent}, File: {file}";
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
2022-05-20 15:24:41 +00:00
|
|
|
|
log.Debug(logItem);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (_isEncryption)
|
|
|
|
|
{
|
|
|
|
|
store.Encrypt(domain, file);
|
2020-09-30 12:23:35 +00:00
|
|
|
|
}
|
2022-02-10 11:24:16 +00:00
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
store.Decrypt(domain, file);
|
2020-09-30 12:23:35 +00:00
|
|
|
|
}
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
|
|
|
|
WriteProgress(store, file, _useProgressFile);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
_hasErrors = true;
|
2022-05-20 15:24:41 +00:00
|
|
|
|
log.ErrorLogItem(logItem, e);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
|
|
|
|
// ERROR_DISK_FULL: There is not enough space on the disk.
|
|
|
|
|
// if (e is IOException && e.HResult == unchecked((int)0x80070070)) break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void WriteProgress(DiscDataStore store, string file, bool useProgressFile)
|
|
|
|
|
{
|
|
|
|
|
if (!useProgressFile)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-25 16:26:06 +00:00
|
|
|
|
using var stream = store.GetWriteStream(string.Empty, ProgressFileName, FileMode.Append);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
using var writer = new StreamWriter(stream);
|
2022-04-14 19:42:15 +00:00
|
|
|
|
writer.WriteLine(file);
|
|
|
|
|
}
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
2022-04-14 19:42:15 +00:00
|
|
|
|
private async Task DeleteProgressFilesAsync(StorageFactory storageFactory)
|
2022-02-10 11:24:16 +00:00
|
|
|
|
{
|
|
|
|
|
foreach (var tenant in _tenants)
|
|
|
|
|
{
|
|
|
|
|
foreach (var module in _modules)
|
|
|
|
|
{
|
2022-10-31 18:15:23 +00:00
|
|
|
|
var store = (DiscDataStore)storageFactory.GetStorage(tenant.Id, module);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
2022-04-14 19:42:15 +00:00
|
|
|
|
if (await store.IsFileAsync(string.Empty, ProgressFileName))
|
2022-02-10 11:06:37 +00:00
|
|
|
|
{
|
2022-04-14 19:42:15 +00:00
|
|
|
|
await store.DeleteAsync(string.Empty, ProgressFileName);
|
2022-02-10 11:06:37 +00:00
|
|
|
|
}
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-26 17:53:48 +00:00
|
|
|
|
private void SaveNewSettings(EncryptionSettingsHelper encryptionSettingsHelper, ILogger log)
|
2022-02-10 11:24:16 +00:00
|
|
|
|
{
|
|
|
|
|
if (_isEncryption)
|
|
|
|
|
{
|
|
|
|
|
_encryptionSettings.Status = EncryprtionStatus.Encrypted;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_encryptionSettings.Status = EncryprtionStatus.Decrypted;
|
|
|
|
|
_encryptionSettings.Password = string.Empty;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
encryptionSettingsHelper.Save(_encryptionSettings);
|
|
|
|
|
|
2022-05-20 15:24:41 +00:00
|
|
|
|
log.DebugSaveNewEncryptionSettings();
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-04-26 17:53:48 +00:00
|
|
|
|
private void ActivateTenants(TenantManager tenantManager, ILogger log, NotifyHelper notifyHelper)
|
2022-02-10 11:24:16 +00:00
|
|
|
|
{
|
|
|
|
|
foreach (var tenant in _tenants)
|
|
|
|
|
{
|
|
|
|
|
if (tenant.Status == TenantStatus.Encryption)
|
|
|
|
|
{
|
|
|
|
|
tenantManager.SetCurrentTenant(tenant);
|
|
|
|
|
|
|
|
|
|
tenant.SetStatus(TenantStatus.Active);
|
|
|
|
|
tenantManager.SaveTenant(tenant);
|
2022-05-20 15:24:41 +00:00
|
|
|
|
log.DebugTenantSetStatusActive(tenant.Alias);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
|
|
|
|
|
if (!_hasErrors)
|
|
|
|
|
{
|
|
|
|
|
if (_encryptionSettings.NotifyUsers)
|
2020-09-18 17:57:51 +00:00
|
|
|
|
{
|
2022-02-10 11:24:16 +00:00
|
|
|
|
if (_isEncryption)
|
|
|
|
|
{
|
2022-02-21 09:51:45 +00:00
|
|
|
|
notifyHelper.SendStorageEncryptionSuccess(tenant.Id);
|
2022-02-10 10:43:28 +00:00
|
|
|
|
}
|
2022-02-10 11:24:16 +00:00
|
|
|
|
else
|
|
|
|
|
{
|
2022-02-21 09:51:45 +00:00
|
|
|
|
notifyHelper.SendStorageDecryptionSuccess(tenant.Id);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
2022-05-20 15:24:41 +00:00
|
|
|
|
log.DebugTenantSendStorageEncryptionSuccess(tenant.Alias);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (_isEncryption)
|
|
|
|
|
{
|
2022-02-21 09:51:45 +00:00
|
|
|
|
notifyHelper.SendStorageEncryptionError(tenant.Id);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2022-02-21 09:51:45 +00:00
|
|
|
|
notifyHelper.SendStorageDecryptionError(tenant.Id);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-05-20 15:24:41 +00:00
|
|
|
|
log.DebugTenantSendStorageEncryptionError(tenant.Alias);
|
2022-02-10 11:24:16 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Scope]
|
|
|
|
|
public class EncryptionOperationScope
|
|
|
|
|
{
|
2022-04-26 17:53:48 +00:00
|
|
|
|
private readonly ILogger _logger;
|
2022-02-10 11:24:16 +00:00
|
|
|
|
private readonly EncryptionSettingsHelper _encryptionSettingsHelper;
|
|
|
|
|
private readonly TenantManager _tenantManager;
|
|
|
|
|
private readonly NotifyHelper _notifyHelper;
|
|
|
|
|
private readonly CoreBaseSettings _coreBaseSettings;
|
|
|
|
|
private readonly StorageFactoryConfig _storageFactoryConfig;
|
|
|
|
|
private readonly StorageFactory _storageFactory;
|
|
|
|
|
private readonly IConfiguration _configuration;
|
|
|
|
|
|
2022-04-26 17:53:48 +00:00
|
|
|
|
public EncryptionOperationScope(
|
|
|
|
|
ILogger<EncryptionOperationScope> logger,
|
2022-02-10 11:24:16 +00:00
|
|
|
|
StorageFactoryConfig storageFactoryConfig,
|
|
|
|
|
StorageFactory storageFactory,
|
|
|
|
|
TenantManager tenantManager,
|
|
|
|
|
CoreBaseSettings coreBaseSettings,
|
|
|
|
|
NotifyHelper notifyHelper,
|
|
|
|
|
EncryptionSettingsHelper encryptionSettingsHelper,
|
|
|
|
|
IConfiguration configuration)
|
|
|
|
|
{
|
2022-03-17 10:13:52 +00:00
|
|
|
|
_logger = logger;
|
2022-02-10 11:24:16 +00:00
|
|
|
|
_storageFactoryConfig = storageFactoryConfig;
|
|
|
|
|
_storageFactory = storageFactory;
|
|
|
|
|
_tenantManager = tenantManager;
|
|
|
|
|
_coreBaseSettings = coreBaseSettings;
|
|
|
|
|
_notifyHelper = notifyHelper;
|
|
|
|
|
_encryptionSettingsHelper = encryptionSettingsHelper;
|
|
|
|
|
_configuration = configuration;
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-26 17:53:48 +00:00
|
|
|
|
public void Deconstruct(out ILogger log, out EncryptionSettingsHelper encryptionSettingsHelper, out TenantManager tenantManager, out NotifyHelper notifyHelper, out CoreBaseSettings coreBaseSettings, out StorageFactoryConfig storageFactoryConfig, out StorageFactory storageFactory, out IConfiguration configuration)
|
2022-02-10 11:24:16 +00:00
|
|
|
|
{
|
|
|
|
|
log = _logger;
|
|
|
|
|
encryptionSettingsHelper = _encryptionSettingsHelper;
|
|
|
|
|
tenantManager = _tenantManager;
|
|
|
|
|
notifyHelper = _notifyHelper;
|
|
|
|
|
coreBaseSettings = _coreBaseSettings;
|
|
|
|
|
storageFactoryConfig = _storageFactoryConfig;
|
|
|
|
|
storageFactory = _storageFactory;
|
|
|
|
|
configuration = _configuration;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-16 09:47:11 +00:00
|
|
|
|
public static class EncryptionOperationExtension
|
|
|
|
|
{
|
2022-02-10 11:24:16 +00:00
|
|
|
|
public static void Register(DIHelper services)
|
|
|
|
|
{
|
|
|
|
|
services.TryAdd<EncryptionOperationScope>();
|
|
|
|
|
}
|
2020-09-02 10:54:50 +00:00
|
|
|
|
}
|