diff --git a/internal/http/server_test.go b/internal/http/server_test.go index ea90b8b..ba94ee4 100644 --- a/internal/http/server_test.go +++ b/internal/http/server_test.go @@ -68,10 +68,9 @@ var ( const logOrigin = "Log Checkpoint v0" type logOpts struct { - ID string - origin string - PK string - useCompact bool + ID string + origin string + PK string } func newWitness(t *testing.T, logs []logOpts) *witness.Witness { @@ -88,10 +87,9 @@ func newWitness(t *testing.T, logs []logOpts) *witness.Witness { t.Fatalf("couldn't create a log verifier: %v", err) } logInfo := witness.LogInfo{ - Origin: log.origin, - SigV: logV, - Hasher: h, - UseCompact: log.useCompact, + Origin: log.origin, + SigV: logV, + Hasher: h, } logMap[log.ID] = logInfo } @@ -165,10 +163,9 @@ func TestGetLogs(t *testing.T) { logs := make([]logOpts, len(test.logIDs)) for i, logID := range test.logIDs { logs[i] = logOpts{ - ID: logID, - origin: logOrigin, - PK: test.logPKs[i], - useCompact: false, + ID: logID, + origin: logOrigin, + PK: test.logPKs[i], } } w := newWitness(t, logs) @@ -250,10 +247,10 @@ func TestGetChkpt(t *testing.T) { ctx := context.Background() // Set up witness. w := newWitness(t, []logOpts{{ - ID: test.setID, - origin: logOrigin, - PK: test.setPK, - useCompact: false}}) + ID: test.setID, + origin: logOrigin, + PK: test.setPK, + }}) // Set a checkpoint for the log if we want to for this test. if test.c != nil { if _, err := w.Update(ctx, test.setID, test.c, nil); err != nil { @@ -323,10 +320,10 @@ func TestUpdate(t *testing.T) { logID := "monkeys" // Set up witness. w := newWitness(t, []logOpts{{ - ID: logID, - origin: logOrigin, - PK: mPK, - useCompact: false}}) + ID: logID, + origin: logOrigin, + PK: mPK, + }}) // Set an initial checkpoint for the log. if _, err := w.Update(ctx, logID, test.initC, nil); err != nil { t.Errorf("failed to set checkpoint: %v", err) diff --git a/internal/witness/witness.go b/internal/witness/witness.go index dad5b22..269c049 100644 --- a/internal/witness/witness.go +++ b/internal/witness/witness.go @@ -68,9 +68,6 @@ type LogInfo struct { Origin string // The hash strategy that should be used in verifying consistency. Hasher merkle.LogHasher - // An indicator of whether the log should be verified using consistency - // proofs or compact ranges. - UseCompact bool } // Witness consists of a database for storing checkpoints, a signer, and a list diff --git a/internal/witness/witness_test.go b/internal/witness/witness_test.go index 26ef59d..76ff338 100644 --- a/internal/witness/witness_test.go +++ b/internal/witness/witness_test.go @@ -68,10 +68,9 @@ var ( const logOrigin = "Log Checkpoint v0" type logOpts struct { - ID string - origin string - PK string - useCompact bool + ID string + origin string + PK string } func newWitness(t *testing.T, logs []logOpts) *Witness { @@ -88,10 +87,9 @@ func newWitness(t *testing.T, logs []logOpts) *Witness { t.Fatalf("couldn't create a log verifier: %v", err) } logInfo := LogInfo{ - Origin: log.origin, - SigV: logV, - Hasher: h, - UseCompact: log.useCompact, + Origin: log.origin, + SigV: logV, + Hasher: h, } logMap[log.ID] = logInfo } @@ -149,10 +147,9 @@ func TestGetLogs(t *testing.T) { logs := make([]logOpts, len(test.logIDs)) for i, logID := range test.logIDs { logs[i] = logOpts{ - ID: logID, - origin: logOrigin, - PK: test.logPKs[i], - useCompact: false, + ID: logID, + origin: logOrigin, + PK: test.logPKs[i], } } w := newWitness(t, logs) @@ -221,10 +218,10 @@ func TestGetChkpt(t *testing.T) { ctx := context.Background() // Set up witness. w := newWitness(t, []logOpts{{ - ID: test.setID, - origin: logOrigin, - PK: test.setPK, - useCompact: false}}) + ID: test.setID, + origin: logOrigin, + PK: test.setPK, + }}) // Set a checkpoint for the log if we want to for this test. if test.c != nil { if _, err := w.Update(ctx, test.setID, test.c, nil); err != nil { @@ -356,10 +353,10 @@ func TestUpdate(t *testing.T) { logID := "monkeys" // Set up witness. w := newWitness(t, []logOpts{{ - ID: logID, - origin: logOrigin, - PK: mPK, - useCompact: false}}) + ID: logID, + origin: logOrigin, + PK: mPK, + }}) // Set an initial checkpoint for the log. if _, err := w.Update(ctx, logID, test.initC, nil); err != nil { t.Errorf("failed to set checkpoint: %v", err) diff --git a/omniwitness/configs.go b/omniwitness/configs.go index f6f6d64..12e43c0 100644 --- a/omniwitness/configs.go +++ b/omniwitness/configs.go @@ -46,10 +46,9 @@ func (config LogConfig) AsLogMap() (map[string]witness.LogInfo, error) { return nil, fmt.Errorf("failed to create signature verifier: %v", err) } logInfo := witness.LogInfo{ - SigV: logV, - Origin: log.Origin, - Hasher: h, - UseCompact: log.UseCompact, + SigV: logV, + Origin: log.Origin, + Hasher: h, } logID := logfmt.ID(log.Origin) if oldLog, found := logMap[logID]; found { @@ -62,9 +61,8 @@ func (config LogConfig) AsLogMap() (map[string]witness.LogInfo, error) { // LogInfo contains the details about a log. type LogInfo struct { - Origin string `yaml:"Origin"` - PublicKey string `yaml:"PublicKey"` - URL string `yaml:"URL"` - Feeder Feeder `yaml:"Feeder"` - UseCompact bool `yaml:"UseCompact"` + Origin string `yaml:"Origin"` + PublicKey string `yaml:"PublicKey"` + URL string `yaml:"URL"` + Feeder Feeder `yaml:"Feeder"` } diff --git a/omniwitness/logs.yaml b/omniwitness/logs.yaml index 696e258..1d4f48e 100644 --- a/omniwitness/logs.yaml +++ b/omniwitness/logs.yaml @@ -3,58 +3,47 @@ Logs: URL: https://sum.golang.org PublicKey: sum.golang.org+033de0ae+Ac4zctda0e5eza+HJyk9SxEdh+s3Ux18htTTAD8OuAn8 Feeder: sumdb - UseCompact: false - Origin: Armory Drive Prod 2 URL: https://raw.githubusercontent.com/f-secure-foundry/armory-drive-log/master/log/ PublicKey: armory-drive-log+16541b8f+AYDPmG5pQp4Bgu0a1mr5uDZ196+t8lIVIfWQSPWmP+Jv Feeder: serverless - UseCompact: false - Origin: rekor.sigstore.dev - 3904496407287907110 URL: https://rekor.sigstore.dev?treeID=3904496407287907110 PublicKeyType: ecdsa PublicKey: rekor.sigstore.dev+c0d23d6a+AjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABNhtmPtrWm3U1eQXBogSMdGvXwBcK5AW5i0hrZLOC96l+smGNM7nwZ4QvFK/4sueRoVj//QP22Ni4Qt9DPfkWLc= Feeder: rekor - UseCompact: false - Origin: rekor.sigstore.dev - 2605736670972794746 URL: https://rekor.sigstore.dev?treeID=2605736670972794746 PublicKeyType: ecdsa PublicKey: rekor.sigstore.dev+c0d23d6a+AjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABNhtmPtrWm3U1eQXBogSMdGvXwBcK5AW5i0hrZLOC96l+smGNM7nwZ4QvFK/4sueRoVj//QP22Ni4Qt9DPfkWLc= Feeder: rekor - UseCompact: false - Origin: rekor.sigstore.dev - 1193050959916656506 URL: https://rekor.sigstore.dev?treeID=1193050959916656506 PublicKeyType: ecdsa PublicKey: rekor.sigstore.dev+c0d23d6a+AjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABNhtmPtrWm3U1eQXBogSMdGvXwBcK5AW5i0hrZLOC96l+smGNM7nwZ4QvFK/4sueRoVj//QP22Ni4Qt9DPfkWLc= Feeder: rekor - UseCompact: false - Origin: developers.google.com/android/binary_transparency/0 URL: https://developers.google.com/android/binary_transparency/ PublicKeyType: ecdsa PublicKey: pixel_transparency_log+72c878db+AjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFPN7lzVIk2BOd3Nk33VpqqVttGwV8uChH+RX/HVfBiypVQFyh8o8Ny6fSdxNMgkSf9/VynrgADBeys0r4Q9uPA= Feeder: pixel - UseCompact: false - Origin: lvfs URL: https://fwupd.org/ftlog/lvfs/ PublicKey: lvfs+7908d142+ASnlGgOh+634tcE/2Lp3wV7k/cLoU6ncawmb/BLC1oMU Feeder: serverless - UseCompact: false - Origin: transparency.dev/armored-witness/firmware_transparency/prod/1 URL: https://api.transparency.dev/armored-witness-firmware/prod/log/1/ PublicKey: transparency.dev-aw-ftlog-prod-1+3e6d87ee+Aa3qdhefd2cc/98jV3blslJT2L+iFR8WKHeGcgFmyjnt Feeder: serverless - UseCompact: false - Origin: transparency.dev/armored-witness/firmware_transparency/ci/2 URL: https://api.transparency.dev/armored-witness-firmware/ci/log/2/ PublicKey: transparency.dev-aw-ftlog-ci-2+f77c6276+AZXqiaARpwF4MoNOxx46kuiIRjrML0PDTm+c7BLaAMt6 Feeder: serverless - UseCompact: false - Origin: transparency.dev/armored-witness/firmware_transparency/ci/3 URL: https://api.transparency.dev/armored-witness-firmware/ci/log/3/ PublicKey: transparency.dev-aw-ftlog-ci-3+3f689522+Aa1Eifq6rRC8qiK+bya07yV1fXyP156pEMsX7CFBC6gg Feeder: serverless - UseCompact: false - Origin: sigsum.org/v1/tree/44ad38f8226ff9bd27629a41e55df727308d0a1cd8a2c31d3170048ac1dd22a1 URL: https://seasalp.glasklar.is PublicKey: sigsum.org/v1/tree/44ad38f8226ff9bd27629a41e55df727308d0a1cd8a2c31d3170048ac1dd22a1+682b49db+AQ7H4WhDEZsSA3enOROsasvC0D2CQy4sNrhBsJqVhB8l Feeder: none - UseCompact: false