Class KeyVaultSecretsProvider
Class that represents a secrets provider from Azure KeyVault.
Inheritance
System.Object
KeyVaultSecretsProvider
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fibula.Providers.Azure
Assembly: Fibula.Providers.Azure.dll
Syntax
public class KeyVaultSecretsProvider : ISecretsProvider
Constructors
| Improve this Doc View SourceKeyVaultSecretsProvider(IOptions<KeyVaultSecretsProviderOptions>, ITokenProvider, ILogger)
Initializes a new instance of the KeyVaultSecretsProvider class.
Declaration
public KeyVaultSecretsProvider(IOptions<KeyVaultSecretsProviderOptions> secretsProviderOptions, ITokenProvider tokenProvider, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Options.IOptions<KeyVaultSecretsProviderOptions> | secretsProviderOptions | A reference to the secrets provider options. |
ITokenProvider | tokenProvider | A reference to the token provider service to use to obtain access to the vault. |
Serilog.ILogger | logger | A logger for this provider. |
Properties
| Improve this Doc View SourceBaseUri
Gets the KeyVault base uri currenly in use by this provider.
Declaration
public Uri BaseUri { get; }
Property Value
Type | Description |
---|---|
System.Uri |
Logger
Gets the logger in use by this provider.
Declaration
public ILogger Logger { get; }
Property Value
Type | Description |
---|---|
Serilog.ILogger |
Methods
| Improve this Doc View SourceGetSecretValueAsync(String)
Gets a Secret's value from the KeyVault as an asynchronous operation.
Declaration
public Task<SecureString> GetSecretValueAsync(string secretName)
Parameters
Type | Name | Description |
---|---|---|
System.String | secretName | The name of the secret to get the value of. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Security.SecureString> | A System.Threading.Tasks.Task representing the asynchronous operation. |
ListSecretIdentifiers()
Retrieves a list of Secret identifiers from the secret store.
Declaration
public Task<IEnumerable<string>> ListSecretIdentifiers()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>> | A list of secret idetifiers. |