-
Notifications
You must be signed in to change notification settings - Fork 25.1k
ROPC remediation - more files with connection strings #33990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including password here isn't required, as it and the other parts of the connection string were there just to give an impression of what an Azure Redis Cache connection string looks like.
|
|
||
| ```dotnetcli | ||
| dotnet user-secrets set "DbPassword" "pass123" | ||
| dotnet user-secrets set "DbPassword" "`<secret value>`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For bonus points, replace "<secret value>"
with
"\x00``<secret value>``\" which should throw an error, although maybe <secret value> will throw. We don't want them copy/paste something that works.
| [!code-json[](~/security/app-secrets/samples/3.x/UserSecrets/appsettings-unsecure.json?highlight=3)] | ||
|
|
||
| A more secure approach is to store the password as a secret. For example: | ||
| Storing passwords in plain text is insecure. For example, a database connection string stored in `appsettings.json` should not include a password. Instead, store the password as a secret, and include the password in the connection string at runtime. For example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to tell them never store secrets in a config file (for example appsettings.json) ... checked in source.
Fixes #33991
Internal previews