Skip to content

Commit 2b2a8bd

Browse files
committed
Cleanup unneeded log ID, fix copyright
Signed-off-by: Hayden <8418760+Hayden-IO@users.noreply.github.com>
1 parent 14018ed commit 2b2a8bd

7 files changed

Lines changed: 8 additions & 27 deletions

File tree

api/proto/rekor/v2/rekor_identity_service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 The Sigstore Authors.
1+
// Copyright 2026 The Sigstore Authors.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

api/proto/rekor/v2/rekor_service.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ service Rekor {
6767
};
6868
}
6969

70-
71-
7270
// Get a tile from the log
7371
rpc GetTile (TileRequest) returns (google.api.HttpBody) {
7472
option (google.api.http) = {

cmd/rekor-server/identity-posix/app/serve.go

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ import (
3535
"github.com/sigstore/rekor-tiles/v2/internal/signerverifier"
3636
"github.com/sigstore/rekor-tiles/v2/internal/tessera"
3737
posixDriver "github.com/sigstore/rekor-tiles/v2/internal/tessera/posix"
38-
"github.com/sigstore/rekor-tiles/v2/pkg/note"
39-
"github.com/sigstore/sigstore/pkg/signature/options"
4038
)
4139

4240
var serveCmd = &cobra.Command{
@@ -84,19 +82,6 @@ var serveCmd = &cobra.Command{
8482
slog.Error("failed to initialize append options", "error", err)
8583
os.Exit(1)
8684
}
87-
// Compute log ID for TransparencyLogEntry, to be used by clients to look up
88-
// the correct instance in a trust root. Log ID is equivalent to the non-truncated
89-
// hash of the public key and origin per the signed-note C2SP spec.
90-
pubKey, err := signer.PublicKey(options.WithContext(ctx))
91-
if err != nil {
92-
slog.Error("failed to get public key", "error", err)
93-
os.Exit(1)
94-
}
95-
_, logID, err := note.KeyHash(viper.GetString("hostname"), pubKey)
96-
if err != nil {
97-
slog.Error("failed to get log ID", "error", err)
98-
os.Exit(1)
99-
}
10085

10186
readOnly := viper.GetBool("read-only")
10287
var tesseraStorage tessera.Storage
@@ -154,7 +139,7 @@ var serveCmd = &cobra.Command{
154139
os.Exit(1)
155140
}
156141

157-
rekorServer := server.NewIdentityServer(tesseraStorage, readOnly, algorithmRegistry, logID)
142+
rekorServer := server.NewIdentityServer(tesseraStorage, readOnly, algorithmRegistry)
158143

159144
server.Serve(
160145
ctx,

internal/server/identity_service.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 The Sigstore Authors
1+
// Copyright 2026 The Sigstore Authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -43,15 +43,13 @@ type IdentityServer struct {
4343
grpc_health_v1.UnimplementedHealthServer
4444
storage tessera.Storage
4545
readOnly bool
46-
logID []byte
4746
algorithmRegistry *signature.AlgorithmRegistryConfig
4847
}
4948

50-
func NewIdentityServer(storage tessera.Storage, readOnly bool, algorithmRegistry *signature.AlgorithmRegistryConfig, logID []byte) *IdentityServer {
49+
func NewIdentityServer(storage tessera.Storage, readOnly bool, algorithmRegistry *signature.AlgorithmRegistryConfig) *IdentityServer {
5150
return &IdentityServer{
5251
storage: storage,
5352
readOnly: readOnly,
54-
logID: logID,
5553
algorithmRegistry: algorithmRegistry,
5654
}
5755
}

internal/server/identity_service_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 The Sigstore Authors
1+
// Copyright 2026 The Sigstore Authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -134,7 +134,7 @@ func TestCreateIdentityEntry(t *testing.T) {
134134
if err != nil {
135135
t.Fatal(err)
136136
}
137-
server := NewIdentityServer(storage, false, algReg, []byte{1})
137+
server := NewIdentityServer(storage, false, algReg)
138138

139139
gotBody, gotErr := server.CreateEntry(context.Background(), test.req)
140140
if test.expectError == nil {

pkg/generated/protobuf/rekor_identity_service.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/generated/protobuf/rekor_identity_service_grpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)