-
Notifications
You must be signed in to change notification settings - Fork 56
How do we initialize trust with local metadata, and no access to a remote repository? #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
note that we don't want to just assume local metadata is trusted, and instead want to validate it's properly signed and not manipulated by a local attacker (see #107) |
Thanks for this discussion @erickt. My interpretation of the spec is that we assume we're only ever bootstrapping from a local trusted I think your proposed approach to initialising trust with local metadata sounds sensible. Of course, initialising trust from local metadata only weakens some of TUFs security properties. It is hard to provide freshness guarantees and to know whether the currently trusted keys should still be trusted (you can refuse to trust an expired key, but you won't detect a revoked key without fetching newer metadata). Out of interest, if your Fuchsia client is not able to go online and the expiration timestamp in |
We've partially figured out our offline story. Some of our plans are documented here. Fuchsia packages really are just a listing of a file path to a list of content addressed blobs. A Fuchsia repository is a tree of paths to packages. We have 3 different types of package repositories:
Base and cache packages need to be offline, so these repositories are just files that are trusted through our verified boot process. We use TUF to support Cache and Ephemeral packages. So when we are resolving a package, we:
There's no expiry on base and cache packages, so we can always resolve them. But we'd love to be able to still use ephemeral packages if we don't have network access. I have ideas so far:
|
On Fuchsia, we are using TUF not only to fetch new packages, but also as a file system implementation to launch packages (see this for more details). For a long time, we've been using ephemeral repositories for package resolution, so we've always needed to be online. However we're finally starting to explore how we'll resolve packages when we've rebooted and we're not able to go online.
While scoping out this work, I noticed the spec is actually a little vague as to how we should initialize trust when we have a local cache of TUF metadata, but no way to fetch remote metadata:
$ROOT_VERISON.root.EXT
though.timestamp.EXT
. It'd be easy enough to load that file since we expect that file to be unversioned, but...snapshot.EXT
. Likewise, 5.4 we write targets and delegates asFILENAME.EXT
.We use consistent snapshots, so just trying to search the local store first will fail, because we'll be looking for
$SNAPSHOT_VERSION.snapshot.EXT
and$TARGETS_VERSION.snapshot.EXT
. Should we initialize trust by disabling consistent snapshots, trying to load all the local metadata, then re-enabling consistent snapshots? I think that ought to work, but the one sticking point is how to handle a partial update (see #69). In that case, presumably the initialization should succeed, just not initialize the TUF database with the inconsistent metadata. To protect against this, presumably we ought to write metadata to the local store in a transaction.The text was updated successfully, but these errors were encountered: