From e2842ae2166ab0f2f6aebd5b5aa0ccb933ef9045 Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Thu, 21 Nov 2019 15:14:01 +0300 Subject: [PATCH] docs: add doc comments for meta and verify proto files --- service/meta.proto | 6 ++++++ service/verify.proto | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/service/meta.proto b/service/meta.proto index 62866d2..d3c3005 100644 --- a/service/meta.proto +++ b/service/meta.proto @@ -6,8 +6,14 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.stable_marshaler_all) = true; +// RequestMetaHeader contains information about request meta headers +// (should be embedded into message) message RequestMetaHeader { + // TTL must be larger than zero, it decreased in every NeoFS Node uint32 TTL = 1; + // Epoch for user can be empty, because node sets epoch to the actual value uint64 Epoch = 2; + // Version defines protocol version + // TODO: not used for now, should be implemented in future uint32 Version = 3; } diff --git a/service/verify.proto b/service/verify.proto index 7d83308..c70015b 100644 --- a/service/verify.proto +++ b/service/verify.proto @@ -6,15 +6,25 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.stable_marshaler_all) = true; +// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request +// (should be embedded into message). message RequestVerificationHeader { message Sign { + // Sign is signature of the request or session key. bytes Sign = 1; + // Peer is compressed public key used for signature. bytes Peer = 2; } + message Signature { + // Sign is a signature and public key of the request. Sign Sign = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + // Origin used for requests, when trusted node changes it and re-sign with session key. + // If session key used for signature request, then Origin should contain + // public key of user and signed session key. Sign Origin = 2; } + // Signatures is a set of signatures of every passed NeoFS Node repeated Signature Signatures = 1; }