Skip to content
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

Update tuf version #115

Closed
wants to merge 2 commits into from
Closed

Update tuf version #115

wants to merge 2 commits into from

Conversation

jku
Copy link
Member

@jku jku commented Oct 25, 2023

This is an update to current (unreleased) tuf API, draft until tuf makes a release:

  • Use Root.get_root_verification_result(), (Root|Targets).get_verification_result()
  • Use Root.verify_delegate(), Targets.verify_delegate()
  • Use Repository.root(), Repository.targets()

The verification result changes mean some modifications in the code here, mostly in a good direction.

@jku jku linked an issue Oct 25, 2023 that may be closed by this pull request
8 tasks
@jku

This comment was marked as outdated.

This simplifies the handling quite a lot:
* status() result is now a lot easier to understand
* root version is now checked by get_root_verification_result():
  tuf-on-ci does not need to
* No need to build a list of signed and unsigned signers anymore
  (just translate keys to signer names)
@@ -144,7 +149,7 @@ def _role_status(repo: CIRepository, role: str, event_name) -> bool:
if status.message:
click.echo(f"**Error**: {status.message}")

return role_is_valid and not status.invites
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SigningStatus makes sure it is not valid if there are invites so this is safe

* Use verify_delegate() from Root, Targets
* Use helpers like Repository.root(), Repository.targets()
@jku
Copy link
Member Author

jku commented Feb 6, 2024

FYI @lukpueh in case you are interested.

Comment on lines -289 to -293
# Specification: root version must be x+1, not just larger
if prev_md and prev_md.signed != md.signed:
if md.signed.version != prev_md.signed.version + 1:
return False, f"Version {md.signed.version} is not valid for root"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is handled by Root.get_root_verification_result()

@jku jku self-assigned this Apr 4, 2024
@jku
Copy link
Member Author

jku commented Apr 4, 2024

This update is now possible as tuf 4.0 has been released. There is no rush though: the securesystemslib pinning in #243 handles the main reason to upgrade quickly

@jku
Copy link
Member Author

jku commented Apr 28, 2024

This is still in limbo as tuf, sigstore and securesystemslib all have had changes that need releases before the three are compatible again :( Basically:

  • we'd like to use tuf 4.0 for the new API
  • but that's not possible before a new sigstore release (because of secusystemslib dependency incompatibility)

@jku jku mentioned this pull request May 6, 2024
@jku
Copy link
Member Author

jku commented May 8, 2024

Closing this for now, we have enough open PRs without drafts

@jku jku closed this May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to tuf 3.1
1 participant