@@ -171,7 +171,47 @@ for it:
171
171
FATA[…] pulling image: rpc error: code = Unknown desc = SignatureValidationFailed: Source image rejected: A signature was required, but no signature exists
172
172
```
173
173
174
- The error code ` SignatureValidationFailed ` got [ recently added to
174
+ It's important to mention that CRI-O will match the
175
+ ` .critical.identity.docker-reference ` field within the signature to match with
176
+ the image repository. For example, if I verify the image
177
+ ` registry.k8s.io/kube-apiserver-amd64:v1.28.0-alpha.3 ` , then the corresponding
178
+ ` docker-reference ` should be ` registry.k8s.io/kube-apiserver-amd64 ` :
179
+
180
+ ``` console
181
+ > cosign verify registry.k8s.io/kube-apiserver-amd64:v1.28.0-alpha.3 \
182
+ --certificate-identity [email protected] \
183
+ --certificate-oidc-issuer https://accounts.google.com \
184
+ | jq -r '.[0].critical.identity."docker-reference"'
185
+ …
186
+
187
+ registry.k8s.io/kubernetes/kube-apiserver-amd64
188
+ ```
189
+
190
+ The Kubernetes community introduced ` registry.k8s.io ` as proxy mirror for
191
+ various registries. Before the release of [ kpromo v4.0.2] [ kpromo ] , images
192
+ had been signed with the actual mirror rather than ` registry.k8s.io ` :
193
+
194
+ [ kpromo ] : https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.0.2
195
+
196
+ ``` console
197
+ > cosign verify registry.k8s.io/kube-apiserver-amd64:v1.28.0-alpha.2 \
198
+ --certificate-identity [email protected] \
199
+ --certificate-oidc-issuer https://accounts.google.com \
200
+ | jq -r '.[0].critical.identity."docker-reference"'
201
+ …
202
+
203
+ asia-northeast2-docker.pkg.dev/k8s-artifacts-prod/images/kubernetes/kube-apiserver-amd64
204
+ ```
205
+
206
+ The change of the ` docker-reference ` to ` registry.k8s.io ` makes it easier for
207
+ end users to validate the signatures, because the cannot know anything about the
208
+ underlying infrastructure being used. The feature to set the identity on image
209
+ signing has been added to [ cosign] [ cosign-pr ] via the flag `sign
210
+ --sign-container-identity` as well and will be part of its upcoming release.
211
+
212
+ [ cosign-pr ] : https://github.com/sigstore/cosign/pull/2984
213
+
214
+ The Kubernetes image pull error code ` SignatureValidationFailed ` got [ recently added to
175
215
Kubernetes] [ pr-117717 ] and will be available from v1.28. This error code allows
176
216
end-users to understand image pull failures directly from the kubectl CLI. For
177
217
example, if you run CRI-O together with Kubernetes using the policy which requires
0 commit comments