OCI based IPA image distribution #3695
Replies: 1 comment 3 replies
|
Hi, Ironic maintainer here (and the person who drove Ironic's OCI url support). I personally like the basic idea to use basic idea presented here, but I see tensions between use models which we need to figure out. On the developer/process engineer the mental idea would be to just point to the higher level tag for auto-identification and download of the needful artifacts, however if I put on the security hat many customers and business tend to wear coupled with the context of some recent CVEs I've worked, the requirement of just trusting the remote server and images to use to a tag (even an immutable tag) becomes a security risk which needs to be managed. Specifically on the consuming side I need to know and assure the checksums match what I'm expecting. Meaning the high security operational side consumption model is very different than the development side convenience of use model. The key takeaway in such a use model is that the information security side of folks will expect digest references with individual mappings That doesn't really inherently conflict with what is proposed, just actual operational usage will vary and quite possibly operators may just be willing or need to point at the specific digest representing the json structure for the end artifacts. As a note, we're not presently modeled that way, we assume any digest manifest with multiple layers is an actual container, because dimension wise, the OCI model can head in basically either direction. That is not insurmountable, but declaring a specific artifact or media type in the schema would be the needful to label the digest. On the side of getting other artifacts, I do really like the idea of extending the retrieval logic to support URLs instead of just expecting files as referenced by path. Operational security wise, I think the same concern appears though and I think the use pattern required would need to boil down to explicit structural artifact digests being pointed at in a 1:1 mapping to maintain the service side configuration and control of the end destination, because otherwise somehow the expected locations need to be modeled and stored in the OCI server which seems like the door is being opened to a mix of attacks and also sort of ties the operators hands if they need to massage the structure because all trust gets placed in the OCI server yet their infosec team is going to demand a digest reference as any starting point and then they would have to independently be able to audit the oci server's contents. Not saying impossible, just the structural barrier is human context based as well. I'm not sure how comfortable other ironic cores will be with invoking the file download service to retrieve items on service start, but its worth a discussion. Hopefully my minimally caffeinated mind this morning is getting this across in a way which makes sense! Please let me know if you have any questions or want to discuss. In the mean time, it looks like @dtantsur has started to raise the discussion on Ironic's PTG etherpad. I'm going to go put some thoughts in there as well. |
Uh oh!
There was an error while loading. Please reload this page.
This discussion aims to clarify what we want to effectively do to store IPA images as OCI artifacts before doing a new design doc.
This is the continuation of the discussions in the metal3-io/metal3-docs#712 PR
Here is a quick summary of the initial design proposal and the discussions around it, I skipped the details specific to the proposal on purpose to drive this discussion around how we should store/distribute :
I then agreed on this subject but I believe we want to have the IPA image distributed under a single OCI tag, to do so we would need to define a manifest structure to hold both the kernel and initramfs within it (and I could even argue we'd like the EFI bootloader here as well).
However I also think we need alignment with Ironic on this subject, so that Ironic could at some point also consume that single manifest. During community meeting, @dtantsur said he could help conveying the idea to Ironic PTG.
My renewed proposal would be to have the tag pointing to a regular OCI index, with each entry in the index pointing to an arch specific manifest (standard multi-arch support), then the architecture specific manifest would contain annotated pointers to both the kernel and initramfs, allowing a compatible fetcher to distinguish the kernel from initramfs (or even ISO). The manifest would be compliant with the ORAS specifications.
The
artifactTypecould be something akin toapplication/vnd.ironic.imageThe annotation could be the standard
org.opencontainers.image.titlewith a well known filename, or a custom annotation likeorg.opendev.openstack.ironic.image-role(with values likekernel,initrdoriso).Here is a manifest example (checksums are placeholders) with both the
image.titleand custom annotation:{ "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "artifactType": "application/vnd.ironic.image", "config": { "mediaType": "application/vnd.oci.empty.v1+json", "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", "size": 2 }, "layers": [ { "mediaType": "application/vnd.oci.image.layer.v1.tar", "digest": "sha256:d2a84f4b8b650937ec8f73cd8be2c74add5a911ba64df27458ed8229da804a26", "size": 12, "annotations": { "org.opencontainers.image.title": "ironic-python-agent.kernel", "org.opendev.openstack.ironic.ki-role": "kernel" } }, { "mediaType": "application/vnd.oci.image.layer.v1.tar", "digest": "sha256:d2a84f4b8b650937ec8f73cd8be2c74add5a911ba64df27458ed8229da804a26", "size": 12, "annotations": { "org.opencontainers.image.title": "ironic-python-agent.initramfs", "org.opendev.openstack.ironic.ki-role": "initrd" } } ], "annotations": { "org.opencontainers.image.created": "2023-08-03T00:21:51Z" } }All reactions