-
Notifications
You must be signed in to change notification settings - Fork 23
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
Unable to sign using a secured certificate #54
Comments
My bad, making a test I effectively discover the AKV trick, where the public cert data is stored as secret but hidden in the console (I thought it was something custom in the plugin) ! So I understand better the code in the plugin, that makes sense, except the fact when you make a CSR + upload the signed cert you bought I guess most of the time you don't have the fullchain cert. I'm not even sure if we can upload a pem file with multiple certs.
Probably points 2. and 3. are more related to notation tool itself. |
Hi @gillg , Thanks for using notation and notation AKV plugin. Here are answers to some of your questions:
We also want to understand more about your issue. Could you elaborate on how you create the certificate in Azure key vault? Any guide you follow? You are also welcomed to join the slack channel of Notary-v2, here is the link https://cloud-native.slack.com/archives/CQUH8U287. Let me know if you meet any issues of joining the slack channel. |
Thank you @yizha1 ! Indeed I already used I also used the doc to configure a trustpolicy but it's not better. As I understood the trustpolicy use local certs to compare your cert chain, but it can't "complete" your missing chain (like the OS or the browsers are doing for regular HTTPS). In my use case:
Now if I want to update it I have to create an new CSR and pay for a new cert... I would else be able to update the AKV secret (seems not possible because it's a "managed" secret). Else I was suggesting to let "notation" check in the OS cert store if it can find the assiciated cert chain as fallback instead of asking AKV. |
Thanks @gillg for providing more information. We will take a look and get back to you. |
The issue you met was during According to certificate requirement, valid certificate chain should be provided for
Any comments or suggestions are welcome. Do you have any urgency in solving this issue? It will help if you can share more background on your use case and the problem you want to solve. Feel free to provide comments here or ping me from slack Yi Zha Thanks/Yi |
This issue will be addressed by a feature request on #58 |
It's a lot more better ! Now I have another error but I guess related to notation itself.
|
@gillg which version of notation CLI are you using? Currently docker hub is not compatible with notary signature. Here are the registries compatible with Notary:
|
Ok good to know ! I missed this information initially. I will think about next steps if we want to implement signature on my company. Are you aware about a potential dockerhub support? |
I don't have the timeline that when dockerhub will support it. It could depend on when OCI 1.1 spec is released. |
In the meantime I saw "docker trust" and they explained it's based on notary server. |
The notary server mentioned in "docker trust" referred to sub-project notary under notary project, see https://github.com/notaryproject/notary. Notation CLI is another sub-project under notary project, providing new experience of signing and verifying. They are different. |
I currently use an EV cert hosted on Azure KeyVault, and I can't use this plugin to use it.
I'm not 100% sure if it's because the key is "unexportable" (mandatory by the EV nature) or if it's just the internal method
key.CertificateChain
which is just not generic.This method seems retrive the public certificate chain in a secret... I don't understand why ?
In parallel I tried to use
az keyvault certificate download --encoding PEM
to store the leaf cert innotation cert add
but it seems useless.In my opinion, to get the full cert chain, we should not rely on Azure KeyVaut. KeyVault should just export the public leaf cert part, then the plugin should check the notation certs visible in
notation cert ls
, and fallback on the OS cert store, to find the issuers chained.Exemple of current error :
By the way there is a lack of logging in this module in case of error.
Adding some debug traces in case of error, using the standard flag
--debug
could be useful.Example :
notation sign --key My-Key-Name docker.io/library/golang:1.16 --debug
The text was updated successfully, but these errors were encountered: