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
requestIdGuidThe erasure request tracking ID.
reasonstringCancellation reason for audit trail.
cancelledBystringIdentity of the person/system cancelling the request.
cancellationTokenCancellationTokenCancellation token.
Returns
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
requestIdGuidThe erasure request tracking ID.
cancellationTokenCancellationTokenCancellation 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
requestIdGuidThe erasure request tracking ID.
cancellationTokenCancellationTokenCancellation 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
requestErasureRequestThe erasure request details.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<ErasureResult>
Erasure request result with tracking ID and status.
Exceptions
- ArgumentNullException
Thrown when
requestis null.- ErasureException
Thrown when the request cannot be processed.