Skip to content
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

How to set a public key to provider cache? #53

Open
jacckyyy opened this issue Apr 10, 2023 · 9 comments
Open

How to set a public key to provider cache? #53

jacckyyy opened this issue Apr 10, 2023 · 9 comments
Labels
question Further information is requested

Comments

@jacckyyy
Copy link

jacckyyy commented Apr 10, 2023

When I have deployed the provider, template and constraint, but I encounter an error (response: {"errors": null, "responses": null, "status_code": 400, "system_error": "key is not found in provider cache"}) when trying to deploy the example yaml file. How can I set the public key in the cache? thanks..

@jacckyyy jacckyyy added the question Further information is requested label Apr 10, 2023
@Dentrax
Copy link
Member

Dentrax commented Apr 10, 2023

Hi @jacckyyy,

Actually I have no idea where is key is not found in provider cache throwing from. Could please share the steps you have followed, full logs, HTTP response, and some kind of other stuff to reproduce this? Thanks.

@jacckyyy
Copy link
Author

Hi @Dentrax,
I'm sorry, my previous description was too brief. My steps were based on the article in the following link.

https://github.com/sigstore/cosign-gatekeeper-provider

Starting with the installation of gatekeeper, and installed cosign-gatekeeper-provider,
image

image

finally confirmed the deployment of ConstraintTemplate and Contraint policy.
image

image

However, at the last step, when I verified the signature using the example in the policy/example, I got the following error message regardless of whether I signed with cosign or not.
image

image

It seems that the provider did not set the public key. I don't know what the problem is with this part? Did I miss anything? Thanks... Orz

@mjramer
Copy link

mjramer commented Apr 10, 2023

+1
getting the same error response

@etiennegrignon-intuit
Copy link

Hitting the same issue with gatekeeper 3.14.0. @Dentrax Could it be something not working with Gatekeeper internal cache? I tried disabling it and still getting the same error. It seems gatekeeper is not even calling the external provider when printing that error.

@bsher21
Copy link

bsher21 commented Mar 21, 2024

https://github.com/open-policy-agent/frameworks/commits?author=nilekhc
@nilekhc @jacckyyy I am also facing the same issue "key is not found in provider response cache" could you please guide us how to resolve it. Thanks

@houdini91
Copy link

UP + 1

@houdini91
Copy link

@etiennegrignon-intuit
Copy link

etiennegrignon-intuit commented Mar 26, 2024

@houdini91 Thank you! Upgrading Gatekeeper to 3.15 and setting --external-data-provider-response-cache-ttl=0 seems to help address the issue. Not sure why cache needs to be disabled for the provider to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants