Skip to the content.

RFC 0024: Cross-pod federation — code-identity admission + mutual attestation

Summary

Generalize Nerla Jean-Louis’s OptOutAppAuth (update governance with fine-grained per-user opt-out, njeans/dstack update-demo) from “which versions may touch this data” to “which code-identities may touch this data” — where a code-identity is a compose hash, whether it is a successor version or a peer pod’s app. With that one generalization, three operations become the same governed action: upgrading, federating with a peer, and admitting a visiting ambassador. All go through the same governance + timelock + per-user opt-out; the KMS gates key release on the same contract policy. Add (a) a mutual-attestation handshake so two pods each verify the other’s code-identity before data flows, and (b) two read modes — in-place ambassador (compute-to-data) and re-encrypted share (data-to-compute).

(The IAppAuth-extension framing is Andrew’s; Nerla’s demo is the specific per-user opt-out instantiation this builds on.)

Problem

What Nerla’s demo already gives us (the base to generalize)

OptOutAppAuth.sol (implements IAppAuth):

Migration enforcement (the app, attested): v2 mints a fresh migration keypair from the same key-provider; v1 verifies v2’s key came from that KMS (cert-chain) and reads the on-chain opt-out list, then re-encrypts every non-opted-out user’s data to v2’s key — opted-out data is left behind, unreadable by v2. Trust = v1 (attested) honors the on-chain list + the same-KMS check. (“Encrypted to a contract policy,” not to a raw hash — the policy can encode governance + opt-out.)

Design

1. Code-identity admission policy (generalize OptOutAppAuth)

2. Mutual-attestation handshake (the cross-operator new part)

3. Two read modes (both requested)

4. Sequential vs concurrent data plane

The policy is shared (admit a code-identity); the data plane differs:

Files / prior art to build on

Out of scope / deferred