namespace OpenWaf.Domain.Security; /// /// An address or CIDR that must always get through — the operator's own /// office, the monitoring probe, a customer whose NAT was caught once. /// Evaluated before every other pillar, and it survives the automatic-ban /// toggle being off, because its whole purpose is to be the exemption path /// that cannot be switched away. /// public sealed class AllowEntry { public long Id { get; init; } /// Single address ("203.0.113.7") or CIDR ("198.51.100.0/24"). public string Match { get; set; } = string.Empty; public string? Note { get; set; } public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow; public DateTimeOffset? ExpiresAt { get; set; } public bool IsLive(DateTimeOffset now) => ExpiresAt is null || ExpiresAt > now; }