Commit graph

11 commits

Author SHA1 Message Date
Aditya Sirish A Yelgundhalli
4ccc102f8e
*: Use person associatedIdentities to verify code review tool approvals
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-11-07 17:21:19 -05:00
Aditya Sirish A Yelgundhalli
17b058f7f4
*: Support multiple predicate versions
This commit moves existing implementations of attestation predicates into
subpackages to start supporting multiple versions in parallel.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-10-23 10:37:01 -04:00
Aditya Sirish A Yelgundhalli
2f0be5c46f
*: Refactor TUF
This is a massive commit that isn't easy to split up, my apologies to
reviewers. Here's everything that's happening.

First, the base tuf package now includes interfaces for RootMetadata,
TargetsMetadata, Rule, and Principal. The first two are self-explanatory. Rule
represents some protection rule, currently matched by the Delegation schema,
while Principal defines a new take on who a trusted party is. Existing schemas
have been moved into a v01 subpackage. v01 also includes a Key type based on
signerverifier.SSLibKey which implements the Principal interface. This means
that expectations elsewhere (such as in repository and policy) re a principal
can be met by existing policy metadata.

Second, with most of the policy metadata manipulations having moved to the tuf
package, this commit drops them from the policy package as they were thin
wrappers. While we originally kept them around for the purposes of migrating
versions when a repository must move from the old metadata schema to a newer
one, it doesn't make sense to implement this in every individual manipulation
function.

Finally, the rest of the packages that handle keys (for adding to metadata or
for signing / verifying) have been updated to use either
signerverifier.SSLibKey directly or the new Principal interface, depending on
what the purpose is. For now, the idea is to continue using the
signerverifier.SSLibKey representation of a key itself for the signature
verification flows, though we may eventually move that into gittuf rather than
rely on go-securesystemslib. Note that some of the transitions have been
included in this commit for compatibility reasons, and subsequent PRs will
update that. For example, the GitHub app pull request approval attestation must
be updated to not use tufv01.Key objects to represent approvers.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-10-15 12:58:44 -04:00
Aditya Sirish A Yelgundhalli
8a43f4fffd
*: Remove vendored signerverifier library
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-10-10 13:30:32 -04:00
Aditya Sirish A Yelgundhalli
f7dd00b7bd
*: Remove use of signerverifier dispatcher
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-10-09 12:59:32 -04:00
Pat Zielinski
d571facb8d *: Add copyright notice to code files
Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2024-09-27 15:28:12 -04:00
Aditya Sirish A Yelgundhalli
6093b595d2
third_party: Vendor go-securesystemslib/dsse
This vendors go-securesystemslib's dsse package in preparation for
adding support for DSSE signature extensions.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-09-26 14:29:00 -04:00
Aditya Sirish A Yelgundhalli
537c267bf0
*: Improve app attestations management
This commit includes several changes discussed with @wlynch synchronously.
Broadly speaking, the biggest changes are allowing the use of multiple apps in
tandem. There are some supporting changes such as making the GitHub instance
URL a parameter to the CLI / API rather than something read from the
environment.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-08-14 16:52:00 -04:00
Aditya Sirish A Yelgundhalli
575234ce05
*: Update code review approval layer to be forge agnostic and clarify docs
The code review approval layer is now agnostic to the code review system used.
The only system supported at the moment is GitHub's pull request approvals, but
we should be able to extend this to support GitLab, Gerrit, etc.

In addition, the GitHub app key add endpoint docs have been updated to clarify
what the purpose of the key is.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-08-14 11:16:58 -04:00
Aditya Sirish A Yelgundhalli
b49c0beae8
*: Refactor approval attestations
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-08-14 11:16:29 -04:00
Aditya Sirish A Yelgundhalli
d8f72d9fef
*: Add support for GitHub pull request approval attestation
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-08-14 11:16:28 -04:00