Goldpath.DataProtection 0.1.0-preview.8

This is a prerelease version of Goldpath.DataProtection.
dotnet add package Goldpath.DataProtection --version 0.1.0-preview.8
                    
NuGet\Install-Package Goldpath.DataProtection -Version 0.1.0-preview.8
                    
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="Goldpath.DataProtection" Version="0.1.0-preview.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Goldpath.DataProtection" Version="0.1.0-preview.8" />
                    
Directory.Packages.props
<PackageReference Include="Goldpath.DataProtection" />
                    
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 Goldpath.DataProtection --version 0.1.0-preview.8
                    
#r "nuget: Goldpath.DataProtection, 0.1.0-preview.8"
                    
#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 Goldpath.DataProtection@0.1.0-preview.8
                    
#: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=Goldpath.DataProtection&version=0.1.0-preview.8&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Goldpath.DataProtection&version=0.1.0-preview.8&prerelease
                    
Install as a Cake Tool

Goldpath.DataProtection

Ring B data protection: classify a property as personal/sensitive ONCE and every sink masks it consistently — audit change rows, redacted logging, Mediant audit patterns. Masking, not encryption: nothing here changes what is stored in YOUR columns, only what leaks into observability and audit surfaces.

Getting started

builder.AddGoldpathDataProtection();

public class Customer
{
    [GoldpathPersonalData]                    // GDPR-relevant identity data
    public string? NationalId { get; set; }

    [GoldpathSensitiveData]                   // financial / health / confidential
    public string? Salary { get; set; }
}

With Goldpath.AuditTrail enabled, change rows for classified properties arrive masked (***) while every other property keeps full old→new values — no configuration, the modules find each other through the IGoldpathDataProtector seam.

Configuration

builder.AddGoldpathDataProtection(o =>
{
    // Legacy/scaffolded entities whose source must not be touched:
    o.Catalog(c => c.Classify<LegacyCustomer>(x => x.TaxNumber, GoldpathDataClass.Personal));

    // Pseudonymization instead of erasure — correlation survives, the value doesn't:
    o.UseHmacRedaction(builder.Configuration["Goldpath:DataProtection:HmacKey"]!);
});

Manifest: features.dataProtection: { mode: annotate|catalog|both, redactor: erase|hmac, auditMasking: true }. Catalog entries win over annotations on the same member.

Advanced

  • Redaction is composed from Microsoft.Extensions.Compliance.Redaction (ADR-0003): the default GoldpathErasingRedactor yields a fixed *** token (visible in audit rows, reveals nothing — not even length); HMAC mode uses the built-in HmacRedactor.
  • Log redaction: the Goldpath attributes ARE Microsoft DataClassificationAttributes, so the MEL enrichment path (builder.Logging.EnableRedaction() + [LogProperties]) redacts them natively — one annotation, both sinks.
  • Mediant alignment: properties carrying Mediant's [SensitiveData] are recognized by name (no hard dependency); catalog-declared names are fed into Mediant's SensitivePatterns so command-level audit masks the same members.
  • AuditTrail NamesOnly remains the blunt global fallback; per-property masking is the recommended posture (values stay useful, PII stays out).
  • Key rotation (HMAC): bump HmacKeyId with the new key; old hashes stop correlating with new ones — by design. Runbook in ops/.

Providers

Not applicable — sinks consume the IGoldpathDataProtector seam; absent module, absent service, unmasked values (compile-time composition).

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 was computed.  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.8 83 9/7/2026
0.1.0-preview.7 99 9/1/2026
0.1.0-preview.6 349 8/4/2026
0.1.0-preview.5 90 7/28/2026
0.1.0-preview.4 82 7/27/2026
0.1.0-preview.3 67 7/25/2026
0.1.0-preview.2 69 7/13/2026
0.1.0-preview.1 105 7/13/2026