sumdb

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

README

SumDB to tlog-tiles proxy

This is a proxy that serves the Go SumDB with a tlog-tiles API. This allows tooling written for the tlog-tiles API to be used with the SumDB, even though its API is slightly different.

Running

Basic Usage
go run ./sumdb/cmd/proxy.go --listen=":8089"
Advanced Usage
go run ./sumdb/cmd/proxy.go --witnesses 2 --index ./woodpecker-web/index.html

This runs a version with a Web UI that also fetches witnesses confirming the log has evolved consistently. To see the web UI, simply open http://localhost:8089/.

Using

Any valid tlog-tiles API paths sent to the listen address will be routed to the SumDB proxy. Paths will be changed as necessary, and leaf data returned will be rewritten to comply with the tlog-tiles spec.

For example, to run Tessera's tlog-tiles fsck tool against the log to confirm integrity:

# Put the SumDB public key in a file so that fsck can read it.
echo sum.golang.org+033de0ae+Ac4zctda0e5eza+HJyk9SxEdh+s3Ux18htTTAD8OuAn8 > ~/.go.sum.vkey

# Run the fsck tool against the proxy.
go run github.com/transparency-dev/tessera/cmd/fsck@main \
  --storage_url=http://localhost:8089/ \
  --public_key ~/.go.sum.vkey \
  --origin "go.sum database tree"

Documentation

Overview

sumdb provides a utility proxy to convert to a tlog-tiles API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProxy

func NewProxy(opts ProxyOpts) http.Handler

NewProxy returns an http.Handler that proxies to the appropriate SumDB upstream. If IndexFile is set in ProxyOpts, it also serves this file at /index.html.

Types

type ProxyOpts

type ProxyOpts struct {
	// PathPrefix should be set if the proxy is hosted not at "/".
	// Any path beyond this should be set here, so that it can be stripped.
	PathPrefix string

	// WitnessSigs should be set to ensure that a given number of witness signatures
	// are available. If this is left at the default of 0, then we proxy to the
	// latest checkpoint from SumDB. If this is set to a positive number, then we
	// request the latest checkpoint with that number of sigs from the checkpoint
	// distributor.
	// https://github.com/transparency-dev/distributor/
	WitnessSigs uint

	// IndexFile is the local path to an index.html file to serve at the log root /index.html.
	// If empty, nothing is served at /index.html.
	IndexFile string
}

Directories

Path Synopsis
sumdb is a command that launches a local proxy that allows clients to query using the tlog-tiles API, and retrieve results from SumDB.
sumdb is a command that launches a local proxy that allows clients to query using the tlog-tiles API, and retrieve results from SumDB.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL