Table of Contents

Class DataInventory

Namespace
Excalibur.Compliance
Assembly
Excalibur.Compliance.Abstractions.dll

Complete inventory of personal data for a data subject.

public sealed record DataInventory : IEquatable<DataInventory>
Inheritance
DataInventory
Implements
Inherited Members

Properties

AssociatedKeys

Gets the encryption keys associated with this data subject.

public IReadOnlyList<KeyReference> AssociatedKeys { get; init; }

Property Value

IReadOnlyList<KeyReference>

DataSubjectId

Gets the hashed data subject identifier (SHA-256 hex).

public required string DataSubjectId { get; init; }

Property Value

string

Remarks

This value should be a SHA-256 hash of the original identifier to prevent storing raw PII in compliance tables.

DeclaredCategories

Gets the data categories named by the registrations behind DeclaredLocations.

public IReadOnlyList<string> DeclaredCategories { get; init; }

Property Value

IReadOnlyList<string>

The declared categories, deduplicated, case-insensitively.

Remarks

Why this is a separate collection rather than a member of DataLocationKey. The declared-versus-discharged gate matches on table-and-field pairs deliberately: that is the granularity a registration and a contributor can each state honestly, and a contributor reporting that it erased Customers.Email has no way to know which category a registration filed it under. Adding the category to the key would make the two sides stop matching and report a false outstanding obligation on every pair whose category the contributor could not name.

What it is for. The annotated-but-undiscovered arm asks whether an annotated category is represented by any location. Before this existed it could see only DISCOVERED locations, so a category that had been registered but whose rows no contributor happened to find was reported as an uncovered annotation — the gate told the consumer to register something they had already registered.

DeclaredLocationKinds

Gets the store kind registered for each declared pair, for routing a pair to the contributor that covers its store. A pair absent from this map is Unknown and is offered to no contributor, so it stays outstanding.

public IReadOnlyDictionary<DataLocationKey, DataStoreKind> DeclaredLocationKinds { get; init; }

Property Value

IReadOnlyDictionary<DataLocationKey, DataStoreKind>

DeclaredLocations

Gets the table-and-field pairs a consumer REGISTERED as holding this subject's personal data.

public IReadOnlyList<DataLocationKey> DeclaredLocations { get; init; }

Property Value

IReadOnlyList<DataLocationKey>

Remarks

This is the obligation, and it is what coverage is judged against. It is deliberately coarser than Locations: a registration declares WHERE TO LOOK — a table and the columns that hold the subject identifier and the key — while a location is a row that was actually found. The two cannot be converted into one another without querying the consumer's own schema, so coverage is evaluated at the granularity both sides can honestly express.

An erasure may be reported complete only when every declared pair was discharged by a contributor that reported doing so. An EMPTY declared set is not a clean bill of health: it means nothing was registered, so nothing could be enumerated, and a certificate issued over it would attest to an absence of evidence rather than to erasure.

DiscoveredAt

Gets the discovery timestamp.

public DateTimeOffset DiscoveredAt { get; init; }

Property Value

DateTimeOffset

HasData

Gets whether discovery found any data.

public bool HasData { get; }

Property Value

bool

Locations

Gets the discovered data locations.

public IReadOnlyList<DataLocation> Locations { get; init; }

Property Value

IReadOnlyList<DataLocation>

Methods

Empty(string)

Creates an empty inventory.

public static DataInventory Empty(string dataSubjectId)

Parameters

dataSubjectId string

Returns

DataInventory