Skip to content

Commit fe66360

Browse files
authored
feat(api): remote attestation state API (#495)
Signed-off-by: Miguel Martinez Trivino <[email protected]>
1 parent 3d2b0ce commit fe66360

31 files changed

+5892
-46
lines changed

app/controlplane/api/controlplane/v1/attestation_state.pb.go

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

app/controlplane/api/controlplane/v1/attestation_state.pb.validate.go

Lines changed: 1270 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
//
2+
// Copyright 2024 The Chainloop Authors.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
syntax = "proto3";
17+
18+
package controlplane.v1;
19+
20+
option go_package = "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1;v1";
21+
22+
import "validate/validate.proto";
23+
import "attestation/v1/crafting_state.proto";
24+
25+
// API to remotely store and retrieve attestation state
26+
// using the attestation crafting process
27+
service AttestationStateService {
28+
rpc Initialized (AttestationStateServiceInitializedRequest) returns (AttestationStateServiceInitializedResponse);
29+
rpc Save (AttestationStateServiceSaveRequest) returns (AttestationStateServiceSaveResponse);
30+
rpc Read (AttestationStateServiceReadRequest) returns (AttestationStateServiceReadResponse);
31+
rpc Reset (AttestationStateServiceResetRequest) returns (AttestationStateServiceResetResponse);
32+
}
33+
34+
message AttestationStateServiceInitializedRequest {
35+
string workflow_run_id = 1 [(validate.rules).string = {min_len: 1}];
36+
}
37+
38+
message AttestationStateServiceInitializedResponse {
39+
Result result = 1;
40+
41+
message Result {
42+
bool initialized = 1;
43+
}
44+
}
45+
46+
message AttestationStateServiceSaveRequest {
47+
string workflow_run_id = 1 [(validate.rules).string = {min_len: 1}];
48+
attestation.v1.CraftingState attestation_state = 2 [(validate.rules).message.required = true];
49+
}
50+
51+
message AttestationStateServiceSaveResponse {}
52+
53+
message AttestationStateServiceReadRequest {
54+
string workflow_run_id = 1 [(validate.rules).string = {min_len: 1}];
55+
}
56+
57+
message AttestationStateServiceReadResponse {
58+
Result result = 1;
59+
60+
message Result {
61+
attestation.v1.CraftingState attestation_state = 2;
62+
}
63+
}
64+
65+
message AttestationStateServiceResetRequest {
66+
string workflow_run_id = 1 [(validate.rules).string = {min_len: 1}];
67+
}
68+
69+
message AttestationStateServiceResetResponse {}
70+

app/controlplane/api/controlplane/v1/attestation_state_grpc.pb.go

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

0 commit comments

Comments
 (0)