-
Notifications
You must be signed in to change notification settings - Fork 547
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
Bug: Investigate issue in TUF root upgrades #1899
Comments
When I did a cursory investigation, I added a lot more logging to print out the target names - Probably worth adding that in to Cosign. |
Notes: It's not a consistent snapshot problem. It's a problem that we introduced a new target cosign/pkg/cosign/tuf/client.go Line 596 in 03e66aa
I think I need to clean up the targetImpl/setImpl, not sure I understand how the functionality is being separated cosign/pkg/cosign/tuf/client.go Lines 592 to 597 in 03e66aa
The embedded impl has a disk cache for the setter, but gets targets from the embedded repository, not the disk cache. cc @dlorenc OTOH when we do an initialize, then we have a targetImpl on diskcache with a getter that actually gets the updated targets in the disk cache cosign/pkg/cosign/tuf/client.go Line 567 in 03e66aa
So this problem is just a problem in our cached/updated target getters. |
One line fix is to switch to a diskCache if there's a need for an update in the embedded start workflow |
Is the only purpose of the embedded cache to start the workflow then? What happens with a purely in-memory initialize+update? |
In-memory initialize is kinda a no-op -- in-memory only makes sense during a verification. But yes, embedded is only for the start root -- if there's any updates it's a So my fix I think is to make it clear that embedded is a "starting state", and it eventually moves to a file impl on an update. |
On top of this |
Description
Investigate buggy behavior with consistent snapshots in the sigstore TUF root upgrade path:
Verifying with an upgraded TUF root that enables consistent snapshots causes a bug in a fresh environment. Explicitly calling
cosign initialize
and then verifying avoids the bug.Reproduced by replacing the default remote store to the
brokenv3
(consistent snapshot) branch of root-signing:cc @haydentherapper
Questions:
GetTargets
pulling targets from in each case?The text was updated successfully, but these errors were encountered: