-
Notifications
You must be signed in to change notification settings - Fork 60
Import of an initial root.json from filesystem #1553
Comments
Aktualizr follows the so-called Trust on first use (TOFU) concept at the moment, although, there is root.json in credentials.zip which can be used for your goal (currently it's used by the garage tools/garage-deploy, garage-push). |
Glad to hear you're interested in this! We are as well. However, currently the credentials.zip only has the root metadata for the Image repository, and we hope to soon add the Director repository as well so that libaktualizr can import both directly and not have to rely on TOFU anymore. |
Nice, good to know this is already on the roadmap then, happy to test and help reviewing if needed. Thanks! |
I was poking around at this today. I'm briefly looked at the spec and it didn't jump out to me. When we say "root.json", do we mean "1.root.json", $x.root.json, or 1.root.json->$x.root.json? |
I'm thinking you need 1.root.json. Looking briefly, I this might be a simple change:
Is that all we are missing? |
See https://uptane.github.io/uptane-standard/uptane-standard.html#rfc.section.5.4.1 and https://github.com/uptane/deployment-considerations/blob/master/ecus.md.
I would expect Rereading the standard, I'm not sure why it requires the full set of metadata to be preinstalled, because if you have the Root, you can verify everything, and if it's been rotated, everything else that was preinstalled will be invalidated anyway. I've raised uptane/uptane-standard#220 to ask this question to the greater community. |
TUF spec suggests that the client must ship with a trusted root key for each configured repository (2.1.1 - https://github.com/theupdateframework/specification/blob/master/tuf-spec.md#2-system-overview), and I was looking on how I could import a known root.json when first starting aktualizr, but it seems that this is not currently supported.
I know we can import a CA for the TLS communication, but I wanted the trust for the root key to happen before the device was even able to reach the remote side when running for the first time. This is just to avoid issues with the initial CA used, otherwise in case it gets hacked, new devices could end up fetching and using and invalid TUF root key as a consequence.
My idea is to create the image with the root.json in it, and configure aktualizr to import from that file when running for the first time. As I'm not so familiar with the codebase yet, I'm opening this bug to see if this is indeed not supported and if it would make sense to add support for it.
The text was updated successfully, but these errors were encountered: