Architecture reference

GlassHood is a cross-cloud monitoring engine for regulated systems. Live topology reconciled against declared design, with compliance evidence derived from what it observes.

User live topology · evidence Declared design YAML manifests · intent Compliance evidence report Annex 11 · ALCOA+ · observed GlassHood on Azure platform Read-only collectors pull · list / get / describe Topology graph live ⊕ declared Analysis engine Deterministic first · AI narrates on top Workload Identity Federation no stored keys · short-lived read-only token keyless API key ColdVault GCP estate · read-only monitored target AI narrative API API KEY · chat View architecture →

Implementation details

These are the concrete bindings of the architecture above — the cloud, region, identity mechanism and packaging. They are swappable implementation choices, not the architecture.

HostAzure Container Apps
RegionSwitzerland North
IdentityWorkload Identity Federation — short-lived, viewer-only token, no stored keys
Auth providerAuth0 SSO + local fallback

Detailed GlassHood topology

User browser-side
Browserviewer + admin · live demo
HTTPS
Azure ingress
Managed ingressContainer Apps · TLS · glasshood.ai
REST · JWT
GlassHoodon Azure Container Apps · Switzerland North
Backend services
Auth + RBAClogin · roles
FastAPI backendrequest hub
Application
React 18 SPAtopology UI
Azure Filesmanifest
Assembly loop · the centerpiece
Engine · topology assembly
Topology-assembly engine
merges · diffs · enriches · every cycle
One topology graphlive ⊕ declared
merge →← diff
Live discovery ⊕ YAML
Live discovery merged with declared intent — the gap between designed and running is visible in the model itself, rebuilt with fresh metrics every cycle.
Analysis & security
Deterministic tierrules · anomalies · correlation
AI narrativeexplains only
CVE scannerNVD · 6 h
Build & Ops
Container RegistryACR · container images
Compliance evidence
on demand · Annex 11 · ALCOA+ · Part 11
Report API
machine-readable · for AI agents
managed identity
Workload Identity Federation no stored keys
Managed identity
WIF token broker
GCP STS exchange
short-lived read-only token · KEYLESS
Live request path Client Trust · no keys Cloud platformKEYLESS WIF spineAPI KEY ColdVault
Abbreviations
  • SPA — Single-Page Application: the React front-end that loads once in the browser and updates in place, with no full page reloads.
  • RBAC — Role-Based Access Control: the app’s own roles (viewer / operator / admin) deciding what each signed-in user may do.
  • WIF — Workload Identity Federation: the key-less mechanism that lets the Azure app obtain short-lived, read-only Google credentials with no stored service-account key.
  • STS — Security Token Service: Google’s endpoint that exchanges the federated Azure token for a short-lived Google access token.

Collection — read-only, pull-based

The whole flow, in order: a target system → read-only collectors (this section) → one topology graph (live discovery merged with the declared design) → a deterministic + statistical tier that produces every signal → an AI layer that narrates on top → compliance evidence and a read-only API. The sections below walk it in that order.

GlassHood installs nothing in the system it watches. Background collectors poll on cadences and, toward the monitored target, every call is list / get / describe — a search across the collector and discovery code finds zero create / delete / update / patch / insert calls toward the target. Read-only is enforced twice: by that call surface, and by the identity itself — a short-lived, viewer-only federated token with no stored keys (detail under Implementation). Even a full compromise of the engine cannot write to the monitored system.

In this use case — monitoring a solution on Google Cloud — the collectors read:

  • Asset / topology discovery — enumerates the target’s compute resources to build the topology graph (~5 min).
  • Monitoring metrics — load-balancer latency, request count, VM CPU (60 s).
  • Error logs — error-severity entries in a rolling 15-minute window (60 s).
  • Storage stats — object count, size and versioning of a data bucket (~5 min).
  • The target app’s own health/metrics API — over HTTPS (30 s).

The cross-cloud part is the host/target separation — the engine runs on one cloud and reads a system on another, with no stored keys. Pointing it at a different target’s stack means writing new collectors, not just changing config. The architectural decision is the model itself: pull-based, read-only by construction.

Analysis — deterministic signals first, AI on top

The signals that matter are produced by a deterministic + statistical tier, then an AI layer explains them. The GxP payoff: every AI conclusion is backed by a deterministic, reproducible signal a human can verify without the model.

