Skip to content

Commit 294b9d5

Browse files
committed
ropc changes
1 parent 63ca30c commit 294b9d5

File tree

6 files changed

+28
-3
lines changed

6 files changed

+28
-3
lines changed

aspnetcore/fundamentals/configuration/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ Configuration data guidelines:
158158
* Never store passwords or other sensitive data in configuration provider code or in plain text configuration files. The [Secret Manager](xref:security/app-secrets) tool can be used to store secrets in development.
159159
* Don't use production secrets in development or test environments.
160160
* Specify secrets outside of the project so that they can't be accidentally committed to a source code repository.
161+
* Avoid the use of passwords in production apps; for more information, see [Secure authentication flows](xref:security/index#secure-authentication-flows).
161162

162163
By [default](#default), the user secrets configuration source is registered after the JSON configuration sources. Therefore, user secrets keys take precedence over keys in `appsettings.json` and `appsettings.{Environment}.json`.
163164

164165
For more information on storing passwords or other sensitive data:
165166

166167
* <xref:fundamentals/environments>
167168
* <xref:security/app-secrets>: Includes advice on using environment variables to store sensitive data. The Secret Manager tool uses the [File configuration provider](#fcp) to store user secrets in a JSON file on the local system.
168-
169-
[Azure Key Vault](https://azure.microsoft.com/services/key-vault/) safely stores app secrets for ASP.NET Core apps. For more information, see <xref:security/key-vault-configuration>.
169+
* [Azure Key Vault](https://azure.microsoft.com/services/key-vault/) safely stores app secrets for ASP.NET Core apps. For more information, see <xref:security/key-vault-configuration>.
170170

171171
<a name="evcp"></a>
172172

@@ -408,6 +408,8 @@ The preferred way to read hierarchical configuration data is using the options p
408408

409409
## Configuration keys and values
410410

411+
[!INCLUDE [managed-identities](~/includes/managed-identities-conn-strings.md)]
412+
411413
Configuration keys:
412414

413415
* Are case-insensitive. For example, `ConnectionString` and `connectionstring` are treated as equivalent keys.
@@ -459,6 +461,8 @@ The preceding sequence of providers is used in the [default configuration](#defa
459461

460462
### Connection string prefixes
461463

464+
[!INCLUDE [managed-identities](~/includes/managed-identities-conn-strings.md)]
465+
462466
The Configuration API has special processing rules for four connection string environment variables. These connection strings are involved in configuring Azure connection strings for the app environment. Environment variables with the prefixes shown in the table are loaded into the app with the [default configuration](#default) or when no prefix is supplied to `AddEnvironmentVariables`.
463467

464468
| Connection string prefix | Provider |

aspnetcore/fundamentals/configuration/index/includes/index3-5.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ Custom configuration providers aren't required to implement array binding.
149149

150150
## Custom configuration provider
151151

152+
[!INCLUDE [managed-identities](~/includes/managed-identities-conn-strings.md)]
153+
152154
The sample app demonstrates how to create a basic configuration provider that reads configuration key-value pairs from a database using [Entity Framework (EF)](/ef/core/).
153155

154156
The provider has the following characteristics:

aspnetcore/fundamentals/configuration/index/includes/index6.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ Configuration data guidelines:
135135
* Never store passwords or other sensitive data in configuration provider code or in plain text configuration files. The [Secret Manager](xref:security/app-secrets) tool can be used to store secrets in development.
136136
* Don't use production secrets in development or test environments.
137137
* Specify secrets outside of the project so that they can't be accidentally committed to a source code repository.
138+
* Avoid the use of passwords in production apps; for more information, see [Secure authentication flows](xref:security/index#secure-authentication-flows).
138139

139140
By [default](#default), the user secrets configuration source is registered after the JSON configuration sources. Therefore, user secrets keys take precedence over keys in `appsettings.json` and `appsettings.{Environment}.json`.
140141

@@ -385,6 +386,8 @@ The preferred way to read hierarchical configuration data is using the options p
385386

386387
## Configuration keys and values
387388

389+
[!INCLUDE [managed-identities](~/includes/managed-identities-conn-strings.md)]
390+
388391
Configuration keys:
389392

390393
* Are case-insensitive. For example, `ConnectionString` and `connectionstring` are treated as equivalent keys.
@@ -436,6 +439,8 @@ The preceding sequence of providers is used in the [default configuration](#defa
436439

437440
### Connection string prefixes
438441

442+
[!INCLUDE [managed-identities](~/includes/managed-identities-conn-strings.md)]
443+
439444
The Configuration API has special processing rules for four connection string environment variables. These connection strings are involved in configuring Azure connection strings for the app environment. Environment variables with the prefixes shown in the table are loaded into the app with the [default configuration](#default) or when no prefix is supplied to `AddEnvironmentVariables`.
440445

441446
| Connection string prefix | Provider |

aspnetcore/fundamentals/configuration/index/includes/index7.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ Configuration data guidelines:
140140
* Never store passwords or other sensitive data in configuration provider code or in plain text configuration files. The [Secret Manager](xref:security/app-secrets) tool can be used to store secrets in development.
141141
* Don't use production secrets in development or test environments.
142142
* Specify secrets outside of the project so that they can't be accidentally committed to a source code repository.
143+
* Avoid the use of passwords in production apps; for more information, see [Secure authentication flows](xref:security/index#secure-authentication-flows).
143144

144145
By [default](#default), the user secrets configuration source is registered after the JSON configuration sources. Therefore, user secrets keys take precedence over keys in `appsettings.json` and `appsettings.{Environment}.json`.
145146

@@ -390,6 +391,8 @@ The preferred way to read hierarchical configuration data is using the options p
390391

391392
## Configuration keys and values
392393

394+
[!INCLUDE [managed-identities](~/includes/managed-identities-conn-strings.md)]
395+
393396
Configuration keys:
394397

395398
* Are case-insensitive. For example, `ConnectionString` and `connectionstring` are treated as equivalent keys.
@@ -441,6 +444,8 @@ The preceding sequence of providers is used in the [default configuration](#defa
441444

442445
### Connection string prefixes
443446

447+
[!INCLUDE [managed-identities](~/includes/managed-identities-conn-strings.md)]
448+
444449
The Configuration API has special processing rules for four connection string environment variables. These connection strings are involved in configuring Azure connection strings for the app environment. Environment variables with the prefixes shown in the table are loaded into the app with the [default configuration](#default) or when no prefix is supplied to `AddEnvironmentVariables`.
445450

446451
| Connection string prefix | Provider |

aspnetcore/fundamentals/configuration/options.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ when updating this article -->
1717

1818
:::moniker range=">= aspnetcore-7.0"
1919

20-
By [Rick Anderson](https://twitter.com/RickAndMSFT).
20+
By [Rick Anderson](https://twitter.com/RickAndMSFT)
21+
2122

2223
The options pattern uses classes to provide strongly typed access to groups of related settings. When [configuration settings](xref:fundamentals/configuration/index) are isolated by scenario into separate classes, the app adheres to two important software engineering principles:
2324

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
author: tdykstra
3+
ms.author: tdykstra
4+
ms.date: 10/16/2024
5+
ms.topic: include
6+
---
7+
> [!WARNING]
8+
> This article shows the use of connection strings. With a local database the user doesn't have to be authenticated, but in production, connection strings sometimes include a password to authenticate. A resource owner password credential (ROPC) is a security risk that should be avoided in production databases. Production apps should use the most secure authentication flow available. For more information on authentication for apps deployed to test or production non-local environments, see [Secure authentication flows](xref:security/index#secure-authentication-flows).

0 commit comments

Comments
 (0)