admin-api

command
v2.16.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

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:

  1. aggregate — sources (IAM, platform, commerce) → datastore. A background ticker plus an on-demand POST /v1/admin/sync.
  2. 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 the edge, or the first-party session cookie minted by cloud (forwarded to /v1/ai/account). Either way the predicate is the same single fact — owner == AdminOrg — the same one admin-guard enforces at the edge (hanzoai/authz/edge).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL