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

cli: --offline means fully offline #1143

Merged
merged 5 commits into from
Sep 26, 2024
Merged

cli: --offline means fully offline #1143

merged 5 commits into from
Sep 26, 2024

Conversation

woodruffw
Copy link
Member

@woodruffw woodruffw commented Sep 26, 2024

With this change, --offline also disables TUF
repository updates and not just online log lookups.

Needs unit and integration tests; working on that now.

Closes #483. Closes #376.

CC @sethmlarson

With this change, `--offline` also disables TUF
repository updates and not just online log lookups.

Closes #483.

Signed-off-by: William Woodruff <[email protected]>
@woodruffw woodruffw added component:cli CLI components component:verification Core verification functionality labels Sep 26, 2024
@woodruffw woodruffw self-assigned this Sep 26, 2024
@woodruffw
Copy link
Member Author

Bundle verification in the offline tests passes:

test/unit/verify/test_verifier.py::test_verifier_bundle_offline[bundle.txt] PASSED [ 95%]
test/unit/verify/test_verifier.py::test_verifier_bundle_offline[bundle_v3.txt] PASSED [ 96%]
test/unit/verify/test_verifier.py::test_verifier_bundle_offline[bundle_v3_alt.txt] PASSED [ 96%]

I think the last remaining thing to do here is figure out an appropriate log/warning message to raise: passing --offline now means that the user doesn't get the security benefits of checking the TUF repo for revocations. The security impact of this may be marginal in practice (especially if the local trust root was updated recently anyways), but we should still notify the user that their posture is slightly different.

Signed-off-by: William Woodruff <[email protected]>
@woodruffw woodruffw merged commit af8c575 into main Sep 26, 2024
27 checks passed
@woodruffw woodruffw deleted the ww/fully-offline branch September 26, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:cli CLI components component:verification Core verification functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: --offline should mean fully offline _internal/tuf: Avoid constant metadata updates
2 participants