Skip to content

Conversation

@Hayden-IO
Copy link

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.

mhutchinson and others added 17 commits February 18, 2025 17:05
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.
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>
@Hayden-IO Hayden-IO requested a review from a team as a code owner January 14, 2026 21:08
@Hayden-IO Hayden-IO requested a review from roger2hk January 14, 2026 21:08
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 72.72727% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.80%. Comparing base (fa00c16) to head (1c29105).
⚠️ Report is 141 commits behind head on main.

Files with missing lines Patch % Lines
witness/witness.go 72.72% 19 Missing and 14 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

5 participants