feat(agent): add Pangolin-style native installs and updates
Heimdall Gitea / Detect CI scope (pull_request) Successful in 5s
Heimdall Gitea / Build and tests (pull_request) Failing after 2m11s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 3s

This commit is contained in:
Arnaud Dartois committed 2026-10-26 11:38:29 +01:00
1 parent 13b6ee7979
commit 8d35518d1a
34 files changed
+4202 -136

No files matched your search

@@ -39,19 +39,34 @@ public class GetEffectiveAgentConfigQueryHandler
.Where(s => s.AgentId == request.AgentId && _db.AppSettings.Any(a => a.Key == s.Key && a.AgentScoped))
.ToListAsync(ct);
foreach (var s in agentSettings)
foreach (var s in agentSettings.Where(s => !string.Equals(s.Key, "autoupdateenabled", StringComparison.OrdinalIgnoreCase)))
config[s.Key] = s.Value;
var agent = await _db.Agents
.AsNoTracking()
.FirstOrDefaultAsync(a => a.Id == request.AgentId, ct)
.ConfigureAwait(false);
if (agent is not null)
{
var siteAutoUpdate = await _db.Sites
.AsNoTracking()
.Where(s => s.Id == agent.SiteId)
.Select(s => s.AutoUpdateEnabled)
.FirstOrDefaultAsync(ct)
.ConfigureAwait(false);
if (siteAutoUpdate.HasValue)
config["autoupdateenabled"] = siteAutoUpdate.Value ? "true" : "false";
else if (!config.ContainsKey("autoupdateenabled"))
config["autoupdateenabled"] = "false";
}
// ── Camera credential pool (encrypted, decryptable only by the agent) ──
// The agent lives on the camera network, so it must own the authenticated
// ONVIF enrichment. The Central ships the site's credential pairs inside
// an AES-GCM envelope keyed by the agent's API key hash. The agent can
// decrypt it with its plaintext API key; nobody else can.
var agent = await _db.Agents
.AsNoTracking()
.FirstOrDefaultAsync(a => a.Id == request.AgentId, ct)
.ConfigureAwait(false);
if (agent is not null && !string.IsNullOrEmpty(agent.ApiKeyHash))
{
var credentials = await _db.SiteCredentials