Kyverno CLI Version
1.12.4
Description
I m writing a test for verify image policy with private registry and defining context variable from configmap. But Im unable to run the tests. Find the steps below
Steps to reproduce
- Created a verify image policy with private registry and a context defined
- Created a workflow for running the unit tests
- Steps in the workflow
- Login to private registry
- Installing cosign
- Installing kyverno cli
- Running the kyverno tests by defining the test as below
- kyverno-test.yaml file had the defined tests
- resource file had the pods to test
- variables.yaml file had the context variable substitution that is the public key
Expected behavior
The registry should be accessed and the policy should be tested
Screenshots
No response
Kyverno logs
cosign "msg"="image verification failed" "error"="no matching signatures:\nno valid tlog entries found unable to fetch Rekor public keys: updating local metadata and targets: error updating to TUF remote mirror: invalid key\nremote status:{\n\t\"mirror\": \"https://sigstore-tuf-root.storage.googleapis.com\",\n\t\"metadata\": {\n\t\t\"root.json\": {\n\t\t\t\"version\": 9,\n\t\t\t\"len\": 6766,\n\t\t\t\"expiration\": \"12 Sep 24 06:53 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"snapshot.json\": {\n\t\t\t\"version\": 148,\n\t\t\t\"len\": 2300,\n\t\t\t\"expiration\": \"30 Jul 24 16:06 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"targets.json\": {\n\t\t\t\"version\": 9,\n\t\t\t\"len\": 5478,\n\t\t\t\"expiration\": \"12 Sep 24 06:13 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"timestamp.json\": {\n\t\t\t\"version\": 201,\n\t\t\t\"len\": 719,\n\t\t\t\"expiration\": \"16 Jul 24 16:06 UTC\",\n\t\t\t\"error\": \"\"\n\t\t}\n\t}\n}\n no valid tlog entries found unable to fetch Rekor public keys: updating local metadata and targets: error updating to TUF remote mirror: invalid key\nremote status:{\n\t\"mirror\": \"https://sigstore-tuf-root.storage.googleapis.com\",\n\t\"metadata\": {\n\t\t\"root.json\": {\n\t\t\t\"version\": 9,\n\t\t\t\"len\": 6766,\n\t\t\t\"expiration\": \"12 Sep 24 06:53 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"snapshot.json\": {\n\t\t\t\"version\": 148,\n\t\t\t\"len\": 2300,\n\t\t\t\"expiration\": \"30 Jul 24 16:06 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"targets.json\": {\n\t\t\t\"version\": 9,\n\t\t\t\"len\": 5478,\n\t\t\t\"expiration\": \"12 Sep 24 06:13 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"timestamp.json\": {\n\t\t\t\"version\": 201,\n\t\t\t\"len\": 719,\n\t\t\t\"expiration\": \"16 Jul 24 16:06 UTC\",\n\t\t\t\"error\": \"\"\n\t\t}\n\t}\n}"
Slack discussion
No response
Troubleshooting
Kyverno CLI Version
1.12.4
Description
I m writing a test for verify image policy with private registry and defining context variable from configmap. But Im unable to run the tests. Find the steps below
Steps to reproduce
Expected behavior
The registry should be accessed and the policy should be tested
Screenshots
No response
Kyverno logs
cosign "msg"="image verification failed" "error"="no matching signatures:\nno valid tlog entries found unable to fetch Rekor public keys: updating local metadata and targets: error updating to TUF remote mirror: invalid key\nremote status:{\n\t\"mirror\": \"https://sigstore-tuf-root.storage.googleapis.com\",\n\t\"metadata\": {\n\t\t\"root.json\": {\n\t\t\t\"version\": 9,\n\t\t\t\"len\": 6766,\n\t\t\t\"expiration\": \"12 Sep 24 06:53 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"snapshot.json\": {\n\t\t\t\"version\": 148,\n\t\t\t\"len\": 2300,\n\t\t\t\"expiration\": \"30 Jul 24 16:06 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"targets.json\": {\n\t\t\t\"version\": 9,\n\t\t\t\"len\": 5478,\n\t\t\t\"expiration\": \"12 Sep 24 06:13 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"timestamp.json\": {\n\t\t\t\"version\": 201,\n\t\t\t\"len\": 719,\n\t\t\t\"expiration\": \"16 Jul 24 16:06 UTC\",\n\t\t\t\"error\": \"\"\n\t\t}\n\t}\n}\n no valid tlog entries found unable to fetch Rekor public keys: updating local metadata and targets: error updating to TUF remote mirror: invalid key\nremote status:{\n\t\"mirror\": \"https://sigstore-tuf-root.storage.googleapis.com\",\n\t\"metadata\": {\n\t\t\"root.json\": {\n\t\t\t\"version\": 9,\n\t\t\t\"len\": 6766,\n\t\t\t\"expiration\": \"12 Sep 24 06:53 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"snapshot.json\": {\n\t\t\t\"version\": 148,\n\t\t\t\"len\": 2300,\n\t\t\t\"expiration\": \"30 Jul 24 16:06 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"targets.json\": {\n\t\t\t\"version\": 9,\n\t\t\t\"len\": 5478,\n\t\t\t\"expiration\": \"12 Sep 24 06:13 UTC\",\n\t\t\t\"error\": \"\"\n\t\t},\n\t\t\"timestamp.json\": {\n\t\t\t\"version\": 201,\n\t\t\t\"len\": 719,\n\t\t\t\"expiration\": \"16 Jul 24 16:06 UTC\",\n\t\t\t\"error\": \"\"\n\t\t}\n\t}\n}"Slack discussion
No response
Troubleshooting