Closed phbelitz closed 1 year ago
@phbelitz I'm trying to troubleshoot the issue, could you try adding a single line in your code under import
:
_ "github.com/notaryproject/notation-core-go/signature/jws"
.
(Note the underscore _
at the front of the import, since you are not directly using jws
package, it won't stand without this underscore.) Let's see if this could fix the issue. Thanks.
@Two-Hearts yes, awesome. I guess i should import the _ "github.com/notaryproject/notation-core-go/signature/cose"
aswell? Wasn't aware that those are necessary. Closing this as the problem was fixed.
I guess i should import the
_ "github.com/notaryproject/notation-core-go/signature/cose"
aswell?
@phbelitz Yes, since we support two signature formats at the moment. You should also import COSE as well.
What is not working as expected?
After integrating
notation-go
into a Kubernetes admission controller and trying to verify the imageghcr.io/deislabs/ratify/notary-image:signed
, verification fails withunable to parse the digital signature, error : signature envelope format with media type \"application/jose+json\" is not supported
.What did you expect to happen?
notation-go
should support signature formats it itself created and successfully validate the signature ofghcr.io/deislabs/ratify/notary-image:signed
.How can we reproduce it?
The image
ghcr.io/deislabs/ratify/notary-image:signed
was used and for verification the following certificate:Here a shortened version of the code I used (took away lots of the error handling and surrounding logic):
Describe your environment
Running inside a
distroless/base-debian11
container. The code was compiled to a binary using Go 1.19. The container itself is running inside a Kubernetes cluster as an admission controller.What is the version of your notation-go Library?
github.com/notaryproject/notation-go v1.0.0