fix(infra): persist Data Protection keys to filesystem for Docker

- Add PersistKeysToFileSystem to /var/lib/heimdall/dp-keys so camera
  credential decryption survives container restarts
- Remove hardcoded connection string fallback, throw instead
- Add Microsoft.AspNetCore.DataProtection.Extensions dependency
This commit is contained in:
Arnaud Dartois committed 2026-07-19 19:33:10 +00:00
1 parent 3f75a20860
commit 32025eae67
5 files changed
+43 -29

No files matched your search

+11 -9
View File
@@ -4,20 +4,22 @@ using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Options;
// ── Sentry (GlitchTip) — DSN from env var, with hardcoded fallback ─
var sentryDsn = Environment.GetEnvironmentVariable("SENTRY_DSN")
?? "https://db94b9fc2f36425f9eb4b9f6f347dc73@glitchtip.tordais.cc/6";
// ── Sentry (GlitchTip) — DSN from env var only ───────────────────
var sentryDsn = Environment.GetEnvironmentVariable("SENTRY_DSN");
var builder = WebApplication.CreateSlimBuilder(args);
// ── Sentry ────────────────────────────────────────────────────────
builder.WebHost.UseSentry(options =>
if (sentryDsn is not null)
{
options.Dsn = sentryDsn;
options.MinimumBreadcrumbLevel = LogLevel.Debug;
options.MinimumEventLevel = LogLevel.Error;
options.TracesSampleRate = 0.1;
});
builder.WebHost.UseSentry(options =>
{
options.Dsn = sentryDsn;
options.MinimumBreadcrumbLevel = LogLevel.Debug;
options.MinimumEventLevel = LogLevel.Error;
options.TracesSampleRate = 0.1;
});
}
// Strongly-typed configuration with validation
builder.Services.AddOptions<AgentOptions>()