jku / repository-playground

Community artifact repository workflow experiments
Other
7 stars 4 forks source link

define TUF metadata layout #4

Open jku opened 2 years ago

jku commented 2 years ago

We might not have all the information we need to create a final metadata structure but I think we should still go ahead and build one: It would be good to have actual metadata in a repository ASAP.

jku commented 2 years ago

I'm trying to create a layout that provides the sort of delegation that the client features requires, and that I think could be maintained by the (so far vague) developer tool mechanisms and admin processes we've discussed.

Maintainer keys

There are two levels of maintainer keys. This is not something maintainers need to manage themselves or even care about much: they only need to know that the ability to approve key changes has a delay (because repository admins only promote keys as part of a periodical admin signing).

Maintainer key types:

  1. new: An existing maintainer has added a key into keys-X. This gives the new key permissions to sign targets changes in targets-X
  2. promoted: A repository admin has taken the keys from keys-X and promoted (copied) them to the delegating bin-NNN. This gives the keys permssion to sign key changes in keys-X

So a maintainer only ever needs one key: first it is added to keys-X by an existing maintainer and later the same key is also promoted (copied) to bin-NNNN (this is automatic from maintainers POV, just takes some time). The purpose of the two levels is to make sure that maintainers can do immediate key changes without forcing repository/admin targets keys to be online.

Admin processes

This layout requires repository admins to resign the bins-layer once in a while to

Delegation layout

Metadata layout should have:

The layout should make sure the role name never starts with a project-specific variant: this allows the layout to change in future as new prefixes are safe to use.

Potential example:

In this example these roles are signed by