theupdateframework / theupdateframework/python-tuf

repository: maybe provide a Repository.get_delegating_role()

Open
#2,552 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I wonder if Repository.get_delegating_role(role: str) -> str would be useful

  • In my implementations I end up looking up the delegating role of a role quite a lot.
  • if this existed, Repository could also offer QOL things like Repository.get_verification_result(role, md)

The reason this does not exist is that we can't really provide a fully generic implementation: Repository does not maintain a delegation tree. So we could

  • Require all Repository implementations to provide the method OR
  • Provide a default implementation that assumes max one level of targets delegations (and require more complex implementations to provide their own) OR
  • Provide a default implementation that adds a delegation tree into Repository

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 reviewing the Repository API and its implementations to see how delegating roles are currently looked up and how delegation trees are represented. The main task is to resolve whether Repository should require the method, provide a one-level default, or maintain a delegation tree; done requires an agreed API and behavior for the proposed role lookup and related quality-of-life methods.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Feature
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.