Interface ISoc2ComplianceService
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
Service for SOC 2 compliance management and reporting.
public interface ISoc2ComplianceService
Remarks
Core compliance operations. For audit export operations, use
GetService(Type) with typeof(ISoc2AuditExporter).
ISP Split: ExportForAuditorAsync moved to ISoc2AuditExporter to keep the core interface at or below 5 methods.
Methods
GenerateTypeIIReportAsync(DateTimeOffset, DateTimeOffset, ReportOptions, CancellationToken)
Generates a SOC 2 Type II report (period assessment).
Task<Soc2Report> GenerateTypeIIReportAsync(DateTimeOffset periodStart, DateTimeOffset periodEnd, ReportOptions options, CancellationToken cancellationToken)
Parameters
periodStartDateTimeOffsetThe start of the assessment period.
periodEndDateTimeOffsetThe end of the assessment period.
optionsReportOptionsReport generation options.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<Soc2Report>
The generated Type II report.
GenerateTypeIReportAsync(DateTimeOffset, ReportOptions, CancellationToken)
Generates a SOC 2 Type I report (point-in-time assessment).
Task<Soc2Report> GenerateTypeIReportAsync(DateTimeOffset asOfDate, ReportOptions options, CancellationToken cancellationToken)
Parameters
asOfDateDateTimeOffsetThe point-in-time date for the assessment.
optionsReportOptionsReport generation options.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<Soc2Report>
The generated Type I report.
GetComplianceStatusAsync(string?, CancellationToken)
Gets the current compliance status for all Trust Services Criteria.
Task<ComplianceStatus> GetComplianceStatusAsync(string? tenantId, CancellationToken cancellationToken)
Parameters
tenantIdstringOptional tenant filter.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<ComplianceStatus>
The current compliance status.
GetEvidenceAsync(TrustServicesCriterion, DateTimeOffset, DateTimeOffset, CancellationToken)
Gets audit evidence for a specific criterion and period.
Task<AuditEvidence> GetEvidenceAsync(TrustServicesCriterion criterion, DateTimeOffset periodStart, DateTimeOffset periodEnd, CancellationToken cancellationToken)
Parameters
criterionTrustServicesCriterionThe criterion to get evidence for.
periodStartDateTimeOffsetThe start of the evidence period.
periodEndDateTimeOffsetThe end of the evidence period.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<AuditEvidence>
The audit evidence for the criterion over the period.
Exceptions
- NotSupportedException
The implementation has no evidence store to draw on. Collecting and retaining SOC 2 evidence is the deploying organisation's responsibility; an implementation that does not gather it must throw rather than return an empty result, because an empty AuditEvidence is indistinguishable from a period in which nothing happened, and an auditor cannot tell the two apart.
GetService(Type)
Gets a sub-interface or service from this provider.
object? GetService(Type serviceType)
Parameters
serviceTypeTypeThe type of service to retrieve (e.g.,
typeof(ISoc2AuditExporter)).
Returns
ValidateCriterionAsync(TrustServicesCriterion, CancellationToken)
Validates every control that the specified criterion covers.
Task<IReadOnlyList<ControlValidationResult>> ValidateCriterionAsync(TrustServicesCriterion criterion, CancellationToken cancellationToken)
Parameters
criterionTrustServicesCriterionThe criterion whose controls are validated.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<IReadOnlyList<ControlValidationResult>>
One result per control the criterion covers. The list is empty when the criterion has no registered controls, which reports an assessment that did not run rather than one that failed.