-
Notifications
You must be signed in to change notification settings - Fork 195
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
feat(notation): add support for notation in HelmChart and OCIRepository configuration #1075
Conversation
Thanks @JasonTheDeveloper for creating this PR! I'd be happy to help getting this over the line. Are you planning to add the missing tests and documentation anytime soon? Happy to chat on the CNCF Slack as well. |
7b8500a
to
83d7208
Compare
@makkes - I have added the missing tests. I'll be adding the documentation later today. Apologies for taking so long to getting around to finishing off this PR. Originally, I was holding off until notation 1.0.0 was released to the public just in case there were any major changes prior to going public. Looks like that happened a couple months ago 😅 |
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.
Thanks for this contribution @JasonTheDeveloper. I left some comments
1daaaf8
to
d068a41
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 put this in a separate PR?
2342a3e
to
ffb46dc
Compare
can you also rebase your branch? |
686b3ca
to
e35dc54
Compare
I've created a new func in 86e98fa and added unit tests in a4c93d9. |
03e7172
to
158184e
Compare
1ceb15b
to
d0d5832
Compare
7581f69
to
99b8cb5
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.
I did some manual testing with OCIRepository, tried various things to break the implementation but so far everything looks good to me.
TestOCIRepository_reconcileSource_verifyOCISourceTrustPolicyNotation
tests are great for confidence in the correctness.
I've left a few suggestions for minor improvements.
Will do final OCI HelmChart testing next.
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.
I did manual testing for OCI HelmChart verification and it also worked very well.
I'm confident with the results.
Going through the code, I found some potential bugs and inconsistencies, nothing major. Left comment for those. Please have a look.
Once these and the previous comments are addressed, I will approve this PR.
Thanks for all the work on this.
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 for spending so much time on getting this right.
Would be great if you could squash all the commits to a few relevant commits if possible.
54d3c3c
to
6d61914
Compare
@darkowlzz thank you so much for the approval! I tried to create separate squash commits to group things into "like" commits but it was taking too long so instead squashed everything into the one commit. Hope that's fine. |
@JasonTheDeveloper do you mind rewriting the commit message. You may want to have a look at https://github.com/fluxcd/flux2/blob/main/CONTRIBUTING.md#format-of-the-commit-message |
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
Awesome contribution! Thanks @JasonTheDeveloper and @jagpreetstamber 🥇
Introduces a new verification provider `notation` to verify notation signed artifacts. Currently only cosign is supported and that is a problem if the end user utilises notation. --------- Signed-off-by: Jason <[email protected]> Signed-off-by: JasonTheDeveloper <[email protected]> Signed-off-by: Jagpreet Singh Tamber <[email protected]> Co-authored-by: souleb <[email protected]> Co-authored-by: Jagpreet Singh Tamber <[email protected]> Co-authored-by: Sunny <[email protected]>
6d61914
to
553945a
Compare
@souleb something like this? Add verification support for notation signed artifacts |
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 for your outstanding contribution and your willingness to accommodate and work through all the changes requested.
This PR introduces notation as an additional option to cosign as a provider to verify the signature of source
helmchart
/ocirepository
deployment.This PR is related to issue #1072.
Testing
To test the changes to
helmchart
andocirepository
I have included a couple example configuration deployments underconfig/testdata/helmchart-from-oci
and/workspaces/source-controller/config/testdata/ocirepository
. These manifests are also deployed when runningmake e2e
.These manifests deploy a forked version of stefanprodan's
podinfo
, singed using notation and stored in my ghcr found here: https://github.com/JasonTheDeveloper?tab=packages&repo_name=podinfo.Sample trust store policy and public key needed for verification can also be found here: https://github.com/JasonTheDeveloper/podinfo/tree/feat/notation/.notation.
Todo
Expand on unit testsUpdate documentationAdd examplesflux create secret
to generate notation configuration