-
Notifications
You must be signed in to change notification settings - Fork 6
How do we ship root TUF metadata for a repository? #7
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
I feel like the trusted root data should be part of what we distribute either with the plugin or composed Drupal tarball. Even in the latter case, it's less a Drupal thing and more of a Composer thing.
It needs to get distributed with however they acquire Drupal or the TUF Composer plugin itself. I'd like to propose a third option: put the initial root keys directly into the |
It would also be neat (but certainly not required) to have a command/option in the TUF plugin to freshen |
I implemented this in #18, mostly as an academic exercise. What do you think? From a simplicity and security standpoint, I'd prefer to embed the stuff directly into |
Fixed in #23. |
Uh oh!
There was an error while loading. Please reload this page.
From the TUF spec:
Since this plugin assumes that Composer-facing package metadata is protected by TUF, the question now comes up: how do we plan to ship this root metadata for a given repository?
I think the original idea was to ship it with Drupal core. The problem, though, is that the plugin doesn't know the path to Drupal core. Normally, of course, we would use Composer's installer system to figure that out. But installers operate on fully loaded packages (i.e., instances of
PackageInterface
), which are yielded by aRepositoryInterface
implementation, such as the one this plugin provides. But the plugin cannot load any packages until it has updated the TUF metadata. Which it can't do until it has some root metadata to start with. This vicious circle means that we cannot load the starting root metadata from a dynamically-computed package path.How will we solve this? I don't know, but this is a brainstorming/discussion issue to figure it out.
Two possible ideas that have been floated so far:
composer.json
, you could opt a specific repository into TUF with something like this (you'd be able to find out the repository's TUF ID in advance):A major downside here is that, any time a public Composer repository wants to be able to opt into working with TUF, they'd need to submit a pull request to this plugin to add their root metadata to it. And what would private repositories do?
2. The plugin could provide a command which would help you configure the absolute path to some root metadata. For example:
A possible downside here is that you'd have to get the root metadata somehow, so either you'd already need to have Drupal core installed, or you'd grab the root metadata from somewhere on the Internet first. Also, the path could vary across environments.
More thoughts and ideas would be very, very welcome! Bring on the big brain brigade.
The text was updated successfully, but these errors were encountered: