liveBook · Manning

Sensitive information

As explained in ASP.NET Core in Action, 3e

Sensitive data is information whose disclosure or misuse could harm a person, system, or organization.

Sensitive information includes passwords, connection strings, and API keys whose disclosure or misuse could harm a person, system, or organization. Keep these values out of appsettings.json and source control. section 10.2.3

Use separate storage approaches for development and production:

  • Store local development secrets with User Secrets outside the project folder. section 10.2.3
  • Store production secrets in environment variables rather than committed configuration files. section 10.2.3
  • Treat User Secrets and environment variables as protection against accidental commits, not encryption; consider Azure Key Vault or Vault for encrypted storage. section 10.2.3
Figure 10.5 Choose Manage User Secrets to open an editor for the User Secrets app. You can use this file to store secrets when developing your app locally. These secrets are stored outside your project folder, so they won’t be committed to source control accidentally.
CH10_F05_Lock3

Shows where local User Secrets are managed and why storing them outside the project folder helps prevent accidental source-control commits. section 10.2.3

How ASP.NET Core in Action, 3e covers it

How deep it goes
Explains secret types, storage choices, configuration loading, and security limits, but stops short of detailed encryption implementation.
Examples
Uses passwords, connection strings, API keys, appsettings.json, User Secrets, environment variables, and Azure Key Vault.
What it assumes
Assumes a nontrivial application with configuration settings and distinguishes local development from production deployment.
What you can do after
Operate/configure local and production secret storage without committing sensitive values to source control.
How it connects
Connects sensitive information with configuration, source control, environment variables, User Secrets, and Azure Key Vault.

Also explained in

Compare how 8 books explain sensitive information →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.