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

Replace cosign binary with bash wrapper [0.4] #1897

Conversation

simonbaird
Copy link
Member

@simonbaird simonbaird commented Aug 28, 2024

Same as #1873 but with an extra hack-cherry on top.

Ref: https://issues.redhat.com/browse/EC-817

lcarva added 2 commits August 19, 2024 13:33
It is now possible to initialize the TUF root directly with the ec-cli.
No need to use another binary, e.g. cosign, to perform this operation.

Ref: EC-584

Signed-off-by: Luiz Carvalho <[email protected]>
Modify the verify-enterprise-contract Task to no longer rely on the
cosign binary to initialize the TUF root. Instead, use the newly added
`ec sigstore initialize` command. As a consequence, the cosign binary is
also removed from the ec-cli container image.

Ref: EC-584

Signed-off-by: Luiz Carvalho <[email protected]>
@simonbaird simonbaird changed the title No cosign with wrapper v04 Remove cosign binary with backwards compatible bash script [0.4] Aug 28, 2024
@simonbaird simonbaird changed the title Remove cosign binary with backwards compatible bash script [0.4] Replace cosign binary with bash wrapper [0.4] Aug 28, 2024
@lcarva
Copy link
Member

lcarva commented Aug 29, 2024

Ha! I love it. If we're doing that approach, let's revert the change to the Task. This will tell us for user if the wrapper is working as intended.

@simonbaird simonbaird force-pushed the no-cosign-with-wrapper-v04 branch from 8103157 to d821d76 Compare August 29, 2024 15:10
@simonbaird simonbaird marked this pull request as ready for review August 29, 2024 15:10
@simonbaird simonbaird force-pushed the no-cosign-with-wrapper-v04 branch 4 times, most recently from 10d8b00 to d54394f Compare August 29, 2024 15:14
@simonbaird
Copy link
Member Author

New revision switches back to cosign initialize in the task, plus minor commentary tweaks.

Add a bash script wrapper for ec sigstore initialize that allows a
"cosign initialize" command to work.

It's a long story, but we're trying to remove the cosign binary from
the image. It's done already in main branch, but removing it from
this image in the release branch makes me worry about RHTAP users
since I'm not confident when or how they'd get an upgraded version
of the tekton task.

The task used by RHTAP users is in the tssc-sample-pipelines repo,
see [1] and [2], so we could update that, but it's possible that the
RHTAP users forked that repo, or copied the task and customized it,
etc. So there would be a good chance we'd break them if cosign was
removed.

Also changed the task definition back to "cosign initialize". Either
would work, but this way our test suite should confirm the
backwards compatibility wrapper script works as expected.

Ref: https://issues.redhat.com/browse/EC-584
Ref: https://issues.redhat.com/browse/EC-817

[1] https://github.com/redhat-appstudio/tssc-sample-pipelines/blob/822d9a01d031ceb772bd2cca0fc7495ad91ac3c1/pac/gitops-repo/gitops-on-pull-request.yaml#L11
[2] https://github.com/redhat-appstudio/tssc-sample-pipelines/blob/822d9a01d031ceb772bd2cca0fc7495ad91ac3c1/pac/tasks/verify-enterprise-contract.yaml#L107
@simonbaird
Copy link
Member Author

simonbaird commented Aug 29, 2024

I want to merge this a little after merging #1900 due to https://issues.redhat.com/browse/CLOUDWF-10542 .

@simonbaird simonbaird merged commit 34a7b6f into enterprise-contract:release-v0.4 Aug 29, 2024
5 checks passed
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.

2 participants