Skip to content

Conversation

emilejbm
Copy link
Owner

@emilejbm emilejbm commented Apr 10, 2023

Summary

Resolves sigstore/sigstore#483
Preliminary attempt to solve the issue of the offline flag still requiring network access. This fork of sigstore-python in combination with a modified python-tuf repository allows sigstore to operate in offline mode if valid local metadata is available.

Example of modified tuf: https://github.com/emboman13/python-tuf-lazy-refresh

Reviewers can test this PR by creating a python virtual environment where both of these forks are installed as well as the rest of sigstore dependencies. Create an artifact and sign it with sigstore. Verify the bundle of files with --offline passed in to the cli and WiFi fully turned off. Verification is expected to return success as long as signing material was valid at one point.

(pip install git+https://github.com/emboman13/python-tuf-lazy-refresh/#egg=tuf)

Currently looking into signing and verifying an artifact using a faketime library. Needs unit tests and possibly a better way to grab the offline flag from arguments.

Release Note

--offline allows sigstore to operate with network access fully turned off.
TrustUpdater within tuf.py has an updated config with the offline flag if found from system arguments.
Catches a new exception from tuf (NetworkUnavailableError).

Documentation

TUF updater skips the checking the expiry of data in the case that local metadata is loaded.

Signed-off-by: Emile Baez <ebaezmunne@gmail.com>
Signed-off-by: Emile Baez <ebaezmunne@gmail.com>
Signed-off-by: Emile Baez <ebaezmunne@gmail.com>
Signed-off-by: Emile Baez <ebaezmunne@gmail.com>
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

Successfully merging this pull request may close these issues.

1 participant