Registry cache provenance #380
Replies: 2 comments 4 replies
|
This is a great question! Would definitely love to hear ideas on the right direction to go here! (Brief thing about reproducible builds: I think they are valuable, but I feel they're insufficient to solve the problem of provenance. Even if a build is reproducible, the only way for the client to validate that the cache's output matches a reproducible build's output is to just run the build again. So, as long as build caching is a thing, we still need to consider the cache a trust boundary, even for reproducible builds. Reproducibility makes it possible to audit if the cache is corrupted or compromised-- but only reactively, not proactively) I think a signature-based scheme would mesh better with Brioche's design, for a lot of the same reasons I think it's the right choice for Nix. Basically, each baked recipe in the remote cache should be signed, and the client should validate this signature before trusting it. ...but beyond that, I've had a lot of ideas but nothing concrete 😅 A few random thoughts:
|
|
Also, wanted to split this off as a separate thread... Mostly I've thought about signatures for the cache-- this is the most important trust boundary IMO, since it'd be a juicy target for an attacker to poison cache outputs, and it'd be extremely hard to validate if the cache is fully truthful or not (and I'm not sure it's possible to tell a "truthful-but-corrupted cache"-- say a build machine with failing RAM-- from an intentionally malicious cache). But there's a second trust boundary too: which is the registry's mapping from a package name to the project source (e.g. in I feel the registry is just a smaller degree of trust compared to the cache. So my gut instinct is that TLS/HTTPS is probably sufficient for the level of trust we need for the registry. |
Uh oh!
There was an error while loading. Please reload this page.
Is there some kind of provenance mechanism for the cached artifacts from the registry?
brioche install --registrydownloads files from the registry, but I wasn't able to figure out how they are validated. I think that Brioche needs some kind of provenance mechanism for them, if there isn't one yet.From what I've seen, most classical package managers use signatures. Alpine, for example, ships with public keys of the core team in
/etc/apk/key/. And it seems that the NixOS binary caches also uses signing keys. The other approach is reproducible builds, with a hash of the outputs inbrioche.lock. But that'd be much more challenging, as it would have to be done on package by package basisAll reactions