Bug 1866268
Summary: | RFE:Cannot use image registry verification (sigstore) in combination with image registry whitelist | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Andy Bartlett <andbartl> |
Component: | Documentation | Assignee: | Servesha <sdudhgao> |
Status: | CLOSED NOTABUG | QA Contact: | Sunil Choudhary <schoudha> |
Severity: | medium | Docs Contact: | Latha S <lmurthy> |
Priority: | medium | ||
Version: | 4.5 | CC: | adam.kaplan, amurdaca, aos-bugs, bparees, dornelas, jokerman, jshepherd, lmurthy, nagrawal, obulatov, tsweeney |
Target Milestone: | --- | Keywords: | Reopened, UpcomingSprint |
Target Release: | 4.11.z | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-12-07 06:52:29 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Andy Bartlett
2020-08-05 09:15:15 UTC
This appears to related to configuring items via the MCO. Please file bugs against the component which you're dealing with. Apologies Scott and thanks for correcting that for me. Regards, Andy Ryan is on leave Urvashi, seems like CU is trying to manually modify a file we manage with the ContainerRuntimeConfig controller https://github.com/openshift/machine-config-operator/blob/master/pkg/controller/container-runtime-config/container_runtime_config_controller.go Is there a way for them to resolve this (preferred)? Or should we just document the files that are managed by the ContainerRuntimeConfig controller are not directly changeable in the MachineConfig and provide some update for the sigstore docs (fallback)? When you set allowedRegistries in the cluster wide Image CR, that edits the /etc/containers/policy.json file with the registries you are configuring as allowed. Looking at the sigstores steps, it is asking you to first manually create a policy.json and then create a Machine Config object for that. So the cu is using to different CR objects to make edits to the same file and the Image CR one is winning since it has a higher number. The solution here is to remove any allowed/blocked registries from the Image CR and to add it manually to the policy.json file being created to be used by MC as stated in the sigstores docs. You can look at the contents of /etc/containers/policy.json right now with the Image CR options set and copy/paste that to the policy.json file you are creating with the sigstores steps. Another way to pick up the sigstore policy.json is to rename the MC to have a higher number than 99, which will override the generated policy.json from 99-<hash>-registries so try 101-worker-registry-trust instead of 51-worker-registry-trust. We should probably document that if you are using sigstores, use a number higher than 99 for the MC name, or don't use the cluster-wide Image CR to modify allowed/blocked registries. I am not entirely sure if all the components that use the Image CR also use sigstore. @bparees, @adambkaplan, and @dmage do you know if it would be possible to extend the Image CR to support sigstore? I think we need a note somewhere in these two sections: https://docs.openshift.com/container-platform/4.11/security/container_security/security-container-signature.html#containers-signature-verify-enable_security-container-signature (basically a slightly updated version of https://access.redhat.com/verify-images-ocp4) https://docs.openshift.com/container-platform/4.11/openshift_images/image-configuration.html#images-configuration-file_image-configuration warning that changes to the image.config.openshift.io/cluster resource (as described in the first link) may overwrite/supersede any changes they may try to make to /etc/containers/policy.json directly (as described in the second link). I think the issue is with registrySources.allowedRegistries and registrySources.blockedRegistries specifically. According to https://issues.redhat.com/browse/RFE-1601 this conflict should eventually be fixed by https://issues.redhat.com/browse/OCPNODE-538 Thanks Andy. Will wait to hear from you. |