TEE Lifecycle
TEE lifecycle management is part of Balary's security boundary, not just deployment plumbing.
Why lifecycle recovery exists
The project source records that the pinned Flare tee-node generates its machine secp256k1 identity on every process start. Persistent application state and the state-encryption key do not restore that machine identity.
Balary V2 therefore treats an identity change as a controlled migration event.
Lifecycle states
The backend models two lanes, original and credits, with these statuses:
healthy
recovery_required
recovering
paused
failed
Public readiness:
GET /api/v1/tee-lifecycle/readiness/
Example shape:
{
"original": {
"status": "healthy",
"blocker": "",
"checked_at": "..."
},
"credits": {
"status": "healthy",
"blocker": "",
"checked_at": "..."
}
}
The public endpoint does not expose private keys or lifecycle credentials.
V2 recovery model
The V2 controller is designed to:
- detect identity or configuration drift,
- pause before migration,
- validate chain, extension, endpoint, code hash and state fingerprints,
- validate registry cardinality and contract bindings,
- register/approve the replacement identity through the reviewed path,
- retire the stale identity,
- rotate the gateway signer,
- verify root/epoch/state consistency,
- resume only when all checks pass.
Interrupted recovery steps are state-tested before submission so a restart can resume without blindly duplicating writes.