Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support off-line mode for air-gapped environments #766

Open
pjbgf opened this issue May 3, 2024 · 6 comments
Open

Support off-line mode for air-gapped environments #766

pjbgf opened this issue May 3, 2024 · 6 comments

Comments

@pjbgf
Copy link

pjbgf commented May 3, 2024

An off-line mode would enable the use of slsa-verifier in air-gapped environments, which are isolated from any network connection for security reasons.

Cosign already support this, so I am assuming this would be possible by leaning on the same bundle file they use. The SLSA builders would also need to support this, as they would generate the bundle as part of the build process and upload it to the release, which would later be consumed by slsa-verifier.

@laurentsimon
Copy link
Contributor

@ramonpetgrave64

That should be doable. We do use the bundle. So we need to not query rekor and it should work. Then we can a flag --rekor-offline or something along these lines

@ianlewis
Copy link
Member

For sigstore signed provenance I would have thought that we would also need to point it at a local copy of the TUF root as well? but cosign seems to be able to verify without that so maybe not?

@pjbgf
Copy link
Author

pjbgf commented May 17, 2024

@ianlewis I believe you are right, in order to get this to work I had to do a cosign initialize pointing to a TUF root repository or it would try to reach out to the internet for it.

Which meant that for the offline checks to work as per tin description you needed a) somewhere in the air-gapped environment that repository had to be available, or b) the cosign container image (or environment) was already initialized.

@ianlewis
Copy link
Member

@pjbgf Ok yeah. that makes more sense.

@laurentsimon
Copy link
Contributor

@haydentherapper this came up I think before

@haydentherapper
Copy link
Contributor

TUF and airgapped environments don't work together and there really is no solution that doesn't involve deviating from the TUF specification. The Sigstore TUF client has no mechanism for an airgapped environment, the best we can do is cache until the timestamp expires which would force an online update.

I would recommend providing an API that allows a user to specify a trust root bundle which will be provided to the Sigstore verifier (Note this is assuming the use of sigstore-go, not Cosign). Then an online client can follow the TUF specification to maintain an up-to-date copy of trusted_root.json from Sigstore's TUF repo, and provide that root to the airgapped environment via whatever mechanism works for your environment.

You can see an example of this UX in https://github.com/sigstore/sigstore-python?tab=readme-ov-file#configuring-a-custom-root-of-trust-byo-pki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants