Skip to content

Integrate in-toto (link attestations) with rebuilderd - #1

Merged
adityasaky merged 1 commit into
in-toto:in-toto-rebuilderdfrom
joyliu-q:add_in_toto_attestation
Aug 16, 2021
Merged

Integrate in-toto (link attestations) with rebuilderd #1
adityasaky merged 1 commit into
in-toto:in-toto-rebuilderdfrom
joyliu-q:add_in_toto_attestation

Conversation

@joyliu-q

@joyliu-q joyliu-q commented Aug 10, 2021

Copy link
Copy Markdown

The following PR is part of the Google Summer of Code 2021 program.

The in-toto GSoC project is to develop in-toto-rs capabilities to support rebuilderd (Issue in-toto/in-toto-rs#4), which includes two parts:

  1. Add runlib.rs; implement link generation using in_toto_run.
  2. Use in_toto_run and link generation within rebuilderd.

This PR addresses part 2.

Features

  • Make relevant changes to rebuilderd.db with SQL migrations (add has_attestation field to packages, remove attestation field from packages, and add attestation to builds to store link attestation)
  • Update models to reflect db changes
  • Integrate in_toto_run function to run and generate link attestation based on rebuild with contextual link name
  • Store attestation and has_attestation in DB when Build is good
  • Create API endpoint for rebuilderd to get link attestation data from db.

@joyliu-q joyliu-q changed the title Add in-toto attestation to rebuilderd.db Integrate in-toto (link attestations) with rebuilderd Aug 10, 2021
Comment thread worker/src/main.rs Outdated
@adityasaky
adityasaky changed the base branch from main to in-toto-rebuilderd August 10, 2021 19:39
@adityasaky

Copy link
Copy Markdown
Member

Updated the base branch to avoid merge littering when we want to upstream it later.

@adityasaky
adityasaky marked this pull request as ready for review August 11, 2021 21:45
@adityasaky

Copy link
Copy Markdown
Member

Marked this as ready for review based on the demo today, @joyliu-q. I'm going to take a look at it in a bit, do you have anything to push up to this one? 😄

@adityasaky adityasaky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks great, @joyliu-q, excellent work! I have some minor nits. Please note as a rule of thumb that it's better to keep the changes in a PR strictly related to the subject at hand. I think some formatting changes have crept in here, and they can litter the history of those lines of code.

Comment thread daemon/migrations/2021-08-06-184605_add_attestation/up.sql Outdated
Comment thread tests/src/main.rs Outdated
Comment thread tools/src/schedule/archlinux.rs
Comment thread tools/src/schedule/archlinux.rs
Comment thread tools/src/schedule/debian.rs
Comment thread worker/src/rebuild.rs Outdated
Comment thread worker/src/rebuild.rs Outdated
Comment thread worker/src/rebuild.rs Outdated
Comment thread worker/src/rebuild.rs Outdated
Comment thread worker/Cargo.toml Outdated

@SantiagoTorres SantiagoTorres left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, modulo two very small nits!

Comment thread tests/src/main.rs Outdated
Comment thread worker/Cargo.toml Outdated

@adityasaky adityasaky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, save the as yet open comments about autoformatting + in-toto version in the manifest. Great work, @joyliu-q!

@joyliu-q
joyliu-q force-pushed the add_in_toto_attestation branch from 439e0d7 to 602ee27 Compare August 16, 2021 20:26
@joyliu-q
joyliu-q force-pushed the add_in_toto_attestation branch from 602ee27 to 6ee44d4 Compare August 16, 2021 20:28

@adityasaky adityasaky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM again, @joyliu-q, thanks for cleaning up the history :)

@adityasaky
adityasaky merged commit 43726e8 into in-toto:in-toto-rebuilderd Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants