-
Notifications
You must be signed in to change notification settings - Fork 11
Move witness code from Tessera #229
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
Open
Hayden-IO
wants to merge
17
commits into
transparency-dev:main
Choose a base branch
from
Hayden-IO:move-witness-code
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows the required witnesses to be defined and the theshold policies that apply within each group. Arbitrarily nested structures can be built, each with different numbers of signatures. Each WitnessGroup provides the URLs at which the witness can be reached to perform witnessing, and a function that determines if the group is satisfied. This format is consistent with the only other known witness policy configuration format out there: https://git.glasklar.is/sigsum/core/sigsum-go/-/blob/main/doc/policy.md Towards #309.
Towards #309.
This now verifies the body of 200 responses. It checks that the note can be verified using the signature, and then returns only the signature that the log has a verifier for. This means that witnesses that return a valid signature and then a load of other signatures will not be able to pollute the checkpoint with these other signatures. On the other hand, it means we will need to consider how to support witness key rotation in Tessera in the future. There are a few ways to solve this, but I don't believe this approach blocks any of them.
Duplicate docs instead of linking to private docs
A few bits to clean up as we approach a beta release: - Pruned utility method from API - Renamed IntegrationAwaiter to PublicationAwaiter - Modernized some older go idioms
This PR adds support for constructing a graph of WitnessGroup/Witness structs which represent the policy defined in a config file complying with the spec here: https://git.glasklar.is/sigsum/core/sigsum-go/-/blob/main/doc/policy.md
* Bump formats to 404c0d5 & tidy * Add 0x04 key to policy tests
Makes it easier to find the option to configure witnesses using a policy file, and clarifies that it expects vkey cosig keys for witnesses.
Signed-off-by: Hayden <8418760+Hayden-IO@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #229 +/- ##
==========================================
- Coverage 82.57% 73.80% -8.78%
==========================================
Files 5 7 +2
Lines 241 500 +259
==========================================
+ Hits 199 369 +170
- Misses 30 74 +44
- Partials 12 57 +45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This moves the witness code, which implements https://c2sp.org/tlog-witness and https://git.glasklar.is/sigsum/core/sigsum-go/-/blob/main/doc/policy.md (with a slight variation of key format) to this low-dependency repo. Moving this out of the Tessera codebase lets verifiers verify witness cosigntures on checkpoints without also depending on Tessera, only needing transparency-dev/formats and transparency-dev/merkle.
I preserved the git history with git-filter-repo. When merging, this should be either merged or rebased onto main to preserve the history. Also note the license remains unchanged.