Dut00.AppInfo.ConnectionStrings 0.1.0-preview.5

This is a prerelease version of Dut00.AppInfo.ConnectionStrings.
dotnet add package Dut00.AppInfo.ConnectionStrings --version 0.1.0-preview.5
                    
NuGet\Install-Package Dut00.AppInfo.ConnectionStrings -Version 0.1.0-preview.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dut00.AppInfo.ConnectionStrings" Version="0.1.0-preview.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dut00.AppInfo.ConnectionStrings" Version="0.1.0-preview.5" />
                    
Directory.Packages.props
<PackageReference Include="Dut00.AppInfo.ConnectionStrings" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dut00.AppInfo.ConnectionStrings --version 0.1.0-preview.5
                    
#r "nuget: Dut00.AppInfo.ConnectionStrings, 0.1.0-preview.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dut00.AppInfo.ConnectionStrings@0.1.0-preview.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dut00.AppInfo.ConnectionStrings&version=0.1.0-preview.5&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Dut00.AppInfo.ConnectionStrings&version=0.1.0-preview.5&prerelease
                    
Install as a Cake Tool

Dut00.AppInfo.ConnectionStrings

Extends the Dut00.AppInfo /appinfo endpoint with the application's connection strings, with secrets masked.

using Dut00.AppInfo;
using Dut00.AppInfo.ConnectionStrings;

builder.Services.AddAppInfo()
    .WithConnectionStrings();

var app = builder.Build();
app.MapAppInfo();

Adds this key, read from the ConnectionStrings configuration section:

{
  "ConnectionStrings": {
    "Billing": "Data Source=db.company.com;Initial Catalog=Billing;User ID=***;Password=***"
  }
}

How masking works

Each value is parsed with DbConnectionStringBuilder. Masking fails closed: when in doubt, the whole value becomes ***.

  • A key is masked when it contains a sensitive word, ignoring case. The defaults are Password, Pwd, PSW, Pass, User ID, UID, User, Username, Key, AccountKey, SharedAccessKey, SharedAccessSignature, AccessKey, ApiKey, Secret, Token, Credential, Authorization, Signature, Bearer. So Password also covers Proxy Password, Key covers AppKey and private_key, and short words also mask harmless keys such as User Instance.
  • A value is masked when it hides a secret: a nested pair such as Extended Properties="...;Password=xyz", anything with @ (credentials such as user:pass@host), or an address with a query or fragment, such as a SAS URL in BlobEndpoint, even if it isn't a valid URI.
  • Over-masking is accepted: for example Application Name=app@prod or SQLite's Data Source=file:app.db?mode=memory&cache=shared are masked too.
  • The whole value is masked when it can't be parsed, is URI-style (postgres://user:pass@host/db, mongodb://...), isn't in key=value; format (for example a Redis string like host:6379,password=...), or has an ODBC braced value ({...}, with }} escapes) that was split by a ; inside it.
  • Not detected: a secret in the path of an address (such as a webhook token), or a secret under a key name no sensitive word covers (such as Sas= or Cert=). Add such keys to SensitiveKeys, or don't keep these values under ConnectionStrings.
  • Empty values are shown as-is. Key casing and order are kept; spacing and quoting may be normalized.

Add your own sensitive words or change the mask:

builder.Services.AddAppInfo()
    .WithConnectionStrings(o =>
    {
        o.SensitiveKeys.Add("Tenant");
        o.Mask = "<hidden>";
    });

Masking reduces risk; it doesn't make the endpoint public-safe. Protect it, for example with app.MapAppInfo().RequireAuthorization().

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.5 42 10/4/2026
0.1.0-preview.4 43 10/4/2026