From ad9ea4cd1c27e8a66dda08db69a3de0c926ed813 Mon Sep 17 00:00:00 2001 From: Hayden Blauzvern Date: Mon, 29 Aug 2022 22:07:11 +0000 Subject: [PATCH] Change Checkpoint origin to be "Hostname - Tree ID" This follows the checkpoint specification, making the origin unique per environment and shard. Fixes #1010 Signed-off-by: Hayden Blauzvern --- pkg/api/tlog.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/api/tlog.go b/pkg/api/tlog.go index 60afaa806..c5993dc9e 100644 --- a/pkg/api/tlog.go +++ b/pkg/api/tlog.go @@ -69,7 +69,7 @@ func GetLogInfoHandler(params tlog.GetLogInfoParams) middleware.Responder { treeSize := int64(root.TreeSize) sth, err := util.CreateSignedCheckpoint(util.Checkpoint{ - Origin: "Rekor", + Origin: fmt.Sprintf("%s - %d", viper.GetString("rekor_server.hostname"), tc.ranges.ActiveTreeID()), Size: root.TreeSize, Hash: root.RootHash, }) @@ -170,7 +170,7 @@ func inactiveShardLogInfo(ctx context.Context, tid int64) (*models.InactiveShard treeSize := int64(root.TreeSize) sth, err := util.CreateSignedCheckpoint(util.Checkpoint{ - Origin: "Rekor", + Origin: fmt.Sprintf("%s - %d", viper.GetString("rekor_server.hostname"), tid), Size: root.TreeSize, Hash: root.RootHash, })