Add sigstore verification for registry.access.redhat.com#276
Conversation
Bluefin LTS uses a CentOS base that does not include the gpg key for registry.access.redhat.com. It does have the sigstore key though. Here the sigstore method is added to policy.json. This addition avoids signature verification failure when trying to pull images from registry.access.redhat.com (like the ubi images) with podman on Bluefin LTS. See ublue-os/bluefin-lts#1292 for more context.
There was a problem hiding this comment.
Code Review
This pull request updates the container image policy in policy.json to include Sigstore verification for Red Hat registries. The feedback highlights a critical logic issue: adding the sigstoreSigned requirement alongside the existing signedBy GPG requirement creates a logical AND condition. Because the GPG key is missing in the target environment, this configuration will cause image pulls to fail. The reviewer suggests replacing the GPG requirement with the Sigstore one to ensure successful verification.
| }, | ||
| { | ||
| "type": "sigstoreSigned", | ||
| "keyPath": "/etc/pki/sigstore/SIGSTORE-redhat-release3", | ||
| "signedIdentity": { | ||
| "type": "matchRepository" | ||
| } | ||
| } |
There was a problem hiding this comment.
In policy.json, the list of requirements for a specific registry scope is evaluated as a logical AND. By adding the sigstoreSigned requirement while retaining the existing signedBy (GPG) requirement, you are requiring that images satisfy both verification methods.
Since the PR description states that Bluefin LTS does not include the GPG key at /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release, the signedBy check will continue to fail even if the sigstore signature is valid. Furthermore, this change makes the policy stricter for all other systems: any system that currently has the GPG key but lacks the new sigstore key will now fail to pull images from this registry because both signatures are now mandatory.
To achieve the goal of allowing sigstore verification on systems without the GPG key, you should likely replace the GPG requirement with the Sigstore one, as policy.json does not natively support 'OR' logic within a single requirement list. Additionally, consider if registry.redhat.io (line 23) requires a similar update for consistency.
|
The current PR was based on the Dosu feedback:
However, actually checking the spec I see:
So it looks like Gemini is right and Dosu is wrong here. That means we should not merge this PR in its current form. We need to decide between the options:
|
|
Just knowing it's an issue is still worth it, thanks! |
|
🤖 AI-Assisted Pull Request Review Just wanted to weigh in and support @wshanks' excellent analysis regarding the draft. The Policy.json Logical AND Caveat: Since CentOS base/Bluefin LTS images lack the GPG release key ( Recommendations:
|
|
I checked the Bluefin stable and Dakota images (I think that should cover all Bluefin variants? All deriving from the Fedora, CentOS, or GNOME OS bases?). In the Dakota image, /etc/containers/policy.json just has So I think the choices are:
I think 1 and 2 are preferable but I am not sure in which repos you would add keys to the images. By the way, when I first tried check the policies for Bluefin stable and Dakota, I tired to use Claude tells me this though I didn't dig to a solution:
I just downloaded the ISOs and booted them as VMs to test |
hanthor
left a comment
There was a problem hiding this comment.
Adding sigstore verification alongside the existing trust policy for is the correct fix for Bluefin LTS — the CentOS base ships the sigstore key but not the GPG key, so this unlocks podman pulls of UBI images without signature failures. CI passes. Approved.
Hmm, but my understanding (from #276 (comment)) is that these policies are additive. So this current PR will require both sigstore and gpg verification which would fail for both Bluefin LTS and Bluefin since each only has one key or the other (sigstore for CentOS and gpg for Fedora). Somehow I think we need to add either a sigstore key to Bluefin or a gpg key to CentOS (or we could do both and then this PR would be consistent). |
🤖 Copilot Test ReportBranch: Test Results
Actual ChangeThe meaningful change is surgical — adds sigstore verification entry to {
"type": "sigstoreSigned",
"keyPath": "/etc/pki/sigstore/SIGSTORE-redhat-release3",
"signedIdentity": { "type": "matchRepository" }
}The diff vs main shows 116 commits of drift but the actual intent (policy.json change) is a 7-line addition. Reviewers: the policy file change is what matters here.
|
Bluefin LTS uses a CentOS base that does not include the gpg key for registry.access.redhat.com. It does have the sigstore key though. Here the sigstore method is added to policy.json. This addition avoids signature verification failure when trying to pull images from registry.access.redhat.com (like the ubi images) with podman on Bluefin LTS.
See ublue-os/bluefin-lts#1292 for more context.
Refs #276common