[#57] Merge service and session packages
Merging session and service packages to increase clarity and reduce cross-dependencies. Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
762c9762ef
commit
fc170f56bf
10 changed files with 280 additions and 213 deletions
|
@ -6,6 +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 "acl/types.proto";
|
||||
|
||||
// Context information for Session Tokens related to ObjectService requests
|
||||
message ObjectSessionContext {
|
||||
|
@ -81,3 +82,81 @@ message SessionToken {
|
|||
// Signature is a signature of session token information
|
||||
neo.fs.v2.refs.Signature signature = 2;
|
||||
}
|
||||
|
||||
// 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
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue