Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cosign initialize as an init container to initialize TUF. #157

Merged
merged 7 commits into from
Aug 17, 2022

Conversation

vaikas
Copy link
Collaborator

@vaikas vaikas commented Aug 17, 2022

Signed-off-by: Ville Aikas vaikas@chainguard.dev

Summary

Release Note

Documentation

  • Policy Controller now uses TUF root that gets initialized in an init container.

@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2022

Codecov Report

Merging #157 (30f5a19) into main (9a4d6cc) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #157   +/-   ##
=======================================
  Coverage   63.40%   63.40%           
=======================================
  Files          26       26           
  Lines        2350     2350           
=======================================
  Hits         1490     1490           
  Misses        782      782           
  Partials       78       78           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@vaikas
Copy link
Collaborator Author

vaikas commented Aug 17, 2022

Hm, so cosign initialize is failing, but looks right to me:

cosign initialize --mirror http://tuf.tuf-system.172.18.255.1.sslip.io/ --root ./root.json
+ cosign initialize --mirror http://tuf.tuf-system.172.18.255.1.sslip.io/ --root ./root.json
Error: creating cached local store: stat root.json/tuf.db: not a directory
main.go:62: error during command execution: creating cached local store: stat root.json/tuf.db: not a directory
Error: Process completed with exit code 1.

@vaikas
Copy link
Collaborator Author

vaikas commented Aug 17, 2022

Ahaha, the TUF_ROOT env variable is used by sigstore/sigstore TUF to figure out where the root lives. Argh, that means I have to do some mungery until I can fix that in scaffolding.

vaikas and others added 6 commits August 17, 2022 13:45
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: cpanato <ctadeu@gmail.com>
Signed-off-by: cpanato <ctadeu@gmail.com>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
@vaikas
Copy link
Collaborator Author

vaikas commented Aug 17, 2022

Actually, after looking more deeply at how cosign does it, I do wonder if I should actually use the code from sigstore/sigstore/tuf directly and not bake in the init container. Please hold up on merging. I'll create a different PR to see if it makes more sense.

@vaikas vaikas merged commit 30f5a19 into sigstore:main Aug 17, 2022
@vaikas vaikas deleted the fix-tests branch August 17, 2022 14:50
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