The deterministic / statistical tier (reproducible, runs every build):

  • Rules engine — threshold rules with a 5-minute dedup window and a 1-hour alert TTL.
  • Statistical anomaly detection — z-score over a rolling baseline, configurable sigma (default 3.0), warm-up minimum and a constant-baseline fallback.
  • Correlator — ties anomalies to operational alerts and raises elevated-severity data-integrity signals.

These run together to produce every alert and anomaly. The AI layer runs strictly on top of them — a model-agnostic external call to an inference-as-a-service Platform API (swappable, with a streaming fallback, cached; no model weights in the engine). It synthesizes a narrative health summary and a suggested 1–10 read; that read is an AI synthesis, not a deterministic verdict, and it never originates an alert or anomaly — the underlying signals it explains are the deterministic ones above, which a human can reproduce without the model.

Engine vs instance: the AI prompt is currently tuned to this target (it knows this system’s components). Pointing the analysis at a different target means a new prompt profile — the deterministic tier is target-agnostic; the AI narrative is target-tuned.

One in-memory model — topology reconciled with declared design

The source of truth for topology is neither pure auto-discovery (which misses non-enumerable nodes and carries no intended state) nor a pure declarative manifest (which goes stale the moment it is written). GlassHood merges both: live discovery is overlaid with declarative YAML manifests into a single enriched graph, rebuilt with fresh metrics every cycle.

Because the model carries observed reality and declared intent in one place, the gap between what was designed and what is actually running is visible in the model rather than requiring a separate system, and change between cycles is tracked. Every analysis layer reads from this one graph.

State — no-database core, retention is a separate write path

That model, and the alerts, anomalies and analysis around it, live in in-memory caches with no database. A restart loses history by design — that keeps the observation core a pure read/compute path with no write surface of its own. The live ALCOA+ audit trails are bounded in-memory ring buffers (they drop oldest and reset on restart).

Durable retention is a deliberately separate, default-off write path (a hot/warm analytics store plus cold object storage, with GxP no-auto-delete) — and it is also where the enduring ALCOA+ evidence lands when a deployment needs it kept. Splitting “observe” (in-memory, read-only) from “retain” (optional, write) is a boundary decision with real blast-radius and data-retention consequences.

Access & integration surface

  • Auth — JWT, provider-agnostic (Auth0 SSO + local fallback), a 15-minute idle timeout aligned to Annex 11 §10.2, and RBAC roles (admin / operator / viewer).
  • Guest access — an unauthenticated “View live (read-only)” entry showing the live topology under viewer RBAC, with a persistent “Read-only · live system” badge.
  • Machine-readable — a report endpoint exposing an analysis + topology summary for external AI agents, API-key or Bearer authenticated.
  • Supply-chain posture — continuous CVE scanning of declared components by CPE against the NVD API, with ALCOA+ status tracking.

Compliance — a byproduct of observation, not a checkbox

Compliance is not a pre-baked attestation. Reports are generated on demand, derived from what the engine actually observed — rule alerts, CVE findings and anomalies — with a per-subsystem ALCOA+ audit trail. You cannot fake what the engine observed directly; the evidence is the observation.

Those reports are aligned to EU GMP Annex 11, ALCOA+ and 21 CFR Part 11 and support human review; they are unsigned and are not an independent validation or certification. A qualified person reviews and adopts every artifact.

Identity mechanism — detail

The engine holds no Google Cloud service-account keys anywhere. At runtime the Azure Container App’s Entra managed identity is surfaced via IDENTITY_ENDPOINT / IDENTITY_HEADER (the Container Apps endpoint, not the VM IMDS). A small broker fetches that token and hands it to google-auth’s executable credential source, which exchanges it at Google’s STS for a federated token and impersonates a viewer-only service account — a short-lived, read-only access token, refreshed on demand.

The federation config (placeholders only)

{
  "type": "external_account",
  "audience": "//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/providers/PROVIDER_ID",
  "subject_token_type": "urn:ietf:params:oauth:token-type:jwt",
  "token_url": "https://sts.googleapis.com/v1/token",
  "service_account_impersonation_url":
      "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/SA_EMAIL:generateAccessToken",
  "credential_source": { "executable": { "command": "/app/az-token.py", "timeout_millis": 5000 } }
}

Sanitized — every identifier is a placeholder. This is the trust binding, not a secret: there is no key to leak.