// ----------------------------------------------------------------------------- // IBundleDataProvider.cs // Sprint: SPRINT_20260106_003_003_EVIDENCE_export_bundle // Task: T008, T009, T010, T011 // Description: Interface for loading bundle data from storage. // ----------------------------------------------------------------------------- using StellaOps.EvidenceLocker.Export.Models; namespace StellaOps.EvidenceLocker.Export; /// /// Provides access to bundle data from the evidence locker storage. /// public interface IBundleDataProvider { /// /// Loads all data for a bundle. /// /// Bundle ID. /// Optional tenant ID for access control. /// Cancellation token. /// Bundle data or null if not found. Task LoadBundleDataAsync(string bundleId, string? tenantId, CancellationToken cancellationToken); } /// /// Complete data for a bundle export. /// public sealed record BundleData { /// /// Bundle metadata. /// public required BundleMetadata Metadata { get; init; } /// /// SBOM artifacts. /// public IReadOnlyList Sboms { get; init; } = []; /// /// VEX statement artifacts. /// public IReadOnlyList VexStatements { get; init; } = []; /// /// Attestation artifacts. /// public IReadOnlyList Attestations { get; init; } = []; /// /// Policy verdict artifacts. /// public IReadOnlyList PolicyVerdicts { get; init; } = []; /// /// Scan result artifacts. /// public IReadOnlyList ScanResults { get; init; } = []; /// /// Public keys for verification. /// public IReadOnlyList PublicKeys { get; init; } = []; } /// /// An artifact to include in the bundle. /// public sealed record BundleArtifact { /// /// File name within the category directory. /// public required string FileName { get; init; } /// /// Artifact content bytes. /// public required byte[] Content { get; init; } /// /// MIME type. /// public required string MediaType { get; init; } /// /// Format version (e.g., "cyclonedx-1.7"). /// public string? Format { get; init; } /// /// Subject of the artifact. /// public string? Subject { get; init; } } /// /// Public key data for bundle export. /// public sealed record BundleKeyData { /// /// File name for the key. /// public required string FileName { get; init; } /// /// PEM-encoded public key. /// public required string PublicKeyPem { get; init; } /// /// Key identifier. /// public required string KeyId { get; init; } /// /// Key algorithm. /// public required string Algorithm { get; init; } /// /// Key purpose. /// public string Purpose { get; init; } = "signing"; /// /// Key issuer. /// public string? Issuer { get; init; } /// /// Key expiration. /// public DateTimeOffset? ExpiresAt { get; init; } }