You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add Azconfig builder.
* Update package build.
* Update name for Azure App Configuration.
* Fix bug installing user secrets in 'Website' projects.
* Update AppConfig packages to strong-named previews.
* Incorrect handling of name change affecting version adjustment for Azconfig.
Copy file name to clipboardExpand all lines: README.md
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ are also intended to address some of the basic needs of applications as they mov
6
6
7
7
### V2 Update:
8
8
Version 2 is here with some new features:
9
+
* Azure App Configuration Support - There is a [new builder](#azureappconfigurationbuilder) for drawing values from the new Azure App Configuration service.
9
10
* ConfigBuilder Parameters from AppSettings - This has been one of the most asked for features of these config builders. With V2, it is now possible to
10
11
read initialization parameters for config builders from `appSettings`. Read more about it [here](#appsettings-parameters).
11
12
* Lazy Initialization - As part of the work to enable pulling config parameters from `appSettings`, these key/value configuration builders now support a
@@ -164,6 +165,49 @@ and currently exposes the format of the file which, as mentioned above, should b
If your secrets are kept in Azure Key Vault, then this config builder is for you. There are three additional attributes for this config builder. The `vaultName` is
184
+
required. The other attributes allow you some manual control about which vault to connect to, but are only necessary if the application is not running in an
185
+
environment that works magically with `Microsoft.Azure.Services.AppAuthentication`. The Azure Services Authentication library is used to automatically pick
186
+
up connection information from the execution environment if possible, but you can override that feature by providing a connection string instead.
187
+
*`vaultName` - This is a required attribute. It specifies the name of the vault in your Azure subscription from which to read key/value pairs.
188
+
*`connectionString` - A connection string usable by [AzureServiceTokenProvider](https://docs.microsoft.com/en-us/azure/key-vault/service-to-service-authentication#connection-string-support)
189
+
*`uri` - Connect to other Key Vault providers with this attribute. If not specified, Azure is the assumed Vault provider. If the uri _is_specified, then `vaultName` is no longer a required parameter.
190
+
*`version` - Azure Key Vault provides a versioning feature for secrets. If this is specified, the builder will only retrieve secrets matching this version.
191
+
*`preloadSecretNames` - By default, this builder will query __all__ the key names in the key vault when it is initialized. If this is a concern, set
192
+
this attribute to 'false', and secrets will be retrieved one at a time. This could also be useful if the vault allows "Get" access but not
193
+
"List" access. (NOTE: Disabling preload is incompatible with Greedy mode.)
194
+
Tip: Azure Key Vault uses random per-secret Guid assignments for versioning, which makes specifying a secret `version` tag on this builder rather
195
+
limiting, as it will only ever update one config value. To make version handling more useful, V2 of this builder takes advantage of the new key-updating
196
+
feature to allow users to specify version tags in key names rather than on the config builder declaration. That way, the same builder can handle multiple
197
+
keys with specific versions instead of needing to redefine multiple builders.
198
+
When requesting a specific version for a particular key, the key name in the original config file should look like __`keyName/versionId`__. The
199
+
AzureKeyVaultConfigBuilder will only substitue values for 'keyName' if the specified 'versionId' exists in the vault. When that happens, the
200
+
AzureKeyVaultConfigBuilder will remove the `/versionId` from the original key, and the resulting config section will only contain `keyName`.
201
+
For example:
202
+
```xml
203
+
<appSettingsconfigBuilders="AzureKeyVault">
204
+
<addkey="item1"value="Replaced with latest value from the key vault." />
205
+
<addkey="item2/0123456789abcdefdeadbeefbadf00d"value="Replaced with specific version only." />
206
+
</appSettings>
207
+
```
208
+
Assuming both of these items exist in the vault, and the version tag for `item2` is valid, this would result in an collection of appSettings with two
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
0 commit comments