-
Notifications
You must be signed in to change notification settings - Fork 278
Implement TAP 14 #2040
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'm not confident this is something the python-tuf library can meaningfully provide as a generic feature -- I'm not against someone trying that, just warning that it seems difficult. Somehow automatically producing all versions at the same time sounds like a maintenance and testing problem. I can see how a mechanism to support multiple incompatible client versions could be useful, but my hunch is that it's a repository feature (and not a library decision): A specific repository implementation could decide to start providing two separate versions of the same metadata for a specific new TUF feature, to allow for a period when old clients keep working while new clients benefit from new features. In practice I would imagine this just looks like two separate repositories that happen to use some of the same keys and get roughly the same content updates... and since updating to the new incompatible repo by definition requires a client update, there's no problem in changing the repository url when that update is done. So I'm not sure the spec needs complications for this? Maybe I just don't see the case and a practical example would help? |
The proposal in the TAP should be specific enough that python-tuf can have a feature to parse the new version metadata from a repository (ie finding the 2.0.0 folder and using the metadata there once it exists), and make some tests for various repository use cases. I agree that actual use of this feature will require repositories to make decisions about which versions to support, etc. I'm hoping that eventually we can explore this kind of thing in the repository-sandbox. But it would be nice to have the client support in place before we ever have a repository that needs to update versions so that this can be done quickly if there's ever a real need (security patch, etc). |
Replying to a comment in another issue: The real world use case for this client workflow is when the client isn't controlled by the same entity as the repository. This is possible for clients that use multiple repositories, and for other areas when the client and repository implementations are more separate, like in the case of the many Sigstore TUF clients. In either of these cases, the client will need this mechanism to determine a compatible supported version, and ensure the client upgrades as soon as possible after the repository. |
Thanks, this is useful detail.
I'm trying to imagine a scenario where all this aligns perfectly:
Maybe these situations are common but I really have stretch my imagination: it's not a use case I've seen so far... I would imagine it's going to be much more common that the "repository instance" (like sigstore tuf repo) needs to change something in how it operates (not necessarily TUF spec related) and wants to inform it's clients: this change could include TUF spec version change but could as well be e.g. a simple path naming scheme change. I've always imagined complex repositories would embed their own version info in their metadata. In a way I guess I'm saying TAP 14 might exist at the wrong level of abstraction? I'm still not convinced that this client feature doesn't create more security issues than it could potentially patch in the future. It adds complexity that is difficult to test, and gives the repository powers over the client that the repository does not currently have. TL;DR: python-tuf could have a feature like this, sure. But instinctively this feels like putting the cart before horse for two reasons:
|
As you say there are two reasons for a client to upgrade: a change to the implementation or a change to the spec. The first case (while important), is not the goal here. It's possible that we'll want to revisit that and extend the scope, but I think there are challenges to working with both code versions and spec versions in the same place (especially with multiple repo/client situations). In the case of a spec change, especially a security critical one, this change will be communicated to both clients and repos. The goal here is to allow both clients and repos to make this change independently, without needing any kind of "flag day" when they switch over. This is valuable for repos with multiple clients so that any clients who have made the change will automatically switch over when the repo patches, but not all clients have to patch simultaneously, but it is also valuable for clients who don't have to wait for repos before implementing the patch, and can communicate with multiple repos which have, or haven't patched. There are a number of TAPs in the pipeline that are blocked on, among other things, the fact that they require a breaking change to the spec, so this seems like the perfect opportunity to work out a general procedure for this.
Not no change, just a change that was specified by the spec change (ie, the use of DSSE).
This is a balance between effectively causing a DOS for any clients not able to update immediately, and providing the patch as soon as possible. There may be some bugs bad enough to warrant cutting off all old clients (which the TAP does allow for), but the theory is that most bugs found in the spec would be hard to exploit, or possibly non-security bugs/new features (for example, I would argue that the use of DSSE is more secure, but that doesn't mean the canonical json implementation has a ready-to-exploit bug. You could make a similar argument about post-quantum algorithms). |
Full ack that breaking changes don't seem to be happening... I just still don't see clients dynamically changing repository URLs as solving real problems in that area. Anyway, opinions are now on table: I don't want mine to stop your work, just wanted to state this early so it doesn't come as surprise. |
Description of issue or feature request:
Implement TAP 14: Managing TUF versions
Current behavior:
TUF clients will not be able to safely update once the repository moves to a new major specification version.
Expected behavior:
TAP 14 is implemented, giving clients a period of time in which to update to the new specification version
The text was updated successfully, but these errors were encountered: