theupdateframework / go-tuf

Go implementation of The Update Framework (TUF)
https://theupdateframework.com
Apache License 2.0
625 stars 105 forks source link

Set expiry on Root and Targets explicitly #530

Closed ChevronTango closed 8 months ago

ChevronTango commented 1 year ago

It would be useful to be able to generate a root.json and targets.json, and at a later date change the expiry. Right now you can set the expiry of the snapshots and timestamps, and the targets can have an expiry specified when adding a new target, but you can't alter an existing file in place.

An example for setting the expiry a year from now

tuf expire root.json 364 # A year from now

tuf expire root.json "2024‐07‐30T11:42:01Z" # Explicit time
rdimitrov commented 8 months ago

Closing since the code base changed and the goal of the project would be to focus on being a library first and not so much on providing a CLI client.

There might be a CLI based on this, but it will live in a separate repository.

Thanks for raising this 👍