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

cmd/addrwitness: a new addressable or bastion-mediated witness #712

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

FiloSottile
Copy link

@FiloSottile FiloSottile commented Jan 10, 2023

This uses internal/witness like cmd/witness, but with a few major differences:

  • in general, addrwitness is designed to be directly addressable from the Internet, without a fetcher, enabling low-latency logs to fetch co-signatures synchronously and distribute them along with their tree heads
  • optionally, addrwitness supports being exposed through a bastion, for witnesses that are not easily exposed to the Internet
  • the witness adds two signatures: a plain one for backwards compatibility, and a timestamped one
  • the get API returns the tree size of the latest checkpoint, not the whole checkpoint, to prevent misuse and direct logs to take care of co-signature distribution
  • logs are indexed by the origin string, and there is no concept of a separate log ID
    • this is important and arguably a security fix: see the comments in main.go or this

This PR is a proof of concept. In particular, it doesn't support compact ranges or ECDSA signatures, and has no tests or metrics, and its handling of reconnection to the bastion is clunky.

@FiloSottile FiloSottile requested a review from a team as a code owner January 10, 2023 09:59
@FiloSottile FiloSottile requested review from AlCutter and removed request for a team January 10, 2023 09:59
@AlCutter
Copy link
Member

It would be nice if this could be made to fit inside a feeder implementation as it would then Just Work™️ inside the omniwitness etc.

e.g. the sumdb feeder - the fetchCheckpoint and fetchProof funcs could poll the bastion (e.g. getCheckpoint polls for CP+poof, returns CP and stores the proof to be returned by the next call to fetchProof or something?)

Might need a bit of refactoring or some sprinkles on the configuration front...

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.

None yet

2 participants