What is the problem you're trying to solve
We would like to use NRI for image signature verification at the container-runtime level. This control would be furthest-right in the process of deploying a workload in Kubernetes, making it a strong enforcement point and use-case for NRI.
Today, the only image information NRI exposes is the image reference, and only as a CRI annotation (io.kubernetes.cri.image-name). This is not ideal for signature verification because the images in this key are often unresolved (ex. referenced by tag instead of digests). Re-resolving the reference to a digest can cause race conditions and add latency to verification.
The container runtime already knows the resolved digests at container-creation time. It would be beneficial to surface them in the NRI request.
Describe the solution you'd like
Expose image digests as a first-class object on the NRI Container, rather than relying on a unresolved CRI annotation:
// Image identifies the container's image.
message Image {
string name = 1; // image reference, e.g. "registry.k8s.io/pause:3.10"
string digest = 2; // resolved image index or manifest digest, e.g. "sha256:..."
string config_digest = 3; // image config digest (platform-specific), e.g. "sha256:..."
}
Additional context
A PR with this feature has been created in #302, and I have corresponding PR in containerd to populate the new fields when this PR has been reviewed/merged. I wanted to create this issue first to get input from maintainers and see if they would be open to incorporating this feature. Thanks in advance for taking the time to read this!xa
What is the problem you're trying to solve
We would like to use NRI for image signature verification at the container-runtime level. This control would be furthest-right in the process of deploying a workload in Kubernetes, making it a strong enforcement point and use-case for NRI.
Today, the only image information NRI exposes is the image reference, and only as a CRI annotation (
io.kubernetes.cri.image-name). This is not ideal for signature verification because the images in this key are often unresolved (ex. referenced by tag instead of digests). Re-resolving the reference to a digest can cause race conditions and add latency to verification.The container runtime already knows the resolved digests at container-creation time. It would be beneficial to surface them in the NRI request.
Describe the solution you'd like
Expose image digests as a first-class object on the NRI
Container, rather than relying on a unresolved CRI annotation:Additional context
A PR with this feature has been created in #302, and I have corresponding PR in containerd to populate the new fields when this PR has been reviewed/merged. I wanted to create this issue first to get input from maintainers and see if they would be open to incorporating this feature. Thanks in advance for taking the time to read this!xa