Table of Contents

Interface IAuditStore

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

Provides storage and retrieval services for audit events.

public interface IAuditStore : IAuditWriter, IAuditQuery, IServiceProvider
Inherited Members

Remarks

The audit store is responsible for: - Durable, tamper-evident storage of audit events - Efficient querying for compliance reports - Long-term retention according to policy

Implementations may use SQL Server, Postgres, append-only blob storage, or specialized audit platforms (e.g., Splunk, Datadog).

This is a composite of the focused IAuditWriter (storage) and IAuditQuery (retrieval, querying, and integrity verification) contracts. New code should depend on the narrowest interface that meets its needs.

Optional capabilities are discovered through GetService(Type), never by casting the store. A durable implementation answers for IDurableAuditStore; a volatile one answers null. Decorators MUST forward GetService to the wrapped store so the capability chain stays transparent.

Tenant confinement. StoreAsync(AuditEvent, CancellationToken) and every retrieval on IAuditQuery are confined to the ambient tenant established for this store instance: a confined query returns none of another tenant's audit events and every one of the caller's own, and a confined store cannot land under another tenant's partition. One member is deliberately outside this statement: VerifyChainIntegrityAsync(DateTimeOffset, DateTimeOffset, CancellationToken) takes no tenant argument and, on the SQL Server and PostgreSQL stores, verifies estate-wide across every tenant-and-application partition in range. Its own remarks state that scope and what a result may be used for; read them before presenting a verification result to a tenant. 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.