-
Notifications
You must be signed in to change notification settings - Fork 164
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
Publish stable checkpoint periodically to Redis #1461
Publish stable checkpoint periodically to Redis #1461
Commits on May 9, 2023
-
Publish stable checkpoint periodically to Redis
Currently, a log witness countersigns the latest checkpoint Rekor publishes. Rekor updates its checkpoint on every entry upload, which is extremely frequent. This means that two witnesses are very unlikely to countersign the same checkpoint. While gossiping, it will not be possible to reach a consensus on the same checkpoint, and therefore we can't mitigate split-view attacks. This change publishes a checkpoint, a "stable checkpoint", every 5 minutes (configurable) to Redis. This runs as a goroutine, with a Redis key derived from the current time rounded to the nearest 5 minutes. We use set-if-not-exist for Redis, meaning you can run replicated instances of Rekor, with all instances writing to the same Redis key. For a client that wants to gossip, this means waiting 5 minutes before a checkpoint is published that witnesses will countersign (Note that this is an area of active development and research too). The stable checkpoint can be accessed with a query parameter. Fixes sigstore#1067. There is still value in batching in terms of reliablity, but stable checkpoints solve the gossiping issue without a breaking change. Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Configuration menu - View commit details
-
Copy full SHA for ae09bf7 - Browse repository at this point
Copy the full SHA ae09bf7View commit details -
Use latest key to access latest checkpoint
Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Configuration menu - View commit details
-
Copy full SHA for 081b485 - Browse repository at this point
Copy the full SHA 081b485View commit details -
Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Configuration menu - View commit details
-
Copy full SHA for 44df803 - Browse repository at this point
Copy the full SHA 44df803View commit details -
Return early if key already exists
Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Configuration menu - View commit details
-
Copy full SHA for 1d21d91 - Browse repository at this point
Copy the full SHA 1d21d91View commit details -
Add comment explaining failure handling
Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Configuration menu - View commit details
-
Copy full SHA for 496d42f - Browse repository at this point
Copy the full SHA 496d42fView commit details
Commits on May 10, 2023
-
Apply suggestions from code review
Co-authored-by: Bob Callaway <bobcallaway@users.noreply.github.com> Signed-off-by: Hayden B <hblauzvern@google.com>
Configuration menu - View commit details
-
Copy full SHA for 7556390 - Browse repository at this point
Copy the full SHA 7556390View commit details -
Fix goroutine leak, check if redis client is configured
Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Configuration menu - View commit details
-
Copy full SHA for 98cb398 - Browse repository at this point
Copy the full SHA 98cb398View commit details -
Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Configuration menu - View commit details
-
Copy full SHA for 2112494 - Browse repository at this point
Copy the full SHA 2112494View commit details