diff --git a/accounting/service.proto b/accounting/service.proto index f328831..b4c6bd6 100644 --- a/accounting/service.proto +++ b/accounting/service.proto @@ -6,8 +6,7 @@ option go_package = "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc;accoun option csharp_namespace = "NeoFS.API.v2.Accounting"; import "refs/types.proto"; -import "service/meta.proto"; -import "service/verify.proto"; +import "service/types.proto"; // The service provides methods for obtaining information // about the account balance in NeoFS system. diff --git a/container/service.proto b/container/service.proto index b0b7165..c498477 100644 --- a/container/service.proto +++ b/container/service.proto @@ -8,8 +8,7 @@ option csharp_namespace = "NeoFS.API.v2.Container"; import "acl/types.proto"; import "container/types.proto"; import "refs/types.proto"; -import "service/meta.proto"; -import "service/verify.proto"; +import "service/types.proto"; // ContainerService provides API to access container smart-contract in morph chain // via NeoFS node. diff --git a/container/types.proto b/container/types.proto index 5b10606..589d392 100644 --- a/container/types.proto +++ b/container/types.proto @@ -7,7 +7,7 @@ option csharp_namespace = "NeoFS.API.v2.Container"; import "netmap/types.proto"; import "refs/types.proto"; -import "service/meta.proto"; +import "service/types.proto"; // Container is a structure that defines object placement behaviour. Objects // can be stored only within containers. They define placement rule, attributes diff --git a/object/service.proto b/object/service.proto index bbd466f..aad7466 100644 --- a/object/service.proto +++ b/object/service.proto @@ -7,8 +7,7 @@ option csharp_namespace = "NeoFS.API.v2.Object"; import "object/types.proto"; import "refs/types.proto"; -import "service/meta.proto"; -import "service/verify.proto"; +import "service/types.proto"; // Object service provides API for manipulating with the object. service ObjectService { diff --git a/object/types.proto b/object/types.proto index efcca41..c2a2afa 100644 --- a/object/types.proto +++ b/object/types.proto @@ -6,8 +6,7 @@ option go_package = "github.com/nspcc-dev/neofs-api-go/v2/object/grpc;object"; option csharp_namespace = "NeoFS.API.v2.Object"; import "refs/types.proto"; -import "service/meta.proto"; -import "service/verify.proto"; +import "service/types.proto"; // Type of the object payload content enum ObjectType { diff --git a/proto-docs/service.md b/proto-docs/service.md index 389c54d..d61b9a1 100644 --- a/proto-docs/service.md +++ b/proto-docs/service.md @@ -3,37 +3,32 @@ ## Table of Contents -- [service/meta.proto](#service/meta.proto) +- [service/types.proto](#service/types.proto) - Messages - [BearerToken](#neo.fs.v2.service.BearerToken) - [BearerToken.Body](#neo.fs.v2.service.BearerToken.Body) - [ObjectSessionContext](#neo.fs.v2.service.ObjectSessionContext) - [RequestMetaHeader](#neo.fs.v2.service.RequestMetaHeader) + - [RequestVerificationHeader](#neo.fs.v2.service.RequestVerificationHeader) - [ResponseMetaHeader](#neo.fs.v2.service.ResponseMetaHeader) + - [ResponseVerificationHeader](#neo.fs.v2.service.ResponseVerificationHeader) - [SessionToken](#neo.fs.v2.service.SessionToken) - [SessionToken.Body](#neo.fs.v2.service.SessionToken.Body) + - [Signature](#neo.fs.v2.service.Signature) - [TokenLifetime](#neo.fs.v2.service.TokenLifetime) - [Version](#neo.fs.v2.service.Version) - [XHeader](#neo.fs.v2.service.XHeader) -- [service/verify.proto](#service/verify.proto) - - - Messages - - [RequestVerificationHeader](#neo.fs.v2.service.RequestVerificationHeader) - - [ResponseVerificationHeader](#neo.fs.v2.service.ResponseVerificationHeader) - - [Signature](#neo.fs.v2.service.Signature) - - - [Scalar Value Types](#scalar-value-types) - +
-## service/meta.proto +## service/types.proto @@ -93,6 +88,20 @@ Information about the request | origin | [RequestMetaHeader](#neo.fs.v2.service.RequestMetaHeader) | | RequestMetaHeader of the origin request. | + + +### Message RequestVerificationHeader +Verification info for request signed by all intermediate nodes + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| body_signature | [Signature](#neo.fs.v2.service.Signature) | | Request Body signature. Should be generated once by request initiator. | +| meta_signature | [Signature](#neo.fs.v2.service.Signature) | | Request Meta signature is added and signed by any intermediate node | +| origin_signature | [Signature](#neo.fs.v2.service.Signature) | | Sign previous hops | +| origin | [RequestVerificationHeader](#neo.fs.v2.service.RequestVerificationHeader) | | Chain of previous hops signatures | + + ### Message ResponseMetaHeader @@ -108,6 +117,20 @@ Information about the response | origin | [ResponseMetaHeader](#neo.fs.v2.service.ResponseMetaHeader) | | Carries response meta header of the origin response. | + + +### Message ResponseVerificationHeader +Verification info for response signed by all intermediate nodes + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| body_signature | [Signature](#neo.fs.v2.service.Signature) | | Response Body signature. Should be generated once by answering node. | +| meta_signature | [Signature](#neo.fs.v2.service.Signature) | | Response Meta signature is added and signed by any intermediate node | +| origin_signature | [Signature](#neo.fs.v2.service.Signature) | | Sign previous hops | +| origin | [ResponseVerificationHeader](#neo.fs.v2.service.ResponseVerificationHeader) | | Chain of previous hops signatures | + + ### Message SessionToken @@ -135,6 +158,18 @@ Session token body | object | [ObjectSessionContext](#neo.fs.v2.service.ObjectSessionContext) | | ObjectService session context. | + + +### Message Signature +Signature of something in NeoFS + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [bytes](#bytes) | | Public key used for signing. | +| sign | [bytes](#bytes) | | Signature | + + ### Message TokenLifetime @@ -195,60 +230,6 @@ Object request verbs - - - -## service/verify.proto - - - - - - - -### Message RequestVerificationHeader -Verification info for request signed by all intermediate nodes - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body_signature | [Signature](#neo.fs.v2.service.Signature) | | Request Body signature. Should be generated once by request initiator. | -| meta_signature | [Signature](#neo.fs.v2.service.Signature) | | Request Meta signature is added and signed by any intermediate node | -| origin_signature | [Signature](#neo.fs.v2.service.Signature) | | Sign previous hops | -| origin | [RequestVerificationHeader](#neo.fs.v2.service.RequestVerificationHeader) | | Chain of previous hops signatures | - - - - -### Message ResponseVerificationHeader -Verification info for response signed by all intermediate nodes - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body_signature | [Signature](#neo.fs.v2.service.Signature) | | Response Body signature. Should be generated once by answering node. | -| meta_signature | [Signature](#neo.fs.v2.service.Signature) | | Response Meta signature is added and signed by any intermediate node | -| origin_signature | [Signature](#neo.fs.v2.service.Signature) | | Sign previous hops | -| origin | [ResponseVerificationHeader](#neo.fs.v2.service.ResponseVerificationHeader) | | Chain of previous hops signatures | - - - - -### Message Signature -Signature of something in NeoFS - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [bytes](#bytes) | | Public key used for signing. | -| sign | [bytes](#bytes) | | Signature | - - - - - - - ## Scalar Value Types | .proto Type | Notes | C++ Type | Java Type | Python Type | diff --git a/service/meta.proto b/service/types.proto similarity index 77% rename from service/meta.proto rename to service/types.proto index aad0277..c59f4d1 100644 --- a/service/meta.proto +++ b/service/types.proto @@ -7,7 +7,6 @@ option csharp_namespace = "NeoFS.API.v2.Service"; import "acl/types.proto"; import "refs/types.proto"; -import "service/verify.proto"; // Extended headers for Request/Response message XHeader { @@ -164,3 +163,37 @@ message ResponseMetaHeader { // Carries response meta header of the origin response. ResponseMetaHeader origin = 5; } + +// Signature of something in NeoFS +message Signature { + // Public key used for signing. + bytes key = 1; + // Signature + bytes sign = 2; +} + +// Verification info for request signed by all intermediate nodes +message RequestVerificationHeader { + // Request Body signature. Should be generated once by request initiator. + Signature body_signature = 1; + // Request Meta signature is added and signed by any intermediate node + Signature meta_signature = 2; + // Sign previous hops + Signature origin_signature = 3; + + // Chain of previous hops signatures + RequestVerificationHeader origin = 4; +} + +// Verification info for response signed by all intermediate nodes +message ResponseVerificationHeader { + // Response Body signature. Should be generated once by answering node. + Signature body_signature = 1; + // Response Meta signature is added and signed by any intermediate node + Signature meta_signature = 2; + // Sign previous hops + Signature origin_signature = 3; + + // Chain of previous hops signatures + ResponseVerificationHeader origin = 4; +} diff --git a/service/verify.proto b/service/verify.proto deleted file mode 100644 index af4c526..0000000 --- a/service/verify.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package neo.fs.v2.service; - -option go_package = "github.com/nspcc-dev/neofs-api-go/v2/service/grpc;service"; -option csharp_namespace = "NeoFS.API.v2.Service"; - -// Signature of something in NeoFS -message Signature { - // Public key used for signing. - bytes key = 1; - // Signature - bytes sign = 2; -} - -// Verification info for request signed by all intermediate nodes -message RequestVerificationHeader { - // Request Body signature. Should be generated once by request initiator. - Signature body_signature = 1; - // Request Meta signature is added and signed by any intermediate node - Signature meta_signature = 2; - // Sign previous hops - Signature origin_signature = 3; - - // Chain of previous hops signatures - RequestVerificationHeader origin = 4; -} - -// Verification info for response signed by all intermediate nodes -message ResponseVerificationHeader { - // Response Body signature. Should be generated once by answering node. - Signature body_signature = 1; - // Response Meta signature is added and signed by any intermediate node - Signature meta_signature = 2; - // Sign previous hops - Signature origin_signature = 3; - - // Chain of previous hops signatures - ResponseVerificationHeader origin = 4; -} diff --git a/session/service.proto b/session/service.proto index 3c26447..b8bd37e 100644 --- a/session/service.proto +++ b/session/service.proto @@ -6,8 +6,7 @@ option go_package = "github.com/nspcc-dev/neofs-api-go/v2/session/grpc;session"; option csharp_namespace = "NeoFS.API.v2.Session"; import "refs/types.proto"; -import "service/meta.proto"; -import "service/verify.proto"; +import "service/types.proto"; // Create Session record on Node side service SessionService {