Are compute nodes trusted?
Dfinity's current docs and public statements seem ambiguous on whether compute nodes are trusted to run user apps correctly and confidentially.
Dfinity is proposing that app developers take a big step away from the current situation where they have a direct contract with an IaaS/PaaS provider who promises to ensure the physical and logical security of the infrastructure. As an app developer, I want some strong assurances that my data, my code, and my users' data has confidentiality, integrity, and availability.
Dfinity seem to want to treat DCs more like miners, that get paid if they produce consensus results but otherwise have complete autonomy, and they are not assumed to be trusted. Canisters will run on some machines owned by someone, somewhere in the world, and the app owner can't see it or control it. New DCs can be added through the NNS system apparently without app owners having any control or visibility.
This seems like a pretty huge issue for deciding whether they IC is a safe and appropriate place to host an app.
The case that nodes are not trusted:
Most of the Dfinity docs and public statements seem to imply that nodes are individually untrusted, and that the platform becomes safe in aggregate because computation is replicated across many independent nodes.
Not trusting the compute nodes seems to have quite a lot of costs to Dfinity and to users:
- Functions must be deterministic, which steeply restricts what apps can run there: they can't generate random numbers, open TCP connections, or look at a precise real time clock...
- Latency is likely to be far higher than existing alternatives, due to running every mutating op 3+ times in different DCs and waiting for consensus
- More work for users to work around high latency at the application level
- More work for Dfinity to make this all hang together and perform vaguely competitively
I have to assume Dfinity are only putting themselves through all this pain because they see a huge benefit in being able to run on untrusted nodes.
The case that actually compute nodes are trusted:
Although Dfinity pays apparently high costs to ensure correctness on untrusted hardware, consensus algorithms don't help at all with confidentiality, which is equally important to most apps. A malicious node can keep a copy of user data or application code.
A particular case of this is that apparently canisters will accept HTTPS connections themselves, rather than this being handled in Dfinity infrastructure. As a consequence, a malicious node can probably steal the app's TLS key.
Dfinity also apparently answers read queries from only a single node, with no consensus mechanism. A malicious or compromised nodes can lie about the results of read-only queries.
So it seems that actually compute nodes are trusted after all. Dfinity and app developers will have to take care that they're only run by DC providers with strong security controls.
So then why all the blockchain stuff? Why have expensive and complicated protections that read-write operations function correctly, but let nodes lie about read-only requests?
The case that maybe Intel & AMD will save us?
Dominic also stated that "the network has subnets that use techniques that hide the data of hosted canisters even from data center administrators that have physical access to assigned node machines".
I can see there is a conceivable path where the client could somehow use remote attestation to check that the server is running the trusted version of the Dfinity VM inside an enclave on a genuine and non-virtualized processor.
You can see some things like this are launched in major public clouds, although I would argue they only lessen the degree of trust in the provider and don't bring it to zero.
End-to-end confidential computing seems very challenging to implement today on arbitrary hardware with untrusted operators, but maybe not impossible. It seems like what Dominic is saying he has here goes well beyond what exists in PaaS, because the end client browser can validate the integrity of the server.
The thing that confuses me is: if, as Dominic says, Dfinity has (present tense) a way to run arbitrary code in trusted enclaves on untrusted machines: why bother with all the consensus and blockchain stuff? You don't need it! You can by definition rely on the machine running exactly what it's told, without anyone peeking.
Posted Oct 13, 2020, 9:24 PM UTC
I'm guessing this is not a well trafficked sub. Let us know if you get an answer elsewhere.