Skip to content

[Bug] [CLI] Verify Image test not working for private registry #10645

Description

@KavyaShree25

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

  1. Created a verify image policy with private registry and a context defined
  2. Created a workflow for running the unit tests
  3. Steps in the workflow
    1. Login to private registry
    2. Installing cosign
    3. Installing kyverno cli
    4. Running the kyverno tests by defining the test as below
      1. kyverno-test.yaml file had the defined tests
      2. resource file had the pods to test
      3. 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

  • I have read and followed the troubleshooting guide.
  • I have searched other issues in this repository and mine is not recorded.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingimageVerifyImage verification supporttype:clicli releated issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions