Repository navigation
Open
Labels
area/identityarea/securitySecurity related issue/prkind/featureAn enhancement / feature request or implementation
Description
Summary
Add an actorIdentityCertificate data source to SystemInfo volumes (#802). It gives the actor an X.509 certificate for its own SPIFFE ID, spiffe://substrate-actor.local/actor/<atespace>/<name>, with the private key, and rotates both while the actor runs, as the Kubernetes podCertificate projection does for pods. Actors could then use mTLS as themselves with other actors and with services that trust Substrate's actor CA.
Split out of #802 (Part 3).
What exists
Control.MintActorCertificatemints this certificate (one-hour leaf, client and server auth,ActorIdentityextension, UID guard), but only the egress gateway may call it, and nothing calls it today.WorkerService.MintWorkerActorCertificateis atelet's placement-checked mint (hosting node, assigned worker, UID), which atunnel uses throughWorkerSupport, but it issues theworker-for-actor/SPIFFE ID.- atelet writes each projected file by temp file + rename, one file at a time. There's no AtomicWriter: feat: add systemInfo volume source with actorIdentity data source #803 dropped it, and Add trustBundle as a SystemInfo volume data source #932 explains why.
Proposed API
- actorIdentityCertificate:
certificateChainPath: tls/actor.crt # leaf, then intermediates, PEM
keyPath: tls/actor.key # PKCS#8 private key, PEMSemantics
- On every Run/Restore, before the sandbox starts, atelet generates a fresh key on the host and sends a CSR to a new WorkerService RPC (or a kind selector on
MintWorkerActorCertificate). The RPC issues theactor/SPIFFE ID underMintWorkerActorCertificate's placement checks, and atelet writes the key and chain. A failed mint fails the start. - While the actor runs, atelet renews before the leaf expires, with a new key each time.
- A key and leaf recovered from a snapshot stay usable until the leaf expires, at most an hour. Renewal goes through atelet and the live placement, never through the old certificate.
Open questions
- Pair consistency: a reader can see a new chain with the old key, because atelet renames the two files one at a time. Options: also offer a single bundle file (key, then chain) like podCertificate's
credentialBundlePath, or document that readers retry on a mismatch. - Key type: fix one, or let the template choose as podCertificate's
keyTypedoes? - Trust: relying parties need the actor CA's anchors, and no trust bundle name serves them (only
egress-mitm.ate.devandsystem-roots.ate.devexist). Add one here or separately? - Trust domain: it's hard-coded to
substrate-actor.local(a TODO inworkerservice/certificate.go), so a relying party outside an install can't tell certificates from different installs apart. - File mode: atelet writes every projected file 0644, so any user in a container that mounts the volume can read the key. Is that acceptable, or does this source need a mode?
Tasks
- WorkerService mint path for placement-bound
actor/certificates, with authz and tests -
actorIdentityCertificateinSystemInfoDataSource(ateapipb and ateletpb), validation (both paths distinct and unique across the volume), and theworkload_spec.goconversion - atelet: key generation, mint on Run/Restore, renewal before expiry, and e2e on gVisor and micro-VM checking the SPIFFE ID and that the key matches the leaf
- Docs: the api-guide SystemInfo section and §7
Metadata
Metadata
Assignees
Labels
area/identityarea/securitySecurity related issue/prkind/featureAn enhancement / feature request or implementation
Activity