Replies: 2 comments 1 reply
-
Moving to a discussion to capture the info, with closure on inactive issues. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Updated the command output / dump of the SIF signature as these now look a bit different from when I first wrote this. Noting that @tri-adam is the main contact r.e. SIF and signing / verification at Sylabs. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all - I was asked to write a bit from the Singularity point of view r.e. Notary v2 and ORAS. I figured it'd be good to just get something down quickly on an issue here, and let others from Sylabs and elsewhere comment, rather than delaying. Also, I don't want to clog up the main scenarios documents etc. with background that isn't very relevant.
Singularity Signing - Background
Singularity's main container format is a single
.sif
file. The SIF file can have multiple descriptors - with one of those pointing to a container rootfs, which is a squashfs.We can
singularity sign
an image that we are happy with using a PGP keypair (I have a single one setup here, so no prompts/specification of which key)...Singularity is computing the signature over the objects in the SIF. Some runtime metadata is, for historical reasons (singularity used to use bare squashfs images), inside the rootfs. This is changing as we transition metadata into SIF descriptors fully.
The signature is appended as a new descriptor in the SIF file...
The SIF container image can be
singularity verify
-ed using the public key added into the local keyring used by Singularity, or with retrieval from a keyserver as part of our Cloud/Enterprise product....You can
singularity sign
an image multiple times, with multiple keys, e.g. as an image goes through a QA pipeline. The singularity runtime can be configured to require a valid signature associated with any of N keys, all of N keys, etc.If I dump the signature portion of the file you'll see that there's a structure describing digests of the header and data objects in the SIF, and a PGP signature over that.
Singularity Interest in Notary v2
There are 2 areas of interest for us with Notary v2:
1. Handling Notary v2 OCI/docker images
Much use of Singularity is to run OCI/docker images on systems where Singularity is the preferred container runtime. When Notary v2 gets out into the wild and is adopted, we need to be able to deal with pulling/converting/running signed stuff in a nice manner.
We are using
containers/image
,openSUSE/umoci
etc. to handle ourdocker://
and other docker/OCI related source URIs - so it's likely we benefit from other's implementations of verification. We do need to understand how things are going to work, though, to make sure we fit it all in nicely to the singularity CLI and workflow that people are familiar with.2. Singularity Images Distributed via ORAS
We have functionality for distributing Singularity
.sif
file images via registries that support ORAS.We need to understand how signing will be implemented for arbitrary artifacts. We'd like to develop thoughts around how a Notary v2 ORAS signing model can be implemented in the Singularity CLI such that it doesn't feel like a completely separate 'add-on' to the native signing/verification of our SIF images.
We need to think about what the relationship is between a signature embedded in a SIF image, and a Notary v2 signature associated with an SIF image artifact. A signature over the artifact 'wraps' the entire content of the SIF file, including its embedded signatures.
Scenarios
We'll try to have a think about some specific scenarios that involve Singularity - but generally it's the same kind of stuff as in the existing scenarios PR, but with Singularity as software used to build/execute/both a container. We might be building/pushing/running SIFs, or we might be pulling and running signed OCI/docker stuff.
Beta Was this translation helpful? Give feedback.
All reactions