Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Validate source-adapter filters
rcourtmand6ad348dfa18
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex 662efafdca..318cf7a47d 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -100,6 +100,9 @@ Those same dedicated reads also accept governed timeline filters for changekind, source type, and source adapter, and the underlying store owns thefiltered counts so agent lifecycle routing still stays on canonicalfleet-continuity ownership instead of re-deriving resource history locally.+Invalid `sourceAdapter` values are rejected at the API boundary, so the fleet+lane continues to consume only the canonical adapter set rather than+introducing a broader compatibility escape hatch.The dedicated profile client now also routes list, schema, and validationparsing through shared response helpers in `frontend-modern/src/api/agentProfiles.ts`,so profile transport stays aligned with the governed API contract instead ofdiff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 252502f1f3..dfd0c01083 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -127,6 +127,9 @@ Those history reads now also accept governed `kind`, `sourceType`, and`sourceAdapter` query filters, and the backend store owns the correspondingfiltered counts, so the timeline contract can narrow by change class andadapter provenance without inventing a frontend-only slice of the graph.+Invalid `sourceAdapter` values are rejected at the API boundary, so the filter+contract stays aligned with the canonical adapter set rather than silently+falling back to an empty slice.The same API contract now also exposes the unified-resource control-planehistory through dedicated enterprise audit reads. The action, lifecycle, andexport history endpoints live in `internal/api/activity_audit_handlers.go` anddiff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex f95b135dd4..94ba38ff70 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -124,6 +124,9 @@ Those resource timeline reads now also accept governed kind and source-typefilters plus source-adapter filters, with filtered history counts owned by theunified-resource store so storage and recovery views can consume the samecanonical history contract without re-deriving their own timeline slices.+Invalid `sourceAdapter` values are rejected at the API boundary, which keeps+storage and recovery reads aligned with the canonical adapter set instead of+turning the timeline filter into an arbitrary free-text escape hatch.The shared unified-resource consumer hook now also preserves `capabilities`,`relationships`, `recentChanges`, `facetCounts`, `policy`, and `aiSafeSummary`fields when storage and recovery surfaces read unified resources, so thosediff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex daa0131c3f..4b203e585e 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -205,6 +205,9 @@ The same timeline and facet-bundle reads now also accept governed `kind` and`sourceType` filters, plus a governed `sourceAdapter` filter for adapter-levelprovenance drill-down, so history can narrow by canonical change class andintegration source while the store still owns the filtered total counts.+Invalid `sourceAdapter` values are rejected at the API boundary, keeping the+timeline query contract aligned with the canonical adapter set instead of+silently accepting arbitrary strings.The Connected infrastructure settings surface now also depends on a backendowned `connectedInfrastructure` projection derived from unified resources plusreporting-ignore state. That projection is now also the only v6 clientdiff --git a/internal/api/contract_test.go b/internal/api/contract_test.goindex 5b496baade..bb4b0f64dd 100644--- a/internal/api/contract_test.go+++ b/internal/api/contract_test.go@@ -6,6 +6,7 @@ import ("encoding/json""net/http""net/http/httptest"+ "net/url""os""path/filepath""reflect"@@ -3849,6 +3850,15 @@ func TestContract_ResourceFacetsJSONSnapshot(t *testing.T) {assertJSONSnapshot(t, got, want)}+func TestContract_ResourceTimelineRejectsInvalidSourceAdapter(t *testing.T) {+ _, err := parseResourceChangeFilters(url.Values{+ "sourceAdapter": []string{"unsupported_adapter"},+ })+ if err == nil {+ t.Fatal("expected invalid sourceAdapter to be rejected")+ }+}+func TestContract_UnifiedActionAuditsJSONSnapshot(t *testing.T) {now := time.Date(2026, 3, 18, 16, 0, 0, 0, time.UTC)payload := struct {diff --git a/internal/api/resources.go b/internal/api/resources.goindex e9602e4908..a54ca18007 100644--- a/internal/api/resources.go+++ b/internal/api/resources.go@@ -365,11 +365,22 @@ func parseResourceChangeSourceAdapters(values []string) ([]unified.ChangeSourceAparsed := make([]unified.ChangeSourceAdapter, 0, len(values))for _, value := range values {for _, token := range strings.Split(value, ",") {- normalized := strings.TrimSpace(token)+ normalized := strings.TrimSpace(strings.ToLower(token))if normalized == "" {continue}- parsed = append(parsed, unified.ChangeSourceAdapter(normalized))+ switch normalized {+ case string(unified.AdapterDocker):+ parsed = append(parsed, unified.AdapterDocker)+ case string(unified.AdapterProxmox):+ parsed = append(parsed, unified.AdapterProxmox)+ case string(unified.AdapterTrueNAS):+ parsed = append(parsed, unified.AdapterTrueNAS)+ case string(unified.AdapterOpsAgent):+ parsed = append(parsed, unified.AdapterOpsAgent)+ default:+ return nil, fmt.Errorf("invalid sourceAdapter value %q", token)+ }}}return parsed, nildiff --git a/internal/api/resources_test.go b/internal/api/resources_test.goindex 50c8962d6d..47b177fa0e 100644--- a/internal/api/resources_test.go+++ b/internal/api/resources_test.go@@ -1177,6 +1177,15 @@ func TestResourceGetFacetsAndTimeline(t *testing.T) {t.Fatalf("unexpected adapter-filtered facets change: %#v", payload.RecentChanges[0])}})++ t.Run("invalid source adapter filter", func(t *testing.T) {+ rec := httptest.NewRecorder()+ req := httptest.NewRequest(http.MethodGet, "/api/resources/vm:42/timeline?sourceAdapter=unknown_adapter", nil)+ h.HandleResourceRoutes(rec, req)+ if rec.Code != http.StatusBadRequest {+ t.Fatalf("status = %d, body=%s", rec.Code, rec.Body.String())+ }+ })}func containsSource(sources []unified.DataSource, target unified.DataSource) bool {diff --git a/internal/unifiedresources/code_standards_test.go b/internal/unifiedresources/code_standards_test.goindex 5f9c6a698f..297433ad0e 100644--- a/internal/unifiedresources/code_standards_test.go+++ b/internal/unifiedresources/code_standards_test.go@@ -249,6 +249,7 @@ func TestResourceAPIExposesDedicatedFacetReads(t *testing.T) {"GetRecentChangesFiltered(resourceID, since, limit, filters)","CountRecentChangesFiltered(resourceID, since, filters)","sourceAdapter",+ "invalid sourceAdapter value","strings.HasSuffix(r.URL.Path, \"/facets\")","strings.HasSuffix(r.URL.Path, \"/capabilities\")","strings.HasSuffix(r.URL.Path, \"/relationships\")",