1283036e37
* add voucher service on storage node * config field tag syntax, go routines for requests * hook up voucher service in storagenode/peer.go * add voucher config to testplanet * add voucher config to testplanet * add voucher response status INVALID, ACCEPTED, REJECTED * add a test for vouchers service * handle no row from GetValid, test it * add trust pool to voucher service * use trusted list to get satellites * verify vouchers upon receipt * test VerifyVoucher
40 lines
878 B
Protocol Buffer
40 lines
878 B
Protocol Buffer
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
syntax = "proto3";
|
|
option go_package = "pb";
|
|
|
|
package vouchers;
|
|
|
|
import "gogo.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
// Voucher is a signed message verifying that a node has been vetted by a particular satellite
|
|
message Voucher {
|
|
bytes satellite_id = 1 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
|
bytes storage_node_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
|
|
|
google.protobuf.Timestamp expiration = 3;
|
|
|
|
bytes satellite_signature = 4;
|
|
}
|
|
|
|
message VoucherRequest {}
|
|
|
|
message VoucherResponse {
|
|
enum Status {
|
|
INVALID = 0;
|
|
ACCEPTED = 1;
|
|
REJECTED = 2;
|
|
}
|
|
|
|
Voucher voucher = 1;
|
|
|
|
Status status = 2;
|
|
}
|
|
|
|
|
|
service Vouchers {
|
|
rpc Request(VoucherRequest) returns (VoucherResponse) {}
|
|
}
|