Skip to main content
Table of Contents

Class SubjectEraser

Namespace
Stratara.Infrastructure.Security
Assembly
Stratara.Infrastructure.dll

Composes the framework's four erasure sweeps into one operation. See ISubjectEraser for what is covered and what deliberately is not.

public sealed class SubjectEraser : ISubjectEraser
Inheritance
SubjectEraser
Implements
Inherited Members
Extension Methods

Constructors

SubjectEraser(ITenantMembershipStore, IApiKeyStore, ISettingStore, IKeyStore)

Creates the eraser over the four stores it sweeps.

public SubjectEraser(ITenantMembershipStore memberships, IApiKeyStore apiKeys, ISettingStore settings, IKeyStore keys)

Parameters

memberships ITenantMembershipStore

The directory holding memberships and active-tenant selections.

apiKeys IApiKeyStore

The API-key store.

settings ISettingStore

The scoped-setting store.

keys IKeyStore

The key store whose scopes are shredded last.

Methods

EraseTenantAsync(Guid, CancellationToken)

Erases one tenant across every plane, including its members' tenant-scoped data.

public Task<ErasureReport> EraseTenantAsync(Guid tenantId, CancellationToken cancellationToken = default)

Parameters

tenantId Guid

The tenant to erase.

cancellationToken CancellationToken

A 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.

public Task<ErasureReport> EraseUserAsync(Guid userId, CancellationToken cancellationToken = default)

Parameters

userId Guid

The user to erase.

cancellationToken CancellationToken

A 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.