-
Notifications
You must be signed in to change notification settings - Fork 33
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
Client::with_root_pinned should take public keys, not key ids #229
Comments
💯 Or, since However, this assumes that the keyid is always exactly that, which might change in the future So best to just pass the pubkeys directly Cc @lukpueh who might be interested |
This is a chicken and egg problem. The chain of trust has to start somewhere, and it's simple enough to share a key ID over chat or by reading them from one laptop to another. If you already have the full key and know it's trusted, then For example, I am some dev making a CLI tool for verifying downloads of The comment above on TUF-848 brings up another thing from the TUF spec that has been a long running issue: Is the spec rigid enough to mandate interop or is it flexible? In that comment it specifically says that impls can choose how they calculate key ID. If |
In our situation, we are currently storing the public keys (and eventually the root version) in a read-only config file that's part of our verified boot chain (see this doc for more about this subject). On go-tuf, we use use Perhaps we need a few separate
We don't want to establish our chain of trust by just copying our metadata to the
I think you mean |
Ok, I think multiple constructors makes sense then. I just think that the current pinning impl needs to stay because it's rather ergonomic for a number of real world use cases. |
This patch changes how Clients are created. It adds the following functions: * `Client::from_local` - use the specified root version from the local repository as our initial trusted root. * `Client::from_pinned_root_keyids` - use the specified root version, threshold, and keyids to trust a root fetched from the local or remote repository. * `Client::from_pinned_root_keys` - use the specified root version, threshold, and public keys to trust a root fetched from the local or remote repository. * `Client::from_pinned_root` - use the specified root metadata as the initial trusted root. This deprecates the old constructors: * `Client::new` * `Client::with_root_pinned` Closes: theupdateframework#229
This patch changes how Clients are created. It adds the following functions: * `Client::from_local` - use the specified root version from the local repository as our initial trusted root. * `Client::from_pinned_root_keyids` - use the specified root version, threshold, and keyids to trust a root fetched from the local or remote repository. * `Client::from_pinned_root_keys` - use the specified root version, threshold, and public keys to trust a root fetched from the local or remote repository. * `Client::from_pinned_root` - use the specified root metadata as the initial trusted root. This deprecates the old constructors: * `Client::new` * `Client::with_root_pinned` Closes: theupdateframework#229
This patch changes how Clients are created. It adds the following functions: * `Client::from_local` - use the specified root version from the local repository as our initial trusted root. * `Client::from_pinned_root_keyids` - use the specified root version, threshold, and keyids to trust a root fetched from the local or remote repository. * `Client::from_pinned_root_keys` - use the specified root version, threshold, and public keys to trust a root fetched from the local or remote repository. * `Client::from_pinned_root` - use the specified root metadata as the initial trusted root. This deprecates the old constructors: * `Client::new` * `Client::with_root_pinned` Closes: theupdateframework#229
This patch changes how Clients are created. It adds the following functions: * `Client::from_local` - use the specified root version from the local repository as our initial trusted root. * `Client::from_pinned_root_keyids` - use the specified root version, threshold, and keyids to trust a root fetched from the local or remote repository. * `Client::from_pinned_root_keys` - use the specified root version, threshold, and public keys to trust a root fetched from the local or remote repository. * `Client::from_pinned_root` - use the specified root metadata as the initial trusted root. This deprecates the old constructors: * `Client::new` * `Client::with_root_pinned` Closes: theupdateframework#229
As @ComputerDruid pointed out, Client::with_root_pinned should be taking the public keys used to sign the metadata, rather than trusting the initial root metadata has the correct mapping from key id to key. Otherwise, if we removed recomputing the key ids (see theupdateframework/python-tuf#848 (comment)), then a malicious server could swap out the public keys but preserve the key ids and we wouldn't notice.
The text was updated successfully, but these errors were encountered: