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
Multi-Tenant Runtime Isolation and Coherence Record
- Date:
2026-03-13 - Gate:
multi-tenant-runtime-isolation-and-coherence - Assertion:
RA12 - Environment:
- Managed local backend (seeded auth, then relaunched with proxy auth):
http://127.0.0.1:59221 - Entitlement profile:
multi-tenant - Proxy-auth rehearsal identities:
adminalicebob
- Seeded default-org live agent:
default-host.local
- Managed local backend (seeded auth, then relaunched with proxy auth):
Automated Proof Baseline
go test ./internal/api -run 'TestOrgHandlers|TestMultiTenant|TestResourceHandlers_NonDefaultOrg|TestSetMultiTenantMonitor_WiresHandlers|TestMultiTenantStateProvider|TestMultiTenantAPITokenRemainsScopedToIssuingOrg' -count=1go test ./internal/monitoring -run 'TestMultiTenantMonitor' -count=1go test ./tests/migration -run 'TestV5DataDir_MultiTenantMigration' -count=1cd frontend-modern && npx vitest run src/components/Settings/__tests__/OrganizationSharingPanel.test.tsx src/components/Settings/__tests__/RBACPaywallPanels.test.tsx src/utils/__tests__/rbacPermissions.test.ts src/utils/__tests__/rbacPresentation.test.ts src/utils/__tests__/organizationRolePresentation.test.ts src/utils/__tests__/organizationSettingsPresentation.test.tscd tests/integration && PULSE_E2E_USE_LOCAL_BACKEND=1 PULSE_E2E_SKIP_PLAYWRIGHT_INSTALL=1 PULSE_MULTI_TENANT_ENABLED=true npm test -- tests/03-multi-tenant.spec.ts --project=chromium- Result: pass
Manual Exercise
- Started a clean managed local backend with
PULSE_MULTI_TENANT_ENABLED=true, completed quick security setup, then relaunched the same data directory with proxy auth enabled so distinct users could be exercised over the live HTTP surface. - Seeded one live default-org unified agent report for
default-host.localthroughPOST /api/agents/agent/reportasadmin. - As
alice, created orgmtgate-a-1773391667. - As
bob, created orgmtgate-b-1773391667. - As
alice, created orgmtgate-shared-1773391667. - As
alice, addedbobto the shared org asviewer. - Listed
GET /api/orgsas both users and confirmed membership-filtered visibility:alicesawdefault,mtgate-a-1773391667, andmtgate-shared-1773391667bobsawdefault,mtgate-b-1773391667, andmtgate-shared-1773391667
- As
bobwhile stillviewer, attemptedPUT /api/orgs/mtgate-shared-1773391667and received403withAdmin role required for this organization. - As
alice, promotedbobtoadmininmtgate-shared-1773391667. - As
bob, repeatedPUT /api/orgs/mtgate-shared-1773391667and confirmed it succeeded with200. - As
alice, demotedbobback toviewer. - As
bob, repeatedPUT /api/orgs/mtgate-shared-1773391667and confirmed it immediately failed again with403. - Verified tenant-scoped runtime isolation directly through the live lookup path:
GET /api/agents/agent/lookup?hostname=default-host.localin the default org returned200with the seeded live agent.- The same lookup with
X-Pulse-Org-ID: mtgate-a-1773391667returned404 agent_not_found, confirming non-default orgs did not fall back to default-org runtime state.
- As
alice, created a cross-org share frommtgate-a-1773391667intomtgate-b-1773391667withaccessRole=editor. - As
bob, listedGET /api/orgs/mtgate-b-1773391667/shares/incomingand confirmed the incoming share preserved:sourceOrgId=mtgate-a-1773391667accessRole=editor
- As
bob, attemptedGET /api/orgs/mtgate-a-1773391667/sharesand confirmed the source-org share list remained blocked with403andUser is not a member of the organization. - Deleted the temporary share and all temporary orgs after the rehearsal.
Outcome
- Multi-tenant org visibility stayed scoped to actual membership.
- Membership role changes immediately changed the allowed write surface for the shared organization.
- Tenant-scoped runtime lookup failed closed for a non-default org instead of falling back to default-org live agent state.
- Cross-org sharing preserved the intended access role and did not widen source-org visibility.
- The live HTTP surface enforced tenant isolation consistently across org creation, membership, role changes, runtime lookup, and share visibility.
Lifecycle Regression Revalidation
- After the same-day rehearsal exposed shutdown-time alert-history save errors during org deletion, I patched tenant removal so it cancels the tenant runtime, waits for the monitor loop to exit, and only then flushes tenant state and removes the org directory.
- Re-ran the automated proof surfaces that own this boundary:
go test ./internal/api -run 'TestOrgHandlers|TestMultiTenant|TestResourceHandlers_NonDefaultOrg|TestSetMultiTenantMonitor_WiresHandlers|TestMultiTenantStateProvider|TestMultiTenantAPITokenRemainsScopedToIssuingOrg|TestRBACLifecycle' -count=1go test ./internal/monitoring -run 'TestMultiTenantMonitor' -count=1go test ./tests/migration -run 'TestV5DataDir_MultiTenantMigration' -count=1
- Re-ran the managed-runtime deletion path on a fresh local backend at
http://127.0.0.1:59231:- created
mtfix-live-1773396128asalice - forced tenant monitor initialization through
GET /api/alerts/configwithX-Pulse-Org-ID: mtfix-live-1773396128 - deleted the org with
DELETE /api/orgs/mtfix-live-1773396128
- created
- Verified the live server log showed the corrected shutdown order for the initialized tenant:
stopping and removing tenant monitormonitoring loop stoppedstopping monitormonitor stopped
- Verified the previous shutdown fault did not recur:
- no
Failed to save alert history on shutdown - no missing
alerts/alert-history.json.tmp*write errors during tenant deletion
- no
Gate Decision
multi-tenant-runtime-isolation-and-coherenceis now satisfied at the requiredmanaged-runtime-exercisetier.- The earlier org-deletion cleanup fault was reproduced, fixed, and revalidated on the live managed-runtime surface before closing the gate.
Notes
- The browser-level multi-tenant suite passed separately on a fresh managed local backend, including CRUD, cross-org token isolation, self-role denial, cross-org share handling, and scoped permission updates.
- The runtime-state rehearsal intentionally used the direct agent lookup route because it reflects live Unified Agent inventory immediately, while the generic resource list on a fresh backend can remain empty until unrelated polling state is populated.