theupdateframework / theupdateframework/rust-tuf

rust-tuf doesn't support diamond delegations

Open
#381 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
198
Forks
39
Avg merge
9h 19m
Merged PRs (30d)
2

Description

While writing a delegation builder, I noticed that while we have a test for diamond delegations, it doesn't actually work. Consider this delegation tree:

 targets
 /     \
A       B
 \     /
    D

Where D is signed correctly by B, but not signed correctly by A.

Both Client::lookup_target_description and Client::target_description_with_start_time will visit:

  • targets
  • A
  • D (error, A did not sign D. marking as visited)
  • B
  • skip D since it was already visited.

We need to update these delegations as visited only if we decided the delegation is trusted.

Contributor guide

No contributing guide indexed for this repository

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 with the diamond delegation integration test in tuf/tests/integration.rs, then trace Client::lookup_target_description in tuf/src/client.rs and Client::target_description_with_start_time in tuf/src/database.rs. Verify how delegations become visited when a signature check fails, and update the behavior so D can be considered through B after A does not trust it; the existing diamond delegation scenario should then work correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.