From b84fab4d24ae1aecfbca079f23ebe6560567244c Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 23 Apr 2020 13:44:21 +0300 Subject: [PATCH] service: change RequestVerificationHeader message This commit: * removes RequestVerificationHeader.Signature message; * renames RequestVerificationHeader.Sign message to Signature. --- proto-docs/service.md | 17 ++--------------- service/verify.proto | 11 +---------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/proto-docs/service.md b/proto-docs/service.md index a690952..1d98503 100644 --- a/proto-docs/service.md +++ b/proto-docs/service.md @@ -14,7 +14,6 @@ - Messages - [RequestVerificationHeader](#service.RequestVerificationHeader) - - [RequestVerificationHeader.Sign](#service.RequestVerificationHeader.Sign) - [RequestVerificationHeader.Signature](#service.RequestVerificationHeader.Signature) @@ -85,18 +84,6 @@ RequestVerificationHeader is a set of signatures of every NeoFS Node that proces | Signatures | [RequestVerificationHeader.Signature](#service.RequestVerificationHeader.Signature) | repeated | Signatures is a set of signatures of every passed NeoFS Node | - - -### Message RequestVerificationHeader.Sign - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| Sign | [bytes](#bytes) | | Sign is signature of the request or session key. | -| Peer | [bytes](#bytes) | | Peer is compressed public key used for signature. | - - ### Message RequestVerificationHeader.Signature @@ -105,8 +92,8 @@ RequestVerificationHeader is a set of signatures of every NeoFS Node that proces | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| Sign | [RequestVerificationHeader.Sign](#service.RequestVerificationHeader.Sign) | | Sign is a signature and public key of the request. | -| Origin | [RequestVerificationHeader.Sign](#service.RequestVerificationHeader.Sign) | | 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 | [bytes](#bytes) | | Sign is signature of the request or session key. | +| Peer | [bytes](#bytes) | | Peer is compressed public key used for signature. | diff --git a/service/verify.proto b/service/verify.proto index de0a69a..37a3c86 100644 --- a/service/verify.proto +++ b/service/verify.proto @@ -10,22 +10,13 @@ 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 { + message Signature { // 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; }