-
Notifications
You must be signed in to change notification settings - Fork 191
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
implement Cosign verification for HelmCharts #925
Conversation
141b3de
to
86330bf
Compare
18597a5
to
697f885
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a cosign keyless e2e test for https://github.com/stefanprodan/podinfo/pkgs/container/charts%2Fpodinfo
697f885
to
05db6bd
Compare
05db6bd
to
53dfbd8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add the verify
field to the HelmChart API spec doc.
In the OCIRepository controller there is a loop to collect |
We shouldn't verify all keys, if one is a match than it's all good IMO. This way we allow people to do key rotation, old artifacts will still be valid if the old key is in the secret. The same we do for SOPS and decryption keys. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're missing summarize.WithBiPolarityConditionTypes(sourcev1.SourceVerifiedCondition)
from the helmchart_controller.
53dfbd8
to
c3f7109
Compare
I have change the code and documentation to take this into account. |
c3f7109
to
21e648e
Compare
We discussed this with @darkowlzz and we think that we could persist a given chart Thoughts @stefanprodan @hiddeco @makkes Edit: The other option is to have Helm surface a digest field in the chart metadata as it does with the version. We would store it as part of the generated artifact. |
In |
21e648e
to
39a6832
Compare
Can someone remind me why we continue to prefer |
To be consistent with how we report the revision to consumers. The current format is |
This has overlap with the already proposed #855. |
If implemented the oras registry loginOption will only be used internaly with the specific ChartRepo struct. This will permit reusing more easily feature developped with googlecontainerregistry authn. Signed-off-by: Soule BA <soule@weave.works>
This remove test case for contextual login on oci://123456789000.dkr.ecr.us-east-2.amazonaws.com. This is not longer a wrong url since fluxcd/pkg@f7c66eb and we no longer error on nil auth. Signed-off-by: Soule BA <soule@weave.works>
If implemented, users will be able to enable chart verification for OCI based helm charts. Signed-off-by: Soule BA <soule@weave.works>
Signed-off-by: Soule BA <soule@weave.works>
Signed-off-by: Soule BA <soule@weave.works>
46466de
to
a794e28
Compare
a794e28
to
b179285
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested one last change.
Everything else looks good to me.
Delete a failed verification condition at the beginning of the source reconciliation and set `SourceVerifiedCondition` to false approprietly. Set the `BuildOptions.Verify` to true as long as Verify is enabled in the API fields. Signed-off-by: Soule BA <soule@weave.works>
b179285
to
06a5559
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not do an as thorough review as @darkowlzz, but did look at the outline and some common things I tend to nitpick on which all appear to be OK. Based on this, it looks good to me.
Thank you @souleb 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @souleb and @darkowlzz 🏅
Following this comment, it has bee decided to always perform verification for now. In a follow up Pull request we will propose pulling the digest in |
fixes #914
If implemented, users will be able to enable chart verification for OCI based helm charts.
The
remote builder
will not attempt to download the chart if an artifact exist with the same name and version and theforce
option is false. It will try to verify the chart if:HelmtChartSpec
has changed (generation drift)artifact
verificationartifact
in storageThe
helmChart
metadata does not contain thedigest
so we cannot rely on it to detect drift on the remote.Tests
Signed-off-by: Soule BA soule@weave.works