Skip to content

Commit 48318f7

Browse files
authored
Rename many things to TesseraCT (#268)
* rename top level package to tesseract # Conflicts: # cmd/aws/main.go # cmd/gcp/main.go # Conflicts: # doc.go # Conflicts: # cmd/aws/main.go # cmd/gcp/main.go # Conflicts: # cmd/gcp/main.go * rename sctfe to tesseract in docker * edit comments * s/scti/tcti * rename imports in binaries * dedup * s/tcti/ct * remove package renames * more renames
1 parent 0da1773 commit 48318f7

27 files changed

+69
-69
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SCTFE
1+
# TesseraCT
22

33
[![Go Report Card](https://goreportcard.com/badge/github.com/transparency-dev/static-ct)](https://goreportcard.com/report/github.com/transparency-dev/static-ct)
44
[![Slack Status](https://img.shields.io/badge/Slack-Chat-blue.svg)](https://transparency-dev.slack.com/)
@@ -11,7 +11,7 @@ to store data. It is based on
1111
It is under active development.
1212

1313
## Deployment
14-
Each Tessera storage backend needs its own SCTFE binary.
14+
Each Tessera storage backend needs its own TesseraCT binary.
1515

1616
At the moment, these storage backends are supported:
1717

cmd/aws/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ RUN go mod download
1515
COPY . .
1616

1717
# Build the application
18-
RUN go build -o bin/sctfe-aws ./cmd/aws
18+
RUN go build -o bin/tesseract-aws ./cmd/aws
1919

2020
# Build release image
2121
FROM alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c
2222

23-
COPY --from=builder /build/bin/sctfe-aws /bin/sctfe-aws
23+
COPY --from=builder /build/bin/tesseract-aws /bin/tesseract-aws
2424

25-
ENTRYPOINT ["/bin/sctfe-aws"]
25+
ENTRYPOINT ["/bin/tesseract-aws"]

cmd/aws/ci/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM sctfe-aws:latest AS base
1+
FROM tesseract-aws:latest AS base
22

33
# Build release image
44
FROM alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c
55

66
# Copy the hammer test root CA certificate into the container
77
COPY ./internal/hammer/testdata/test_root_ca_cert.pem /bin/
88

9-
# Copy the sctfe-aws binary
10-
COPY --from=base /bin/sctfe-aws /bin/
9+
# Copy the tesseract-aws binary
10+
COPY --from=base /bin/tesseract-aws /bin/
1111

12-
ENTRYPOINT ["/bin/sctfe-aws"]
12+
ENTRYPOINT ["/bin/tesseract-aws"]

cmd/aws/main.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ import (
2828
"time"
2929

3030
"github.com/go-sql-driver/mysql"
31-
sctfe "github.com/transparency-dev/static-ct"
31+
tesseract "github.com/transparency-dev/static-ct"
3232
"github.com/transparency-dev/static-ct/storage"
33-
awsSCTFE "github.com/transparency-dev/static-ct/storage/aws"
33+
"github.com/transparency-dev/static-ct/storage/aws"
3434
"github.com/transparency-dev/static-ct/storage/bbolt"
3535
tessera "github.com/transparency-dev/trillian-tessera"
36-
awsTessera "github.com/transparency-dev/trillian-tessera/storage/aws"
36+
taws "github.com/transparency-dev/trillian-tessera/storage/aws"
3737
"golang.org/x/mod/sumdb/note"
3838
"k8s.io/klog/v2"
3939
)
@@ -81,7 +81,7 @@ func main() {
8181
klog.Exitf("Can't create AWS Secrets Manager signer: %v", err)
8282
}
8383

84-
chainValidationConfig := sctfe.ChainValidationConfig{
84+
chainValidationConfig := tesseract.ChainValidationConfig{
8585
RootsPEMFile: *rootsPemFile,
8686
RejectExpired: *rejectExpired,
8787
RejectUnexpired: *rejectUnexpired,
@@ -91,7 +91,7 @@ func main() {
9191
NotAfterLimit: notAfterLimit.t,
9292
}
9393

94-
logHandler, err := sctfe.NewLogHandler(ctx, *origin, signer, chainValidationConfig, newAWSStorage, *httpDeadline, *maskInternalErrors)
94+
logHandler, err := tesseract.NewLogHandler(ctx, *origin, signer, chainValidationConfig, newAWSStorage, *httpDeadline, *maskInternalErrors)
9595
if err != nil {
9696
klog.Exitf("Can't initialize CT HTTP Server: %v", err)
9797
}
@@ -143,7 +143,7 @@ func awaitSignal(doneFn func()) {
143143

144144
func newAWSStorage(ctx context.Context, signer note.Signer) (*storage.CTStorage, error) {
145145
awsCfg := storageConfigFromFlags()
146-
driver, err := awsTessera.New(ctx, awsCfg)
146+
driver, err := taws.New(ctx, awsCfg)
147147
if err != nil {
148148
return nil, fmt.Errorf("failed to initialize AWS Tessera storage driver: %v", err)
149149
}
@@ -154,7 +154,7 @@ func newAWSStorage(ctx context.Context, signer note.Signer) (*storage.CTStorage,
154154
return nil, fmt.Errorf("failed to initialize AWS Tessera storage: %v", err)
155155
}
156156

157-
issuerStorage, err := awsSCTFE.NewIssuerStorage(ctx, *bucket, "fingerprints/", "application/pkix-cert")
157+
issuerStorage, err := aws.NewIssuerStorage(ctx, *bucket, "fingerprints/", "application/pkix-cert")
158158
if err != nil {
159159
return nil, fmt.Errorf("failed to initialize AWS issuer storage: %v", err)
160160
}
@@ -192,7 +192,7 @@ func (t *timestampFlag) Set(w string) error {
192192

193193
// storageConfigFromFlags returns an aws.Config struct populated with values
194194
// provided via flags.
195-
func storageConfigFromFlags() awsTessera.Config {
195+
func storageConfigFromFlags() taws.Config {
196196
if *bucket == "" {
197197
klog.Exit("--bucket must be set")
198198
}
@@ -223,7 +223,7 @@ func storageConfigFromFlags() awsTessera.Config {
223223
AllowNativePasswords: true,
224224
}
225225

226-
return awsTessera.Config{
226+
return taws.Config{
227227
Bucket: *bucket,
228228
DSN: c.FormatDSN(),
229229
MaxOpenConns: *dbMaxConns,

cmd/gcp/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ RUN go mod download
1515
COPY . .
1616

1717
# Build the application
18-
RUN go build -o bin/sctfe-gcp ./cmd/gcp
18+
RUN go build -o bin/tesseract-gcp ./cmd/gcp
1919

2020
# Build release image
2121
FROM alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c
2222

23-
COPY --from=builder /build/bin/sctfe-gcp /bin/sctfe-gcp
23+
COPY --from=builder /build/bin/tesseract-gcp /bin/tesseract-gcp
2424

25-
ENTRYPOINT ["/bin/sctfe-gcp"]
25+
ENTRYPOINT ["/bin/tesseract-gcp"]

cmd/gcp/ci/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM sctfe-gcp:latest AS base
1+
FROM tesseract-gcp:latest AS base
22

33
# Build release image
44
FROM alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c
55

66
# Copy the hammer test root CA certificate into the container
77
COPY ./internal/hammer/testdata/test_root_ca_cert.pem /bin/
88

9-
# Copy the sctfe-gcp binary
10-
COPY --from=base /bin/sctfe-gcp /bin/
9+
# Copy the tesseract-gcp binary
10+
COPY --from=base /bin/tesseract-gcp /bin/
1111

12-
ENTRYPOINT ["/bin/sctfe-gcp"]
12+
ENTRYPOINT ["/bin/tesseract-gcp"]

cmd/gcp/main.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import (
2828
"syscall"
2929
"time"
3030

31-
sctfe "github.com/transparency-dev/static-ct"
31+
tesseract "github.com/transparency-dev/static-ct"
3232
"github.com/transparency-dev/static-ct/storage"
33-
gcpSCTFE "github.com/transparency-dev/static-ct/storage/gcp"
33+
"github.com/transparency-dev/static-ct/storage/gcp"
3434
tessera "github.com/transparency-dev/trillian-tessera"
35-
gcpTessera "github.com/transparency-dev/trillian-tessera/storage/gcp"
35+
tgcp "github.com/transparency-dev/trillian-tessera/storage/gcp"
3636
"golang.org/x/mod/sumdb/note"
3737
"k8s.io/klog/v2"
3838
)
@@ -78,7 +78,7 @@ func main() {
7878
klog.Exitf("Can't create secret manager signer: %v", err)
7979
}
8080

81-
chainValidationConfig := sctfe.ChainValidationConfig{
81+
chainValidationConfig := tesseract.ChainValidationConfig{
8282
RootsPEMFile: *rootsPemFile,
8383
RejectExpired: *rejectExpired,
8484
RejectUnexpired: *rejectUnexpired,
@@ -88,7 +88,7 @@ func main() {
8888
NotAfterLimit: notAfterLimit.t,
8989
}
9090

91-
logHandler, err := sctfe.NewLogHandler(ctx, *origin, signer, chainValidationConfig, newGCPStorage, *httpDeadline, *maskInternalErrors)
91+
logHandler, err := tesseract.NewLogHandler(ctx, *origin, signer, chainValidationConfig, newGCPStorage, *httpDeadline, *maskInternalErrors)
9292
if err != nil {
9393
klog.Exitf("Can't initialize CT HTTP Server: %v", err)
9494
}
@@ -147,12 +147,12 @@ func newGCPStorage(ctx context.Context, signer note.Signer) (*storage.CTStorage,
147147
return nil, errors.New("missing spannerDB")
148148
}
149149

150-
gcpCfg := gcpTessera.Config{
150+
gcpCfg := tgcp.Config{
151151
Bucket: *bucket,
152152
Spanner: *spannerDB,
153153
}
154154

155-
driver, err := gcpTessera.New(ctx, gcpCfg)
155+
driver, err := tgcp.New(ctx, gcpCfg)
156156
if err != nil {
157157
return nil, fmt.Errorf("failed to initialize GCP Tessera storage driver: %v", err)
158158
}
@@ -168,12 +168,12 @@ func newGCPStorage(ctx context.Context, signer note.Signer) (*storage.CTStorage,
168168
return nil, fmt.Errorf("failed to initialize GCP Tessera appender: %v", err)
169169
}
170170

171-
issuerStorage, err := gcpSCTFE.NewIssuerStorage(ctx, *bucket, "fingerprints/", "application/pkix-cert")
171+
issuerStorage, err := gcp.NewIssuerStorage(ctx, *bucket, "fingerprints/", "application/pkix-cert")
172172
if err != nil {
173173
return nil, fmt.Errorf("failed to initialize GCP issuer storage: %v", err)
174174
}
175175

176-
beDedupStorage, err := gcpSCTFE.NewDedupeStorage(ctx, *spannerDedupDB)
176+
beDedupStorage, err := gcp.NewDedupeStorage(ctx, *spannerDedupDB)
177177
if err != nil {
178178
return nil, fmt.Errorf("failed to initialize GCP Spanner deduplication database: %v", err)
179179
}

cmd/gcp/staging/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM sctfe-gcp:latest AS base
1+
FROM tesseract-gcp:latest AS base
22

33
# Build release image
44
FROM alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c
@@ -7,7 +7,7 @@ FROM alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff45
77
# TODO(phbnf): use a better name without test, right now this is what works with main.tf
88
COPY ./deployment/live/gcp/static-ct-staging/logs/arche2025h1/roots.pem /bin/test_root_ca_cert.pem
99

10-
# Copy the sctfe-gcp binary
11-
COPY --from=base /bin/sctfe-gcp /bin/
10+
# Copy the tesseract-gcp binary
11+
COPY --from=base /bin/tesseract-gcp /bin/
1212

13-
ENTRYPOINT ["/bin/sctfe-gcp"]
13+
ENTRYPOINT ["/bin/tesseract-gcp"]

ctlog.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package sctfe
15+
package tesseract
1616

1717
import (
1818
"context"
@@ -25,7 +25,7 @@ import (
2525
"strings"
2626
"time"
2727

28-
"github.com/transparency-dev/static-ct/internal/scti"
28+
"github.com/transparency-dev/static-ct/internal/ct"
2929
"github.com/transparency-dev/static-ct/internal/x509util"
3030
"github.com/transparency-dev/static-ct/storage"
3131
)
@@ -40,7 +40,7 @@ type ChainValidationConfig struct {
4040
// checked against the current time during the validation of submissions.
4141
// This will cause expired certificates to be rejected.
4242
RejectExpired bool
43-
// RejectUnexpired controls if the SCTFE rejects certificates that are
43+
// RejectUnexpired controls if TesseraCT rejects certificates that are
4444
// either currently valid or not yet valid.
4545
// TODO(phboneff): evaluate whether we need to keep this one.
4646
RejectUnexpired bool
@@ -62,7 +62,7 @@ type ChainValidationConfig struct {
6262
NotAfterLimit *time.Time
6363
}
6464

65-
// systemTimeSource implments scti.TimeSource.
65+
// systemTimeSource implements ct.TimeSource.
6666
type systemTimeSource struct{}
6767

6868
// Now returns the true current local time.
@@ -74,7 +74,7 @@ var sysTimeSource = systemTimeSource{}
7474

7575
// newChainValidator checks that a chain validation config is valid,
7676
// parses it, and loads resources to validate chains.
77-
func newChainValidator(cfg ChainValidationConfig) (scti.ChainValidator, error) {
77+
func newChainValidator(cfg ChainValidationConfig) (ct.ChainValidator, error) {
7878
// Load the trusted roots.
7979
if cfg.RootsPEMFile == "" {
8080
return nil, errors.New("empty rootsPemFile")
@@ -98,7 +98,7 @@ func newChainValidator(cfg ChainValidationConfig) (scti.ChainValidator, error) {
9898
// Filter which extended key usages are allowed.
9999
if cfg.ExtKeyUsages != "" {
100100
lExtKeyUsages := strings.Split(cfg.ExtKeyUsages, ",")
101-
extKeyUsages, err = scti.ParseExtKeyUsages(lExtKeyUsages)
101+
extKeyUsages, err = ct.ParseExtKeyUsages(lExtKeyUsages)
102102
if err != nil {
103103
return nil, fmt.Errorf("failed to parse ExtKeyUsages: %v", err)
104104
}
@@ -108,13 +108,13 @@ func newChainValidator(cfg ChainValidationConfig) (scti.ChainValidator, error) {
108108
// Filter which extensions are rejected.
109109
if cfg.RejectExtensions != "" {
110110
lRejectExtensions := strings.Split(cfg.RejectExtensions, ",")
111-
rejectExtIds, err = scti.ParseOIDs(lRejectExtensions)
111+
rejectExtIds, err = ct.ParseOIDs(lRejectExtensions)
112112
if err != nil {
113113
return nil, fmt.Errorf("failed to parse RejectExtensions: %v", err)
114114
}
115115
}
116116

117-
cv := scti.NewChainValidator(roots, cfg.RejectExpired, cfg.RejectUnexpired, cfg.NotAfterStart, cfg.NotAfterLimit, extKeyUsages, rejectExtIds)
117+
cv := ct.NewChainValidator(roots, cfg.RejectExpired, cfg.RejectUnexpired, cfg.NotAfterStart, cfg.NotAfterLimit, extKeyUsages, rejectExtIds)
118118
return &cv, nil
119119
}
120120

@@ -126,19 +126,19 @@ func NewLogHandler(ctx context.Context, origin string, signer crypto.Signer, cfg
126126
if err != nil {
127127
return nil, fmt.Errorf("newCertValidationOpts(): %v", err)
128128
}
129-
log, err := scti.NewLog(ctx, origin, signer, cv, cs, sysTimeSource)
129+
log, err := ct.NewLog(ctx, origin, signer, cv, cs, sysTimeSource)
130130
if err != nil {
131131
return nil, fmt.Errorf("newLog(): %v", err)
132132
}
133133

134-
opts := &scti.HandlerOptions{
134+
opts := &ct.HandlerOptions{
135135
Deadline: httpDeadline,
136-
RequestLog: &scti.DefaultRequestLog{},
136+
RequestLog: &ct.DefaultRequestLog{},
137137
MaskInternalErrors: maskInternalErrors,
138138
TimeSource: sysTimeSource,
139139
}
140140

141-
handlers := scti.NewPathHandlers(ctx, opts, log)
141+
handlers := ct.NewPathHandlers(ctx, opts, log)
142142
mux := http.NewServeMux()
143143
// Register handlers for all the configured logs.
144144
for path, handler := range handlers {

ctlog_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package sctfe
15+
package tesseract
1616

1717
import (
1818
"strings"

deployment/live/gcp/static-ct-staging/logs/arche2025h1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Build and push the Docker image to Artifact Registry repository:
5151

5252
```sh
5353
gcloud auth configure-docker ${GOOGLE_REGION}-docker.pkg.dev
54-
docker build -f ./cmd/gcp/Dockerfile -t sctfe-gcp:latest .
54+
docker build -f ./cmd/gcp/Dockerfile -t tesseract-gcp:latest .
5555
docker build -f ./cmd/gcp/staging/Dockerfile -t conformance-gcp:latest .
5656
docker tag conformance-gcp:latest ${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-staging/conformance-gcp:latest
5757
docker push ${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-staging/conformance-gcp

deployment/live/gcp/static-ct/logs/ci/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Build and push the Docker image to Artifact Registry repository:
4040

4141
```sh
4242
gcloud auth configure-docker ${GOOGLE_REGION}-docker.pkg.dev
43-
docker build -f ./cmd/gcp/Dockerfile -t sctfe-gcp:latest .
43+
docker build -f ./cmd/gcp/Dockerfile -t tesseract-gcp:latest .
4444
docker build -f ./cmd/gcp/ci/Dockerfile -t conformance-gcp:latest .
4545
docker tag conformance-gcp:latest ${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-ci/conformance-gcp:latest
4646
docker push ${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-ci/conformance-gcp

internal/scti/chain_validation.go renamed to internal/ct/chain_validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package ct
1616

1717
import (
1818
"bytes"

internal/scti/chain_validation_test.go renamed to internal/ct/chain_validation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package ct
1616

1717
import (
1818
"crypto/x509"

internal/scti/ctlog.go renamed to internal/ct/ctlog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scti
1+
package ct
22

33
import (
44
"context"

internal/scti/ctlog_test.go renamed to internal/ct/ctlog_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scti
1+
package ct
22

33
import (
44
"context"

internal/scti/handlers.go renamed to internal/ct/handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package ct
1616

1717
import (
1818
"context"

internal/scti/handlers_test.go renamed to internal/ct/handlers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package scti
15+
package ct
1616

1717
import (
1818
"bufio"

0 commit comments

Comments
 (0)