Interface ISubjectEraser
- Namespace
- Stratara.Abstractions.Erasure
- Assembly
- Stratara.Abstractions.dll
Erases a subject across every plane the framework holds its data in, in an order that leaves nothing unreachable before it has been removed.
public interface ISubjectEraser
- Extension Methods
Remarks
What it covers. API keys, scoped settings, directory memberships and their active-tenant selections, and key material — the last of these making any data encrypted under the subject's keys unrecoverable.
What it does not cover, and why it matters. Read models a consumer's own
projections built are unknown to the framework and remain the consumer's responsibility. Data in
the event stream that is not protected by a scoped key is not shredded by removing a key,
because there is no key to remove. The command audit log and the outbox both carry a session
context naming the subject and are deliberately left alone: the audit log is the evidence that
the erasure happened, and retaining it is a decision only the consumer can take.
System-wide (Confidential) key material is never subject-scoped and is never erased.
Methods
EraseTenantAsync(Guid, CancellationToken)
Erases one tenant across every plane, including its members' tenant-scoped data.
Task<ErasureReport> EraseTenantAsync(Guid tenantId, CancellationToken cancellationToken = default)
Parameters
tenantIdGuidThe tenant to erase.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<ErasureReport>
What each plane covered, once every plane has succeeded.
Exceptions
- ErasureIncompleteException
Thrown when one plane's sweep fails; the erasure stops there.
EraseUserAsync(Guid, CancellationToken)
Erases one user across every plane, in every tenant it is a member of.
Task<ErasureReport> EraseUserAsync(Guid userId, CancellationToken cancellationToken = default)
Parameters
userIdGuidThe user to erase.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<ErasureReport>
What each plane covered, once every plane has succeeded.
Exceptions
- ErasureIncompleteException
Thrown when one plane's sweep fails; the erasure stops there.