-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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): sign artifacts using notation #341
feat(notation): sign artifacts using notation #341
Conversation
Hey @JasonTheDeveloper thank you for this, I've been on a work trip this week but Monday I'll follow the steps and do a release for podinfo. |
Signed-off-by: Stefan Prodan <[email protected]>
Signed-off-by: Jason <[email protected]>
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 @JasonTheDeveloper 🏅
This crashed the release Error: failed to push signature to registry with error: failed to push manifest: PUT "https://registry-1.docker.io/v2/***/podinfo/manifests/sha256:f53fce2c3056c62205025f4f9b1bb2af4df4eb648d8677c8bb14d6fc47afb47c": response status code 404: notfound: not found |
I noticed that. Looking into it now. In my original testing I had not pushed the container to docker hub, only ghcr. Gimme a sec. |
I can remove the Docker Signing and try again if it should work on GHCR. |
I was about to suggest that. Looking through docs I believe the issue may be with Docker Hub itself. I thought Docker Hub supported OCI v1.1 as you can now push helm charts and SBOMs but I can't seem to find any actual information explicitly stating Docker Hub indeed supports the 1.1 spec. There was talk of adding backwards compatible in notation but that feature looks to be abandoned. |
Docker Hub is on 1.0 spec as far as I know. |
@JasonTheDeveloper I have removed the Docker Hub signing, and now 6.6.0 is out. Can you please test it our if the signatures for thr GHCR container image, chart and manifest artifacts are Ok? |
@stefanprodan I've made the changes to the e2e test. I've tested it locally to ensure switching to your build still work. They appear to work which is great! Just pushed and now I'm letting the pipeline run in my fork. |
This PR is associated with feat(notation): add support for notation in HelmChart and OCIRepository configuration and includes notation configuration used to sign artifacts and updated to the release workflow.
I have included my public cert used by others who want to validate the artifact they're deploying was signed by me, but you would need to generate your own and associated private cert.
Prep
To help with that, you can use the following
cnf
:Change the
req_distinguished_name
block if you like but just keep in mind, you'll also need to updatetrustedIdentities
in.notation/trustpolicy.json
to match.Save that to a file, something like
codesign.cnf
for example.Use the following commands to generate a new cert for signing and verifying:
openssl genrsa -out flux.key 2048 openssl req -new -key flux.key -out flux.csr -config codesign.cnf # Up to you how long you want the cert to last for. The below command uses 365 days openssl x509 -req -days 365 -in flux.csr -signkey flux.key -out flux.crt -extensions v3_req -extfile codesign.cnf
Take the resulting
flux.key
and copy the contents to a new secret in GitHub namedNOTATION_SIGNING_KEY
. Replace.notation/notation.crt
with the contents offlux.crt
.That's it! You should be golden.