Interface IComplianceStore
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
Provides persistence for compliance records including consent, erasure logs, and subject access request tracking.
public interface IComplianceStore
Remarks
Implementations should provide durable storage for compliance artifacts required by GDPR and other regulations. Postgres and MongoDB provider packages implement this interface; a host on another store supplies its own implementation.
Tenant confinement. Every member here is confined to the ambient tenant established for this
store instance: GetConsentAsync(string, string, CancellationToken) returns none of another tenant's consent records and
resolves the caller's own when it exists, and every write lands in the caller's own partition. Which
mechanism a given provider uses to hold that boundary is declared by its capability marker —
ITenantScopingCapability<TContract> for a store that reads an ambient tenant — and the
package's own ARCHITECTURE.md states the falsifiable guarantee and how it is verified. A store
presenting no marker is not confined by the framework.
Methods
GetConsentAsync(string, string, CancellationToken)
Gets the current consent status for a subject and purpose.
Task<ConsentRecord?> GetConsentAsync(string subjectId, string purpose, CancellationToken cancellationToken)
Parameters
subjectIdstringThe data subject identifier.
purposestringThe processing purpose.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<ConsentRecord>
The consent record, or null if no consent exists.
Remarks
Confined to the ambient tenant established for this store instance: a consent record stored under
another tenant for the same subjectId and purpose is reported
as not found, the same as one that was never recorded.
StoreConsentAsync(ConsentRecord, CancellationToken)
Stores a consent record.
Task StoreConsentAsync(ConsentRecord record, CancellationToken cancellationToken)
Parameters
recordConsentRecordThe consent record to store.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task
A task representing the asynchronous operation.
StoreErasureLogAsync(string, string, DateTimeOffset, CancellationToken)
Stores an erasure log entry for audit purposes.
Task StoreErasureLogAsync(string subjectId, string details, DateTimeOffset erasedAt, CancellationToken cancellationToken)
Parameters
subjectIdstringThe data subject identifier.
detailsstringDetails of the erasure operation.
erasedAtDateTimeOffsetThe timestamp of the erasure.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task
A task representing the asynchronous operation.
StoreSubjectAccessRequestAsync(SubjectAccessResult, CancellationToken)
Stores a subject access request for tracking.
Task StoreSubjectAccessRequestAsync(SubjectAccessResult result, CancellationToken cancellationToken)
Parameters
resultSubjectAccessResultThe subject access result to store.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task
A task representing the asynchronous operation.