74 lines
2.8 KiB
C#
74 lines
2.8 KiB
C#
using System.Collections.Immutable;
|
|
|
|
namespace StellaOps.AirGap.Bundle.Models;
|
|
|
|
/// <summary>
|
|
/// Manifest for an offline bundle, inventorying all components with content digests.
|
|
/// Used for integrity verification and completeness checking in air-gapped environments.
|
|
/// Sprint: SPRINT_20260118_018 (TASK-018-001) - Updated to v2.0.0
|
|
/// </summary>
|
|
public sealed record BundleManifest
|
|
{
|
|
public required string BundleId { get; init; }
|
|
public string SchemaVersion { get; init; } = "2.0.0";
|
|
public required string Name { get; init; }
|
|
public required string Version { get; init; }
|
|
public required DateTimeOffset CreatedAt { get; init; }
|
|
public DateTimeOffset? ExpiresAt { get; init; }
|
|
public required ImmutableArray<FeedComponent> Feeds { get; init; }
|
|
public required ImmutableArray<PolicyComponent> Policies { get; init; }
|
|
public required ImmutableArray<CryptoComponent> CryptoMaterials { get; init; }
|
|
public ImmutableArray<CatalogComponent> Catalogs { get; init; } = [];
|
|
public RekorSnapshot? RekorSnapshot { get; init; }
|
|
public ImmutableArray<CryptoProviderComponent> CryptoProviders { get; init; } = [];
|
|
public ImmutableArray<RuleBundleComponent> RuleBundles { get; init; } = [];
|
|
public long TotalSizeBytes { get; init; }
|
|
public string? BundleDigest { get; init; }
|
|
|
|
/// <summary>
|
|
/// Export mode indicator: "light" or "full".
|
|
/// Sprint: SPRINT_20260122_040 (040-04)
|
|
/// </summary>
|
|
public string? ExportMode { get; init; }
|
|
|
|
// -------------------------------------------------------------------------
|
|
// v2.0.0 Additions - Sprint: SPRINT_20260118_018 (TASK-018-001)
|
|
// -------------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// Image reference this bundle is for (advisory-specified format).
|
|
/// Example: "registry.example.com/app@sha256:..."
|
|
/// </summary>
|
|
public string? Image { get; init; }
|
|
|
|
/// <summary>
|
|
/// List of artifacts in the bundle with path and type information.
|
|
/// </summary>
|
|
public ImmutableArray<BundleArtifact> Artifacts { get; init; } = [];
|
|
|
|
/// <summary>
|
|
/// Verification section with keys and expectations.
|
|
/// </summary>
|
|
public BundleVerifySection? Verify { get; init; }
|
|
|
|
/// <summary>
|
|
/// Canonical manifest hash (sha256 over canonical JSON).
|
|
/// </summary>
|
|
public string? CanonicalManifestHash { get; init; }
|
|
|
|
/// <summary>
|
|
/// Subject digests for the bundle target.
|
|
/// </summary>
|
|
public BundleSubject? Subject { get; init; }
|
|
|
|
/// <summary>
|
|
/// Timestamp entries for offline verification.
|
|
/// </summary>
|
|
public ImmutableArray<TimestampEntry> Timestamps { get; init; } = [];
|
|
|
|
/// <summary>
|
|
/// Rekor proof entries for offline verification.
|
|
/// </summary>
|
|
public ImmutableArray<RekorProofEntry> RekorProofs { get; init; } = [];
|
|
}
|