Tamper-proof storage of Medical Images enabled with Blockchain
Policy endpoints currently use a lightweight header-based identity context.
Required headers:
X-Imago-Principal-IdX-Imago-Org-IdX-Imago-Role
Optional header:
X-Imago-Principal-Type(userby default,servicesupported)
Behavior notes:
- Missing required auth headers return
401 Unauthorized. POST /api/v1/policy/grantsandPOST /api/v1/policy/grants/{grant_id}/revokerequireadminorsuper_adminrole.POST /api/v1/policy/evaluatederives principal identity from headers (not from body fields).
MONAI cache usage is treated as a scratchpad layer, separate from canonical image storage.
IMAGO_MONAI_CACHE_MODEcontrols whether MONAI-style caching is disabled, RAM-style (cache_dataset), or disk-style (persistent_dataset).IMAGO_MONAI_EMIT_LINEAGE_RECORDSoptionally toggles cache lineage emission during scratchpad usage.true: emit lineage records for reproducibility/audit.false: skip lineage writes for performance-sensitive runs.
A benchmark harness is available to compare scratchpad latency with low vs high ledger update churn:
scripts/test/benchmark_monai_scratchpad.py
It prints JSON with baseline/stressed latency metrics and exits non-zero if both ratio and absolute-delta thresholds indicate adverse impact.
