theupdateframework / theupdateframework/python-tuf

repository: redesign needed after recent verify_delegate changes

Open
#2,493 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
Python
Stars
1.7k
Forks
304
Avg merge
1d 2h
Merged PRs (30d)
17

Description

The Repository interface looks like it does largely because of needs from A) verify_delegate and B) sign: Both needed to be called on a Metadata object and former event took a Metadata object as argument. This meant Repository.open() needed to return a Metadata even though most users could just use helpers like root() or edit_root()

The recent Metadata refactor means verify_delegate is now in Root/Targets, and takes a bytes and signatures as argument. So Repository.open() is now even more awkward than it used to be.

The remaining uses for Metadata are de/serialization, and accessing sign(), signatures and signed_bytes -- possibly these could be handled within Repository.open() /close() so that open() did not return a Metadata object and close did not require one as argument.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Repository.open() and close() interface alongside Metadata, Root, Targets, verify_delegate, and sign. Clarify how serialization, signatures, and signed bytes should be handled, then define a consistent redesigned Repository lifecycle and update its callers accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.