Skip to content
Tracon

TraconContentProtectionOptions

Namespace Tracon · Assembly Tracon.Core.dll

Settings for at-rest content protection.

public sealed class TraconContentProtectionOptions

objectTraconContentProtectionOptions

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Always registered, but TraconContentProtectionOptions.Enabled defaults to false: without AddContentProtection(...), nothing is encrypted and every store behaves exactly as it does today.

TraconContentProtectionOptions.Keys never carries a key’s raw material — it maps a key id to the name of another configuration key the raw value is read from at run time, the same indirection Tracon uses elsewhere for provider credentials. The example below shows both: the ContentProtection section names ContentProtectionKeys:2026-08, and that key holds the actual value — set through dotnet user-secrets, never committed to appsettings.json.

"Tracon": { "ContentProtection": {
"Enabled": true,
"ActiveKeyId": "2026-08",
"Keys": { "2026-08": "ContentProtectionKeys:2026-08" }
}},
"ContentProtectionKeys": { "2026-08": "<32-byte base64 key>" }
public TraconContentProtectionOptions()

The configuration section this type binds to.

public const string SectionName = "Tracon:ContentProtection"

string

Gets or sets the key id new writes are protected with.

public string? ActiveKeyId { get; set; }

string?

Must be a key of TraconContentProtectionOptions.Keys when TraconContentProtectionOptions.Enabled is true.

Gets the set of columns protection applies to. Defaults to all of them.

public ISet<ProtectedColumn> Columns { get; }

ISet<ProtectedColumn>

Gets or sets a value indicating whether the content protection ring is added to the pipeline.

public bool Enabled { get; set; }

bool

Gets the map from a key id to the name of the configuration key its raw material is read from.

public IDictionary<string, string> Keys { get; }

IDictionary<string, string>

An entry stays here for as long as any stored value still carries its key id — removing it makes those values unreadable (TraconException, naming the missing key id).