Files
git.stella-ops.org/src/Signals/StellaOps.Signals/Options/SignalsAirGapOptions.cs
master 69c59defdc
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
feat: Implement Runtime Facts ingestion service and NDJSON reader
- Added RuntimeFactsNdjsonReader for reading NDJSON formatted runtime facts.
- Introduced IRuntimeFactsIngestionService interface and its implementation.
- Enhanced Program.cs to register new services and endpoints for runtime facts.
- Updated CallgraphIngestionService to include CAS URI in stored artifacts.
- Created RuntimeFactsValidationException for validation errors during ingestion.
- Added tests for RuntimeFactsIngestionService and RuntimeFactsNdjsonReader.
- Implemented SignalsSealedModeMonitor for compliance checks in sealed mode.
- Updated project dependencies for testing utilities.
2025-11-10 07:56:15 +02:00

50 lines
1.3 KiB
C#

using System;
namespace StellaOps.Signals.Options;
public sealed class SignalsAirGapOptions
{
public SignalsSealedModeOptions SealedMode { get; } = new();
public void Validate()
{
SealedMode.Validate();
}
}
public sealed class SignalsSealedModeOptions
{
public bool EnforcementEnabled { get; set; }
public string? EvidencePath { get; set; }
public TimeSpan MaxEvidenceAge { get; set; } = TimeSpan.FromHours(6);
public TimeSpan CacheLifetime { get; set; } = TimeSpan.FromMinutes(1);
public bool RequireEvidenceHealth { get; set; } = true;
public void Validate()
{
if (!EnforcementEnabled)
{
return;
}
if (string.IsNullOrWhiteSpace(EvidencePath))
{
throw new InvalidOperationException("Signals air-gap sealed-mode evidence path must be configured when enforcement is enabled.");
}
if (MaxEvidenceAge <= TimeSpan.Zero)
{
throw new InvalidOperationException("Signals air-gap sealed-mode max evidence age must be greater than zero.");
}
if (CacheLifetime <= TimeSpan.Zero)
{
throw new InvalidOperationException("Signals air-gap sealed-mode cache lifetime must be greater than zero.");
}
}
}