Table of Contents

Interface IErasureService

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

Service for processing GDPR Article 17 erasure requests (Right to be Forgotten).

public interface IErasureService

Remarks

This service implements cryptographic erasure by deleting encryption keys, rendering all data encrypted with those keys irrecoverable. This approach provides: - Mathematically provable data destruction - Verifiable compliance evidence - Integration with existing key hierarchy

The service supports a configurable grace period (default 72 hours) before key deletion to allow for cancellation of mistaken requests and legal hold integration.

Methods

CancelErasureAsync(Guid, string, string, CancellationToken)

Cancels a pending erasure request (only during grace period).

Task<bool> CancelErasureAsync(Guid requestId, string reason, string cancelledBy, CancellationToken cancellationToken)

Parameters

requestId Guid

The erasure request tracking ID.

reason string

Cancellation reason for audit trail.

cancelledBy string

Identity of the person/system cancelling the request.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<bool>

True if cancelled successfully, false if request not found or already executed.

Exceptions

InvalidOperationException

Thrown when request has already been executed.

GenerateCertificateAsync(Guid, CancellationToken)

Generates a compliance certificate for a completed erasure request.

Task<ErasureCertificate> GenerateCertificateAsync(Guid requestId, CancellationToken cancellationToken)

Parameters

requestId Guid

The erasure request tracking ID.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<ErasureCertificate>

The signed certificate recording the request. It is a record of the request, not proof that the data was disposed of: the evidence of disposal is the key-management service's record of each key deletion.

Exceptions

InvalidOperationException

Thrown when request is not completed.

KeyNotFoundException

Thrown when request is not found.

GetStatusAsync(Guid, CancellationToken)

Gets the current status of an erasure request.

Task<ErasureStatus?> GetStatusAsync(Guid requestId, CancellationToken cancellationToken)

Parameters

requestId Guid

The erasure request tracking ID.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<ErasureStatus>

Current status of the erasure request, or null if not found.

RequestErasureAsync(ErasureRequest, CancellationToken)

Submits an erasure request for a data subject.

Task<ErasureResult> RequestErasureAsync(ErasureRequest request, CancellationToken cancellationToken)

Parameters

request ErasureRequest

The erasure request details.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<ErasureResult>

Erasure request result with tracking ID and status.

Exceptions

ArgumentNullException

Thrown when request is null.

ErasureException

Thrown when the request cannot be processed.