frostfs-api/service/types.proto
Stanislav Bogatyrev e5f78eb927 Move SessionToken to session package
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-18 18:31:36 +03:00

89 lines
2.4 KiB
Protocol Buffer

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";
import "acl/types.proto";
import "refs/types.proto";
import "session/types.proto";
// Extended headers for Request/Response
message XHeader {
// Key of the X-Header.
string key = 1;
// Value of the X-Header.
string value = 2;
}
// Information about the request
message RequestMetaHeader {
// Client API version.
neo.fs.v2.refs.Version version = 1;
// Client local epoch number. Set to 0 if unknown.
uint64 epoch = 2;
// Maximum number of nodes in the request route.
uint32 ttl = 3;
// Request X-Headers.
repeated XHeader x_headers = 4;
// Token is a token of the session within which the request is sent
neo.fs.v2.session.SessionToken session_token = 5;
// Bearer is a Bearer token of the request
neo.fs.v2.acl.BearerToken bearer_token = 6;
// RequestMetaHeader of the origin request.
RequestMetaHeader origin = 7;
}
// Information about the response
message ResponseMetaHeader {
// Server API version.
neo.fs.v2.refs.Version version = 1;
// Server local epoch number.
uint64 epoch = 2;
// Maximum number of nodes in the response route.
uint32 ttl = 3;
// Response X-Headers.
repeated XHeader x_headers = 4;
// Carries response meta header of the origin response.
ResponseMetaHeader origin = 5;
}
// Verification info for request signed by all intermediate nodes
message RequestVerificationHeader {
// Request Body signature. Should be generated once by request initiator.
neo.fs.v2.refs.Signature body_signature = 1;
// Request Meta signature is added and signed by any intermediate node
neo.fs.v2.refs.Signature meta_signature = 2;
// Sign previous hops
neo.fs.v2.refs.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.
neo.fs.v2.refs.Signature body_signature = 1;
// Response Meta signature is added and signed by any intermediate node
neo.fs.v2.refs.Signature meta_signature = 2;
// Sign previous hops
neo.fs.v2.refs.Signature origin_signature = 3;
// Chain of previous hops signatures
ResponseVerificationHeader origin = 4;
}