2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
2020-08-05 23:25:50 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
package neo.fs.v2.service;
|
2020-08-05 23:25:50 +00:00
|
|
|
|
2020-08-14 18:27:31 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/service/grpc;service";
|
2020-08-12 21:43:51 +00:00
|
|
|
option csharp_namespace = "NeoFS.API.v2.Service";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
import "acl/types.proto";
|
2020-08-11 15:21:45 +00:00
|
|
|
import "refs/types.proto";
|
2020-08-18 13:49:05 +00:00
|
|
|
import "session/types.proto";
|
2020-08-11 14:49:31 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Extended headers for Request/Response
|
2020-08-11 14:49:31 +00:00
|
|
|
message XHeader {
|
|
|
|
// Key of the X-Header.
|
|
|
|
string key = 1;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
// Value of the X-Header.
|
|
|
|
string value = 2;
|
|
|
|
}
|
|
|
|
|
2020-08-11 15:21:45 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
// Information about the request
|
2020-01-30 11:41:24 +00:00
|
|
|
message RequestMetaHeader {
|
2020-08-11 14:49:31 +00:00
|
|
|
// Client API version.
|
2020-08-18 13:14:25 +00:00
|
|
|
neo.fs.v2.refs.Version version = 1;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
// Client local epoch number. Set to 0 if unknown.
|
|
|
|
uint64 epoch = 2;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
// Maximum number of nodes in the request route.
|
|
|
|
uint32 ttl = 3;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
// Request X-Headers.
|
|
|
|
repeated XHeader x_headers = 4;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-08-11 15:21:45 +00:00
|
|
|
// Token is a token of the session within which the request is sent
|
2020-08-18 13:49:05 +00:00
|
|
|
neo.fs.v2.session.SessionToken session_token = 5;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-08-11 15:21:45 +00:00
|
|
|
// Bearer is a Bearer token of the request
|
2020-08-18 13:41:47 +00:00
|
|
|
neo.fs.v2.acl.BearerToken bearer_token = 6;
|
2020-02-13 14:21:46 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
// RequestMetaHeader of the origin request.
|
2020-08-11 15:21:45 +00:00
|
|
|
RequestMetaHeader origin = 7;
|
2020-08-11 14:49:31 +00:00
|
|
|
}
|
2020-06-18 08:49:10 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
// Information about the response
|
|
|
|
message ResponseMetaHeader {
|
|
|
|
// Server API version.
|
2020-08-18 13:14:25 +00:00
|
|
|
neo.fs.v2.refs.Version version = 1;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
// Server local epoch number.
|
|
|
|
uint64 epoch = 2;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
// Maximum number of nodes in the response route.
|
|
|
|
uint32 ttl = 3;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
// Response X-Headers.
|
|
|
|
repeated XHeader x_headers = 4;
|
2020-06-18 08:49:10 +00:00
|
|
|
|
2020-08-11 14:49:31 +00:00
|
|
|
// Carries response meta header of the origin response.
|
2020-08-11 15:21:45 +00:00
|
|
|
ResponseMetaHeader origin = 5;
|
2020-06-18 08:49:10 +00:00
|
|
|
}
|
2020-08-18 11:13:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Verification info for request signed by all intermediate nodes
|
|
|
|
message RequestVerificationHeader {
|
|
|
|
// Request Body signature. Should be generated once by request initiator.
|
2020-08-18 13:41:47 +00:00
|
|
|
neo.fs.v2.refs.Signature body_signature = 1;
|
2020-08-18 11:13:16 +00:00
|
|
|
// Request Meta signature is added and signed by any intermediate node
|
2020-08-18 13:41:47 +00:00
|
|
|
neo.fs.v2.refs.Signature meta_signature = 2;
|
2020-08-18 11:13:16 +00:00
|
|
|
// Sign previous hops
|
2020-08-18 13:41:47 +00:00
|
|
|
neo.fs.v2.refs.Signature origin_signature = 3;
|
2020-08-18 11:13:16 +00:00
|
|
|
|
|
|
|
// 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.
|
2020-08-18 13:41:47 +00:00
|
|
|
neo.fs.v2.refs.Signature body_signature = 1;
|
2020-08-18 11:13:16 +00:00
|
|
|
// Response Meta signature is added and signed by any intermediate node
|
2020-08-18 13:41:47 +00:00
|
|
|
neo.fs.v2.refs.Signature meta_signature = 2;
|
2020-08-18 11:13:16 +00:00
|
|
|
// Sign previous hops
|
2020-08-18 13:41:47 +00:00
|
|
|
neo.fs.v2.refs.Signature origin_signature = 3;
|
2020-08-18 11:13:16 +00:00
|
|
|
|
|
|
|
// Chain of previous hops signatures
|
|
|
|
ResponseVerificationHeader origin = 4;
|
|
|
|
}
|