public GetFacturaeSignedActivity(IKeyVaultService keyvaultService, XadesService xadesService, IConfiguration configuration) { this.keyvaultService = keyvaultService; this.xadesService = xadesService; this.configuration = configuration; }
public TagAndAnalyzeService(IKeyVaultService keyVaultService, IUploadToAzureStorageService uploadToAzureStorageService, IHandwrittenRecognitionService handwrittenRecognitionService) { _keyVaultService = keyVaultService; _uploadToAzureStorageService = uploadToAzureStorageService; _handwrittenRecognitionService = handwrittenRecognitionService; }
/// <summary> /// Initializes a new instance of the <see cref="DocumentDbService"/> class. /// </summary> /// <param name="keyVaultService">Key Vault Service</param> /// <param name="config">Config</param> public DocumentDbService(IKeyVaultService keyVaultService, IOptions <DocumentDbConfig> config) { Contract.Requires(config != null, nameof(config)); Contract.Requires(keyVaultService != null, nameof(keyVaultService)); this.config = config.Value; this.keyVaultService = keyVaultService; }
/// <summary> /// Initializes a new instance of the <see cref="StorageService"/> class. /// </summary> /// <param name="keyVaultService">Key Vault Service</param> /// <param name="config">Config</param> public StorageService(IKeyVaultService keyVaultService, IOptions <AzureStorageConfig> config) { Contract.Requires(config != null, nameof(config)); Contract.Requires(keyVaultService != null, nameof(keyVaultService)); this.config = config.Value; this.keyVaultService = keyVaultService; }
public VsixSignService(IKeyVaultService keyVaultService, ILogger <VsixSignService> logger, ITelemetryLogger telemetryLogger) { this.keyVaultService = keyVaultService; this.logger = logger; this.telemetryLogger = telemetryLogger; }
public AzureSignToolSignService(ILogger <AzureSignToolSignService> logger, IKeyVaultService keyVaultService, ITelemetryLogger telemetryLogger) { this.logger = logger; this.keyVaultService = keyVaultService; this.telemetryLogger = telemetryLogger; signToolName = nameof(AzureSignToolSignService); }
/// <summary> /// Initializes a new instance of the <see cref="BackupBlobService"/> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="sasTokenProvider">The sas token provider</param> /// <param name="keyVaultService">The key vault service</param> public BackupBlobService(ILogger <IBackupBlobService> logger, ISasTokenProvider sasTokenProvider, IKeyVaultService keyVaultService) { _logger = logger; _keyVaultService = keyVaultService; _accountKey = Environment.GetEnvironmentVariable("AccountKey"); _blobEndpoint = Environment.GetEnvironmentVariable("BlobEndpoint"); _environment = Environment.GetEnvironmentVariable("Environment"); _accountName = _environment.Equals("dev") ? "devstoreaccount1" : _accountName; }
/// <summary> /// Initializes a new instance of the <see cref="BatchService"/> class. /// </summary> /// <param name="keyVaultService">Key Vault Service</param> /// <param name="config">Config</param> /// <param name="logger">Logger</param> public BatchService(IKeyVaultService keyVaultService, IOptions <AzureBatchConfig> config, ILogger <BatchService> logger) { Contract.Requires(config != null, nameof(config)); Contract.Requires(keyVaultService != null, nameof(keyVaultService)); this.config = config.Value; this.keyVaultService = keyVaultService; this.logger = logger; }
public AppxFileFactory(ILogger <AppxFileFactory> logger, IOptionsSnapshot <WindowsSdkFiles> windowSdkFiles, IKeyVaultService keyVaultService, IDirectoryUtility directoryUtility) { this.logger = logger; this.keyVaultService = keyVaultService; this.directoryUtility = directoryUtility; makeappxPath = windowSdkFiles.Value.MakeAppxPath; }
public NuGetSignService(IKeyVaultService keyVaultService, ILogger <NuGetSignService> logger, ITelemetryLogger telemetryLogger) { this.keyVaultService = keyVaultService; this.logger = logger; this.telemetryLogger = telemetryLogger; signToolName = nameof(NuGetSignService); signCommand = new SignCommand(logger); }
public NuGetSignService(IKeyVaultService keyVaultService, IHostingEnvironment hostingEnvironment, ILogger <NuGetSignService> logger, ITelemetryLogger telemetryLogger) { this.keyVaultService = keyVaultService; this.logger = logger; this.telemetryLogger = telemetryLogger; signtoolPath = Path.Combine(hostingEnvironment.ContentRootPath, "tools\\NuGetKeyVaultSignTool\\NuGetKeyVaultSignTool.exe"); signToolName = Path.GetFileName(signtoolPath); }
public AzureSignToolCodeSignService(ILogger <AzureSignToolCodeSignService> logger, IAppxFileFactory appxFileFactory, IKeyVaultService keyVaultService, IHostingEnvironment hostingEnvironment, ITelemetryLogger telemetryLogger) { this.logger = logger; this.appxFileFactory = appxFileFactory; this.keyVaultService = keyVaultService; this.telemetryLogger = telemetryLogger; keyVaultSignToolPath = Path.Combine(hostingEnvironment.ContentRootPath, "tools\\AzureSignTool\\AzureSignTool.exe"); signToolName = Path.GetFileName(keyVaultSignToolPath); }
/// <summary> /// Initializes a new instance of the <see cref="AccessTokenProvider"/> class. /// </summary> /// <param name="keyVaultService">The key vault service.</param> /// <param name="accessTokenGenerator">The access token generator.</param> /// <param name="accessTokenSettings">The access token settings.</param> /// <param name="keyVaultSettings">The key vault settings.</param> /// <param name="platformSettings">The platform settings.</param> public AccessTokenProvider( IKeyVaultService keyVaultService, IAccessTokenGenerator accessTokenGenerator, IOptions <AccessTokenSettings> accessTokenSettings, IOptions <KeyVaultSettings> keyVaultSettings, IOptions <PlatformSettings> platformSettings) { _keyVaultService = keyVaultService; _accessTokenGenerator = accessTokenGenerator; _platformSettings = platformSettings.Value; _accessTokenSettings = accessTokenSettings.Value; _keyVaultSettings = keyVaultSettings.Value; }
/// <summary> /// Initializes a new instance of the <see cref="GraphService"/> class. /// </summary> /// <param name="httpContextAccessor">Http Context</param> /// <param name="keyVaultService">Key Vault Service</param> /// <param name="config">Config</param> /// <param name="cache">Cache</param> /// <param name="dataProtectionProvider">Data Protection Provider</param> public GraphService(IHttpContextAccessor httpContextAccessor, IKeyVaultService keyVaultService, IOptions <AzureAdConfig> config, IDistributedCache cache, IDataProtectionProvider dataProtectionProvider) { Contract.Requires(httpContextAccessor != null, nameof(httpContextAccessor)); Contract.Requires(config != null, nameof(config)); Contract.Requires(keyVaultService != null, nameof(keyVaultService)); Contract.Requires(cache != null, nameof(cache)); Contract.Requires(dataProtectionProvider != null, nameof(dataProtectionProvider)); this.httpContextAccessor = httpContextAccessor; this.config = config.Value; this.keyVaultService = keyVaultService; this.cache = cache; this.dataProtectionProvider = dataProtectionProvider; }
public MageSignService(IOptionsMonitor <AzureADOptions> aadOptions, IHostingEnvironment hostingEnvironment, IKeyVaultService keyVaultService, IServiceProvider serviceProvider, ILogger <MageSignService> logger, ITelemetryLogger telemetryLogger) { this.aadOptions = aadOptions.Get(AzureADDefaults.AuthenticationScheme); this.keyVaultService = keyVaultService; this.logger = logger; this.telemetryLogger = telemetryLogger; magetoolPath = Path.Combine(hostingEnvironment.ContentRootPath, "tools\\SDK\\mage.exe"); signToolName = nameof(MageSignService); // Need to delay this as it'd create a dependency loop if directly in the ctor signToolAggregate = new Lazy <ISigningToolAggregate>(() => serviceProvider.GetService <ISigningToolAggregate>()); }
/// <summary> /// Initializes a new instance of the <see cref="ValidateSubscriptionService"/> class. /// </summary> public ValidateSubscriptionService( HttpClient httpClient, IAccessTokenGenerator accessTokenGenerator, IKeyVaultService keyVaultService, IOptions <PlatformSettings> eventsConfig, IOptions <KeyVaultSettings> keyVaultSettings, ILogger <IPushEventsService> logger) { _platformSettings = eventsConfig.Value; _keyVaultSettings = keyVaultSettings.Value; httpClient.BaseAddress = new Uri(_platformSettings.ApiEventsEndpoint); _client = httpClient; _accessTokenGenerator = accessTokenGenerator; _keyVaultService = keyVaultService; _logger = logger; }
public override void Execute() { var vaultConfig = ConfigurationManager.GetVaultConfig(Vault); if (vaultConfig == null) { WriteError($"Unknown vault '{Vault}'"); return; } var authConfig = ConfigurationManager.GetAuthConfig(vaultConfig); if (authConfig == null) { WriteError($"No authentication methods have been configured for vault '{Vault}'; see `kv auth`"); return; } IKeyVaultService kvService = CreateVaultService(authConfig); SecretBundle secret; try { secret = kvService.GetSecret(vaultConfig.GetVaultUri($"secrets/{Secret}")); } catch (Exception ex) { WriteError($"Failed to get secret '{Secret}' from vault '{Vault}'", ex); return; } if (!Force) { secret.Value = "********"; WriteInfo("Secret value is masked; '--force' option is not present"); } if (Verbose) { Console.Out.WriteJson(secret); } else { Console.Out.WriteLine(secret.Value); } }
public override void Execute() { var vaultConfig = ConfigurationManager.GetVaultConfig(Vault); if (vaultConfig == null) { WriteError($"Unknown vault '{Vault}'"); return; } if (!Force) { WriteError("'--force' option is required"); return; } var authConfig = ConfigurationManager.GetAuthConfig(vaultConfig); if (authConfig == null) { WriteError($"No authentication methods have been configured for vault '{Vault}'; see `kv auth`"); return; } IKeyVaultService kvService = CreateVaultService(authConfig); SecretBundle deletedSecret; try { deletedSecret = kvService.DeleteSecret(vaultConfig.GetVaultUri(), Secret); } catch (Exception ex) { WriteError($"Failed to delete secret '{Secret}' in vault '{Vault}'", ex); return; } WriteInfo($"Secret '{Secret}' was deleted successfully"); if (Verbose) { WriteVerbose("Deleted secret:"); Console.Out.WriteJson(deletedSecret); } }
public override void Execute() { var vaultConfig = ConfigurationManager.GetVaultConfig(Vault); if (vaultConfig == null) { WriteError($"Unknown vault '{Vault}'"); return; } var authConfig = ConfigurationManager.GetAuthConfig(vaultConfig); if (authConfig == null) { WriteError($"No authentication methods have been configured for vault '{Vault}'; see `kv auth`"); return; } IKeyVaultService kvService = CreateVaultService(authConfig); IEnumerable <SecretItem> secrets; try { secrets = kvService.GetSecrets(new Uri(vaultConfig.Url)); } catch (Exception ex) { WriteError($"Failed to list secrets in vault '{Vault}'", ex); return; } foreach (var secret in secrets) { if (Verbose) { Console.Out.WriteJson(secret); } else { Console.Out.WriteLine(secret.Identifier.Name); } } }
public override void Execute() { var vaultConfig = ConfigurationManager.GetVaultConfig(Vault); if (vaultConfig == null) { WriteError($"Unknown vault '{Vault}'"); return; } var authConfig = ConfigurationManager.GetAuthConfig(vaultConfig); if (authConfig == null) { WriteError($"No authentication methods have been configured for vault '{Vault}'; see `kv auth`"); return; } IKeyVaultService kvService = CreateVaultService(authConfig); SecretBundle newSecret; try { newSecret = kvService.SetSecret(vaultConfig.GetVaultUri(), Secret, Value); } catch (Exception ex) { WriteError($"Failed to set secret '{Secret}' in vault '{Vault}'", ex); return; } if (Verbose) { Console.Out.WriteJson(newSecret); } else { WriteInfo($"Secret '{Secret}' was set successfully"); } }
public BotService(IStorageService storageService, IKeyVaultService keyVaultService) { _storageService = storageService; _keyVaultService = keyVaultService; }
public KeyVaultSource(List <string> keyVaultKeys, IKeyVaultService keyVaultService) { this.keyVaultKeys = keyVaultKeys ?? throw new ArgumentNullException(nameof(keyVaultKeys)); this.keyVaultService = keyVaultService; }
public SecretModel(IKeyVaultService service) { _service = service; }
public JWTHelper(IKeyVaultService keyVault, IConfiguration config) { _kvService = keyVault; _config = config; }
public RotatorWorker(IKeyVaultService keyVaultService, IApplicationService applicationService) { _keyVaultService = keyVaultService; _applicationService = applicationService; }
public CheckHealth(IConfiguration config, IKeyVaultService keyVaultService, DataContext dbContext) { _config = config; _keyVaultService = keyVaultService; _dbContext = dbContext; }
public APIController(ILogger <APIController> logger, IKeyVaultService keyVaultService) { this.logger = logger; this.keyVaultService = keyVaultService; }
public OpticalCharacterRecognitionService(IKeyVaultService keyVaultService) { _keyVaultService = keyVaultService; }
public KeyVaultApi(IKeyVaultService keyVaultService) { _keyVaultService = keyVaultService; }
public SignModel(IKeyVaultService service) { _service = service; }