Documentation
¶
Overview ¶
admin-api is the god-mode backend for the Hanzo Operator console (admin.hanzo.ai). It is the ONE analytics layer: an aggregator periodically pulls every product's identity, usage and health into a dedicated `admin` database inside the ZAP-native Hanzo Datastore, and a small read API serves that aggregate to the operator SPA under /v1/admin/*.
Two orthogonal concerns, one binary:
- aggregate — sources (IAM, platform, commerce) → datastore. A background ticker plus an on-demand POST /v1/admin/sync.
- serve — /v1/admin/* reads over the `admin` db. Every request is gated to a Hanzo superadmin (owner == AdminOrg), enforced at the DATA LAYER here independently of the ingress admin-guard ForwardAuth. Defense in depth: a request that slips past the edge still cannot read god-mode data without a superadmin session or JWT. Fail-closed.
Identity is resolved exactly like the rest of the platform: a Bearer/Basic JWT validated through iamauth, or the first-party session cookie minted by cloud (forwarded to /v1/get-account). Either way the predicate is the same single fact — owner == AdminOrg — the same one admin-guard enforces at the edge.
Click to show internal directories.
Click to hide internal directories.