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
One of the easiest ways to contribute is to participate in discussions and discuss issues. You can also contribute by submitting pull requests with code changes.
4
+
5
+
## General feedback and discussions?
6
+
Please start a discussion on the [Home repo issue tracker](https://github.com/aspnet/MicrosoftConfigurationBuilders/issues).
7
+
8
+
## Bugs and feature requests?
9
+
For non-security related bugs please log a new issue on the [Home repo issue tracker](https://github.com/aspnet/MicrosoftConfigurationBuilders/issues).
10
+
11
+
## Reporting security issues and bugs
12
+
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://technet.microsoft.com/en-us/security/ff852094.aspx).
13
+
14
+
## Filing issues
15
+
When filing issues, please use our [bug filing templates](https://github.com/aspnet/MicrosoftConfigurationBuilders/wiki/Functional-bug-template).
16
+
The best way to get your bug fixed is to be as detailed as you can be about the problem.
17
+
Providing a minimal project with steps to reproduce the problem is ideal.
18
+
Here are questions you can answer before you file a bug to make sure you're not missing any important information.
19
+
20
+
1. Did you read the [documentation](https://github.com/aspnet/MicrosoftConfigurationBuilders/wiki)?
21
+
2. Did you include the snippet of broken code in the issue?
22
+
3. What are the *EXACT* steps to reproduce this problem?
23
+
4. What version Powershell are you using?
24
+
5. What version of VS (including update version) are you using?
25
+
26
+
GitHub supports [markdown](https://help.github.com/articles/github-flavored-markdown/), so when filing bugs make sure you check the formatting before clicking submit.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
+
10
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11
+
12
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copy file name to clipboardExpand all lines: README.md
+24-22Lines changed: 24 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Configuration Builders
2
2
3
-
Configuration Builders are a new feature of the full .Net Framework, introduced in .Net 4.7.1. You can read about the concept in [this blog post](http://www.msdn.com).
3
+
Configuration Builders are a new feature of the full .Net Framework, introduced in .Net 4.7.1. You can read about the concept in [this blog post](http://jeffreyfritz.com/2017/11/modern-configuration-for-asp-net-4-7-1-with-configurationbuilders/).
4
4
With this project, Microsoft is providing a basic set of Configuration Builders that should make it easy for developers to get started with the new feature. They
5
5
are also intended to address some of the basic needs of applications as they move into a container and cloud focused environment.
6
6
@@ -59,48 +59,51 @@ This is the simplest of the config builders. It draws its values from Environmen
To enable a feature similar to .Net Core's user secrets you can use this config builder. Microsoft is considering future plans to better integrate secret management
67
-
into Visual Studio, and full-framework projects would use this config builder. In order to keep external dependencies out of the picture, the actual secret file will
68
-
be xml formatted. (If you need to share a secrets.json file with Core projects, you could consider using the `SimpleJsonConfigBuilder` below.)
66
+
To enable a feature similar to .Net Core's user secrets you can use this config builder. Microsoft is adding better secrets management in future releases
67
+
of Visual Studio, and this config builder will be a part of that plan. Web Applications are the initial target for this work in Visual Studio, but this
68
+
configuration builder can be used in any full-framework project if you specify your own secrets file. (Or define the 'UserSecretsId' property in your
69
+
project file and create the raw secrets file in the correct location for reading.) In order to keep external dependencies out of the picture, the
70
+
actual secret file will be xml formatted - though this should be considered an implementation detail, and the format should not be relied upon.
71
+
(If you need to share a secrets.json file with Core projects, you could consider using the `SimpleJsonConfigBuilder` below... but as with this
72
+
builder, the json format for Core secrets is technically an implementation detail subject to change as well.)
69
73
70
74
There are three additional configuration attributes for this config builder:
71
75
*`userSecretsId` - This is the preferred method for identifying an xml secrets file. It works similar to .Net Core, which uses a 'UserSecretsId' project
72
76
property to store this identifier. (The string does not have to be a Guid. Just unique. The VS "Manage User Secrets" experience produces a Guid.) With this
73
-
attribute, the `UserSecretsConfigBuilder` will look in a well-known local location for a secrets file belonging to this identifier. One of this attribute or
74
-
the 'userSecretsFile' attribute is required.
77
+
attribute, the `UserSecretsConfigBuilder` will look in a well-known local location for a secrets file belonging to this identifier. In MSBuild environments,
78
+
the value of this attribute will be replaced with the project property $(UserSecretsId) in the output directory iff the initial value is '${UserSecretsId}'.
79
+
One of this attribute or the 'userSecretsFile' attribute is required.
75
80
*`userSecretsFile` - An optional attribute specifying the file containing the secrets. The '~' character can be used at the start to reference the app root.
76
81
One of this attribute or the 'userSecretsId' attribute is required. If both are specified, 'userSecretsFile' takes precedence.
77
-
*`ignoreMissingFile` - A simple boolean to avoid throwing exceptions if the secrets file cannot be found. The default is `true`.
82
+
*`optional` - A simple boolean to avoid throwing exceptions if the secrets file cannot be found. The default is `true`.
If your secrets are kept in Azure Key Vault, then this config builder is for you. There are four additional attributes for this config builder. The `vaultName` is
93
+
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
90
94
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
91
-
environment that works well with `Microsoft.Azure.Services.AppAuthentication`. Otherwise, the Azure Services Authentication library is used to automatically pick
92
-
up connection information from the execution environment.
95
+
environment that works magically with `Microsoft.Azure.Services.AppAuthentication`. The Azure Services Authentication library is used to automatically pick
96
+
up connection information from the execution environment if possible, but you can override that feature by providing a connection string instead.
93
97
*`vaultName` - This is a required attribute. It specifies the name of the vault in your Azure subscription from which to read key/value pairs.
94
-
*`clientId` - This is the Azure Active Directory App Id. A string representation of a GUID.
95
-
*`clientSecret` - This is the Azure Active Directory App Key. A string.
98
+
*`connectionString` - A connection string usable by [AzureServiceTokenProvider](https://docs.microsoft.com/en-us/azure/key-vault/service-to-service-authentication#connection-string-support)
96
99
*`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.
@@ -113,7 +116,7 @@ begins with 'Simple.' Think of the backing json file as a simple dictionary, rat
113
116
114
117
There are three additional attributes that can be used to configure this builder:
115
118
*`jsonFile` - A required attribute specifying the json file to draw from. The '~' character can be used at the start to reference the app root.
116
-
*`ignoreMissingFile` - A simple boolean to avoid throwing exceptions if the secrets file cannot be found. The default is `true`.
119
+
*`optional` - A simple boolean to avoid throwing exceptions if the json file cannot be found. The default is `true`.
117
120
*`jsonMode` - `[Flat|Sectional]`. 'Flat' is the default.
118
121
- This attribute requires a little more explanation. It says above to think of the json file as a single flat key/value source. This is the usual that applies to other key/value config builders like `EnvironmentConfigBuilder` and `AzureKeyVaultConfigBuilder` because those sources provide no other option. If the `SimpleJsonConfigBuilder` is configured in 'Sectional' mode, then the json file is conceptually divided just at the top level into multiple simple dictionaries. Each one of those dictionaries will only be applied to the config section that matches the top-level property name attached to them. For example:
119
122
```json
@@ -158,7 +161,6 @@ public class CustomConfigBuilder : KeyValueConfigBuilder
158
161
```
159
162
160
163
## Blog Posts
161
-
[Insert](sldfj)
162
-
[Blog Posts](sldkfjs)
163
-
[And References](sldkfj)
164
-
[Here](lskdjf)
164
+
[.Net Framework 4.7.1 ASP.NET and Configuration features](https://blogs.msdn.microsoft.com/dotnet/2017/09/13/net-framework-4-7-1-asp-net-and-configuration-features/)
165
+
[Modern Configuration for ASP.NET 4.7.1 with ConfigurationBuilders](http://jeffreyfritz.com/2017/11/modern-configuration-for-asp-net-4-7-1-with-configurationbuilders/)
166
+
[Service-to-service authentication to Azure Key Vault using .NET](https://docs.microsoft.com/en-us/azure/key-vault/service-to-service-authentication#connection-string-support)
0 commit comments