C# Класс Tailspin.Surveys.Configuration.KeyVault.KeyVaultConfigurationProvider

Asp.Net configuration provider to read secrets from key vault. This requires List and Get permissions on the vault
Наследование: Microsoft.Extensions.Configuration.ConfigurationProvider
Показать файл Открыть проект

Открытые методы

Метод Описание
KeyVaultConfigurationProvider ( string appClientId, string vaultName, StoreName storeName, StoreLocation storeLocation, string certificateThumbprint, bool validateCertificate, ILoggerFactory loggerFactory ) : System

Creates the Configuration source to read shared secrets from keyvault using cert in the specified location

KeyVaultConfigurationProvider ( string appClientId, string vaultName, string certificateThumbprint, bool validateCertificate, ILoggerFactory loggerFactory ) : System

Creates the Configuration source to read shared secrets from keyvault using cert in My store of CurrentUser

Load ( ) : void

Loads all secrets which are delimited by : so that they can be retrieved by the config system Since KeyVault does not allow the : character as delimiter in the share secret name is not used as key for configuration, the Tag properties are used instead The tag should always be of the form "ConfigKey"="ParentKey1:Child1:.."

Приватные методы

Метод Описание
GetTokenAsync ( string authority, string resource, string scope ) : Task
LoadAsync ( CancellationToken token ) : Task

Loads all secrets which are delimited by : so that they can be retrieved by the config system Since KeyVault does not allow : as delimiters in the share secret name, the actual name is not used as key for configuration. The Tag property is used instead The tag should always be of the form "ConfigKey"="ParentKey1:Child1:.."

Описание методов

KeyVaultConfigurationProvider() публичный Метод

Creates the Configuration source to read shared secrets from keyvault using cert in the specified location
public KeyVaultConfigurationProvider ( string appClientId, string vaultName, StoreName storeName, StoreLocation storeLocation, string certificateThumbprint, bool validateCertificate, ILoggerFactory loggerFactory ) : System
appClientId string
vaultName string
storeName StoreName
storeLocation StoreLocation
certificateThumbprint string
validateCertificate bool
loggerFactory ILoggerFactory
Результат System

KeyVaultConfigurationProvider() публичный Метод

Creates the Configuration source to read shared secrets from keyvault using cert in My store of CurrentUser
public KeyVaultConfigurationProvider ( string appClientId, string vaultName, string certificateThumbprint, bool validateCertificate, ILoggerFactory loggerFactory ) : System
appClientId string
vaultName string
certificateThumbprint string
validateCertificate bool
loggerFactory ILoggerFactory
Результат System

Load() публичный Метод

Loads all secrets which are delimited by : so that they can be retrieved by the config system Since KeyVault does not allow the : character as delimiter in the share secret name is not used as key for configuration, the Tag properties are used instead The tag should always be of the form "ConfigKey"="ParentKey1:Child1:.."
public Load ( ) : void
Результат void