Documentation ¶
Overview ¶
Package minimal provides a minimal gossip implementation for CT which uses X.509 certificate extensions to hold gossiped STH values for logs. This allows STH values to be exchanged between participating logs without any changes to the log software (although participating logs will need to add additional trusted roots for the gossip sources).
Index ¶
- type FetchOptions
- type FileStateManager
- type Goshawk
- func NewBoundaryGoshawk(_ context.Context, cfg *configpb.GoshawkConfig, hcLog, hcHub *http.Client, ...) (*Goshawk, error)
- func NewBoundaryGoshawkFromFile(ctx context.Context, filename string, hcLog, hcHub *http.Client, ...) (*Goshawk, error)
- func NewGoshawk(ctx context.Context, cfg *configpb.GoshawkConfig, hc *http.Client, ...) (*Goshawk, error)
- func NewGoshawkFromFile(ctx context.Context, filename string, hc *http.Client, fetchOpts FetchOptions) (*Goshawk, error)
- type Gossiper
- func NewBoundaryGossiper(ctx context.Context, cfg *configpb.GossipConfig, hcLog, hcHub *http.Client, ...) (*Gossiper, error)
- func NewBoundaryGossiperFromFile(ctx context.Context, filename string, hcLog, hcHub *http.Client, ...) (*Gossiper, error)
- func NewGossiper(ctx context.Context, cfg *configpb.GossipConfig, hc *http.Client, ...) (*Gossiper, error)
- func NewGossiperFromFile(ctx context.Context, filename string, hc *http.Client, ...) (*Gossiper, error)
- type ScanState
- type ScanStateManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FetchOptions ¶
type FetchOptions struct { // Number of entries to request in one batch from the Log. BatchSize int // Number of concurrent fetcher workers to run. ParallelFetch int // Manage hub retrieval state persistence. State ScanStateManager FlushInterval time.Duration // Mechanism for reporting compliance incidents. If unset, a // LoggingReporter will be used. Reporter incident.Reporter }
FetchOptions governs the overall hub retrieval behaviour.
type FileStateManager ¶
type FileStateManager struct { ScanState // contains filtered or unexported fields }
FileStateManager is an implementation of the ScanStateManager interface that stores the scan state in a writable flat file.
func NewFileStateManager ¶
func NewFileStateManager(filename string) (*FileStateManager, error)
NewFileStateManager creates a FileStateManager from the contents of the given filename, which can be be empty but should be over-writable.
type Goshawk ¶
type Goshawk struct {
// contains filtered or unexported fields
}
Goshawk is an agent that retrieves STHs from a Gossip Hub, either in the form of synthetic certificates or more directly as signed blobs. Each STH is then checked for consistency against the source log.
func NewBoundaryGoshawk ¶
func NewBoundaryGoshawk(_ context.Context, cfg *configpb.GoshawkConfig, hcLog, hcHub *http.Client, fetchOpts FetchOptions) (*Goshawk, error)
NewBoundaryGoshawk creates a Goshawk from the given configuration protobuf and a pair of http.Client instances for source logs and destination hubs, to allow (for example) gossip checking across (some kinds of) network boundaries.
func NewBoundaryGoshawkFromFile ¶
func NewBoundaryGoshawkFromFile(ctx context.Context, filename string, hcLog, hcHub *http.Client, fetchOpts FetchOptions) (*Goshawk, error)
NewBoundaryGoshawkFromFile creates a Goshawk that uses different http.Client instances for source logs and destination hubs, for example to allow gossip checking across (some kinds of) network boundaries.
func NewGoshawk ¶
func NewGoshawk(ctx context.Context, cfg *configpb.GoshawkConfig, hc *http.Client, fetchOpts FetchOptions) (*Goshawk, error)
NewGoshawk creates a Goshawk from the given configuration protobuf and optional http client.
func NewGoshawkFromFile ¶
func NewGoshawkFromFile(ctx context.Context, filename string, hc *http.Client, fetchOpts FetchOptions) (*Goshawk, error)
NewGoshawkFromFile creates a Goshawk from the given filename, which should contain text-protobuf encoded configuration data, together with an optional http Client.
type Gossiper ¶
type Gossiper struct {
// contains filtered or unexported fields
}
Gossiper is an agent that retrieves STH values from a set of source logs and distributes it to a destination log in the form of an X.509 certificate with the STH value embedded in it.
func NewBoundaryGossiper ¶
func NewBoundaryGossiper(ctx context.Context, cfg *configpb.GossipConfig, hcLog, hcHub *http.Client, mf monitoring.MetricFactory) (*Gossiper, error)
NewBoundaryGossiper creates a gossiper from the given configuration protobuf and a pair of http.Client instances for source logs and destination hubs, to allow (for example) gossiping across (some kinds of) network boundaries.
func NewBoundaryGossiperFromFile ¶
func NewBoundaryGossiperFromFile(ctx context.Context, filename string, hcLog, hcHub *http.Client, mf monitoring.MetricFactory) (*Gossiper, error)
NewBoundaryGossiperFromFile creates a gossiper that uses different http.Client instances for source logs and destination hubs, for example to allow gossiping across (some kinds of) network boundaries.
func NewGossiper ¶
func NewGossiper(ctx context.Context, cfg *configpb.GossipConfig, hc *http.Client, mf monitoring.MetricFactory) (*Gossiper, error)
NewGossiper creates a gossiper from the given configuration protobuf and optional http client.
func NewGossiperFromFile ¶
func NewGossiperFromFile(ctx context.Context, filename string, hc *http.Client, mf monitoring.MetricFactory) (*Gossiper, error)
NewGossiperFromFile creates a gossiper from the given filename, which should contain text-protobuf encoded configuration data, together with an optional http Client.
func (*Gossiper) CertForSTH ¶
CertForSTH creates an X.509 certificate with the given STH embedded in it.
func (*Gossiper) CheckCanSubmit ¶
CheckCanSubmit checks whether the gossiper can submit STHs to all destination hubs.
type ScanState ¶
ScanState holds a (mutex-protected) map of hub URL to next index to scan from.
func (*ScanState) GetHubIndex ¶
GetHubIndex returns the index at which scanning should commence for the given hub URL.
func (*ScanState) UpdateHubIndex ¶
UpdateHubIndex indicates that future scanning of the given hub should start from at least nextIndex.
type ScanStateManager ¶
type ScanStateManager interface { // GetHubIndex returns the index at which scanning should commence for the given hub URL. GetHubIndex(hubURL string) int64 // UpdateHubIndex indicates that future scanning of the given hub should start from at least nextIndex. UpdateHubIndex(hubURL string, nextIndex int64) // Flush ensures state is stored. Flush(ctx context.Context) error }
ScanStateManager controls hub scanning state, with the intention of allowing scanning to resume where it was left off across restarts etc.
Directories ¶
Path | Synopsis |
---|---|
Package configpb holds a config protobuf for minimal gossip binaries.
|
Package configpb holds a config protobuf for minimal gossip binaries. |
The goshawk binary scans a destination log for gossiped STH values and checks consistency against the source logs.
|
The goshawk binary scans a destination log for gossiped STH values and checks consistency against the source logs. |
The gosmin binary runs a minimal gossip implementation.
|
The gosmin binary runs a minimal gossip implementation. |
Package mysql provides a MySQL based implementation of persistent state management for the goshawk tool.
|
Package mysql provides a MySQL based implementation of persistent state management for the goshawk tool. |
Package x509ext holds extensions types and values for minimal gossip.
|
Package x509ext holds extensions types and values for minimal gossip. |