public HostIdValidator(IEnvironment environment, IAzureBlobStorageProvider azureBlobStorageProvider, IApplicationLifetime applicationLifetime,
                        HostNameProvider hostNameProvider, ILogger <HostIdValidator> logger)
 {
     _environment = environment;
     _azureBlobStorageProvider = azureBlobStorageProvider;
     _applicationLifetime      = applicationLifetime;
     _hostNameProvider         = hostNameProvider;
     _logger = logger;
 }
Beispiel #2
0
        public BlobStorageSecretsRepository(string secretSentinelDirectoryPath, string accountConnection, string siteSlotName, ILogger logger, IEnvironment environment, IAzureBlobStorageProvider azureBlobStorageProvider)
            : base(secretSentinelDirectoryPath, logger, environment)
        {
            ArgumentNullException.ThrowIfNull(secretSentinelDirectoryPath);
            ArgumentNullException.ThrowIfNull(accountConnection);
            ArgumentNullException.ThrowIfNull(siteSlotName);

            _secretsBlobPath          = siteSlotName.ToLowerInvariant();
            _hostSecretsBlobPath      = string.Format("{0}/{1}", _secretsBlobPath, ScriptConstants.HostMetadataFileName);
            _accountConnection        = accountConnection;
            _azureBlobStorageProvider = azureBlobStorageProvider;
        }
 public FunctionsSyncManager(IConfiguration configuration, IHostIdProvider hostIdProvider, IOptionsMonitor <ScriptApplicationHostOptions> applicationHostOptions, ILogger <FunctionsSyncManager> logger, IHttpClientFactory httpClientFactory, ISecretManagerProvider secretManagerProvider, IScriptWebHostEnvironment webHostEnvironment, IEnvironment environment, HostNameProvider hostNameProvider, IFunctionMetadataManager functionMetadataManager, IAzureBlobStorageProvider azureBlobStorageProvider)
 {
     _applicationHostOptions = applicationHostOptions;
     _logger                   = logger;
     _httpClient               = httpClientFactory.CreateClient();
     _secretManagerProvider    = secretManagerProvider;
     _configuration            = configuration;
     _hostIdProvider           = hostIdProvider;
     _webHostEnvironment       = webHostEnvironment;
     _environment              = environment;
     _hostNameProvider         = hostNameProvider;
     _functionMetadataManager  = functionMetadataManager;
     _azureBlobStorageProvider = azureBlobStorageProvider;
 }
        public DefaultSecretManagerProvider(IOptionsMonitor <ScriptApplicationHostOptions> options, IHostIdProvider hostIdProvider, IEnvironment environment,
                                            ILoggerFactory loggerFactory, IMetricsLogger metricsLogger, HostNameProvider hostNameProvider, StartupContextProvider startupContextProvider,
                                            IAzureBlobStorageProvider azureBlobStorageProvider)
        {
            ArgumentNullException.ThrowIfNull(loggerFactory);

            _options                = options ?? throw new ArgumentNullException(nameof(options));
            _hostIdProvider         = hostIdProvider ?? throw new ArgumentNullException(nameof(hostIdProvider));
            _environment            = environment ?? throw new ArgumentNullException(nameof(environment));
            _hostNameProvider       = hostNameProvider ?? throw new ArgumentNullException(nameof(hostNameProvider));
            _startupContextProvider = startupContextProvider ?? throw new ArgumentNullException(nameof(startupContextProvider));

            _loggerFactory = loggerFactory;
            _logger        = _loggerFactory.CreateLogger <DefaultSecretManagerProvider>();

            _metricsLogger      = metricsLogger ?? throw new ArgumentNullException(nameof(metricsLogger));
            _secretManagerLazy  = new Lazy <ISecretManager>(Create);
            _secretsEnabledLazy = new Lazy <bool>(GetSecretsEnabled);

            // When these options change (due to specialization), we need to reset the secret manager.
            options.OnChange(_ => ResetSecretManager());

            _azureBlobStorageProvider = azureBlobStorageProvider ?? throw new ArgumentNullException(nameof(azureBlobStorageProvider));
        }
Beispiel #5
0
 public ImageService(IBaseRepository <Image> repository, IAzureBlobStorageProvider azureBlobStorageProvider)
 {
     this.repository = repository;
     this.azureBlobStorageProvider = azureBlobStorageProvider;
 }
 public BlobStorageSasSecretsRepository(string secretSentinelDirectoryPath, string containerSasUri, string siteSlotName, ILogger logger, IEnvironment environment, IAzureBlobStorageProvider azureBlobStorageProvider)
     : base(secretSentinelDirectoryPath, containerSasUri, siteSlotName, logger, environment, azureBlobStorageProvider)
 {
 }