Move known roles in TUF by loosebazooka · Pull Request #826 · sigstore/sigstore-java

Choose a reason for hiding this comment

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

I don't think we were ever using the enum at parsing time. It looked like we were using the enum as a naming constraint within the code.

The description for Roles is here: https://theupdateframework.io/metadata/

But functionally, it's an object in an entity that is used to sign metadata.

So root contains roles for root, snapshot, timestamp and targets (the RootRole in this PR)
Target can contain roles for delegations (more targets) and these delegations can contain more roles for more delegations (creating some sort of tree).