Class ErasureCertificatePayload
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
Every claim an erasure certificate makes, and the whole of what its signature covers.
public sealed record ErasureCertificatePayload : IEquatable<ErasureCertificatePayload>
- Inheritance
-
ErasureCertificatePayload
- Implements
- Inherited Members
Remarks
This type exists so that "what the certificate asserts" and "the signature over it" cannot drift apart. The signature is computed over a canonical serialization of this payload in its entirety — no field list, no exclusions. A claim added here is therefore covered by construction, because there is nowhere else for a claim to live.
Why it is a separate type rather than a projection of the certificate. A projection has to be written by hand, so a claim added to the certificate is silently absent from the signed input until someone remembers to extend the projection — the certificate still verifies while asserting something nobody signed. Splitting the payload from the envelope removes the thing that has to be remembered.
Version is INSIDE the payload, deliberately. An unsigned version marker is worse than no version marker: it lets whoever holds the document choose which verification scheme a verifier applies to it, which is a downgrade oracle. Signing it binds the document to its own format.
Determinism is part of the contract. Every member below is either a scalar or an ordered
IReadOnlyList whose order is part of the value — no dictionary or set, whose enumeration order is
not guaranteed. A signature over a non-deterministically serialized payload would fail verification
intermittently, which is a worse defect than the one this type fixes.
Properties
CertificateId
Gets the certificate identifier.
public required Guid CertificateId { get; init; }
Property Value
CompletedAt
Gets the instant the erasure completed.
public required DateTimeOffset CompletedAt { get; init; }
Property Value
DataSubjectReference
Gets the anonymized (hashed) reference to the data subject.
public required string DataSubjectReference { get; init; }
Property Value
Exceptions
Gets the data that was lawfully retained rather than erased, with the basis for each.
public IReadOnlyList<ErasureException> Exceptions { get; init; }
Property Value
GeneratedAt
Gets the instant the certificate was generated.
public DateTimeOffset GeneratedAt { get; init; }
Property Value
LegalBasis
Gets the legal basis under which the erasure was performed.
public required ErasureLegalBasis LegalBasis { get; init; }
Property Value
Method
Gets the method by which the data was erased.
public required ErasureMethod Method { get; init; }
Property Value
RequestId
Gets the identifier of the erasure request this certificate attests.
public required Guid RequestId { get; init; }
Property Value
RequestReceivedAt
Gets the instant the erasure request was received.
public required DateTimeOffset RequestReceivedAt { get; init; }
Property Value
RetainUntil
Gets the instant until which the certificate must be retained.
public required DateTimeOffset RetainUntil { get; init; }
Property Value
Summary
Gets what was erased.
public required ErasureSummary Summary { get; init; }
Property Value
UnreachedData
Places the erasure did NOT reach, for which no lawful basis is claimed.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IReadOnlyList<UnreachedDataLocation>? UnreachedData { get; init; }
Property Value
Remarks
A sibling of Exceptions and never mixed with it. Exceptions records data lawfully retained, each entry carrying its basis; this records data merely not reached. A location appears in one or the other, never both.
NULL, not empty, and omitted from the signed form when null — this is load-bearing. The canonical form is what gets signed, and verification recomputes it from the DESERIALIZED payload. The serializer context emits defaulted properties, so a property that always serialized would change the canonical bytes of every certificate issued before this property existed and make each of them verify as a forgery. Being null-by-default and ignored when null, this property is absent from the canonical form of exactly those certificates, so their signatures still verify.
Consequence for anyone adding a property here: the same care applies. Defaulting to an empty collection would have broken every signature in the field.
Verification
Gets the verification results recorded for the erasure.
public required VerificationSummary Verification { get; init; }
Property Value
Version
Gets the certificate format version.
public string Version { get; init; }
Property Value
- string
The format version. Defaults to
"2.0".
Remarks
2.0 is the first version whose signature covers the certificate's claims. A 1.0 certificate carried a signature over three identity fields only — the request id, the subject hash and the completion instant — so every claim on it could be altered while the signature still authenticated. The version lives in the signed payload precisely so a verifier cannot be steered to the weaker scheme by a document that claims to be older than it is.