Expand description
Trust in a self-hosted Cloud: the vendor’s root certificate (C0 1.7).
The hosted Cloud is trusted through its root compiled into this build.
A self-hosted Cloud is trusted when LeanCTX vouched for its root with a
RootCertV1, signed by a vendor root compiled in at release
(LEANCTX_CLOUD_ROOT_KEYS, a JSON array of hex Ed25519 keys; no default):
the certificate names the origin, the organizations whose leases the root
may sign, and its validity (no grace after not_after).
The engine fetches the certificate on connect and at lease renewal,
keeps the last verified one in <config>/cloud/root-cert.json (0600) and
replaces it only with one that verifies. An invalid or expired stored
certificate pauses Cloud, like a lapsed lease; local tools never notice.
[cloud] root_key stays a development escape hatch (“unvouched Cloud
root”); a certificate, when present, wins over it.
Structs§
- Connect
Trust - How this engine trusts an origin it is about to connect to.
Functions§
- check_
lease_ org - The organization check of a certified root: the lease’s org must be one the certificate names. Without a certificate there is nothing to check.
- for_
connect - The root for a new enrollment: a certificate the origin serves wins; an
explicit
[cloud] root_keyis the unvouched fallback; the hosted Cloud uses its compiled root. - refresh
- At lease renewal: fetch the certificate again and keep it when it verifies (a renewed one replaces the old); a failing fetch keeps the stored one, whose own validity still applies.
- store_
certificate - Keep a verified certificate (after the enrollment or a refresh).
- stored_
certificate - The stored certificate for the runtime lease (the runtime verifies it).
- trust_
root - The root that signs
origin’s key set: a stored certificate’s, else the configured or compiled one. - unvouched
- Whether the configured root is the unvouched escape hatch (for
cloud status): aroot_keyis set and no certificate is stored.