Skip to content

Commit 046e1cd

Browse files
committed
internal/relui/sign: add signing server
This change adds the signing server used to request artifact signing. An interface has been added to the sign package in order to create different implementations of the signing service if needed. With the GRPC signing service, the client creates a bidirectional connection with the server. The server then sends well specified signing requests to the client. Updates golang/go#54303 Updates golang/go#53632 Change-Id: I062f7db716edba810b6c1dab122b2a10c1c18923 Reviewed-on: https://go-review.googlesource.com/c/build/+/422598 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Jenny Rakoczy <[email protected]> Run-TryBot: Carlos Amedee <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 45414c4 commit 046e1cd

File tree

6 files changed

+581
-60
lines changed

6 files changed

+581
-60
lines changed

internal/relui/protos/relui.pb.go

Lines changed: 80 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/relui/protos/relui.proto

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,15 @@ message SignArtifactRequest {
4444
message SigningRequest {
4545
// unique identifier for the signing job.
4646
string id = 1;
47+
// unique identifier for the request. This would normally reside within
48+
// the metadata. This is primarily used to route requests between
49+
// caller/responder. The server and client must use the same id for each
50+
// corresponging request.
51+
string message_id = 2;
4752
// Request type for the signing client.
4853
oneof request_oneof {
49-
SignArtifactStatusRequest status = 2;
50-
SignArtifactRequest sign = 3;
54+
SignArtifactStatusRequest status = 3;
55+
SignArtifactRequest sign = 4;
5156
}
5257
}
5358

@@ -76,11 +81,16 @@ message StatusCompleted {
7681
message SigningStatus {
7782
// unique identifier for the signing job.
7883
string id = 1;
84+
// unique identifier for the request. This would normally reside within
85+
// the metadata. This is primarily used to route requests between
86+
// caller/responder. The server and client must use the same id for each
87+
// corresponging request.
88+
string message_id = 2;
7989
// The status type of the signing request.
8090
oneof status_oneof {
81-
StatusNotFound not_found = 2;
82-
StatusRunning running = 3;
83-
StatusFailed failed = 4;
84-
StatusCompleted completed = 5;
91+
StatusNotFound not_found = 3;
92+
StatusRunning running = 4;
93+
StatusFailed failed = 5;
94+
StatusCompleted completed = 6;
8595
}
8696
}

internal/relui/sign/doc.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright 2022 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// Package sign provides implementations for servers which can
6+
// sign Go release artifacts.
7+
package sign

0 commit comments

Comments
 (0)