2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
2020-08-05 23:25:50 +00:00
|
|
|
|
2020-01-30 11:41:24 +00:00
|
|
|
package service;
|
2020-08-05 23:25:50 +00:00
|
|
|
|
2020-03-31 06:58:22 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/service";
|
2020-02-05 12:14:39 +00:00
|
|
|
option csharp_namespace = "NeoFS.API.Service";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-04-24 16:18:28 +00:00
|
|
|
import "refs/types.proto";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-08-05 23:25:50 +00:00
|
|
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request.
|
2020-01-30 11:41:24 +00:00
|
|
|
message RequestVerificationHeader {
|
2020-04-23 10:44:21 +00:00
|
|
|
message Signature {
|
2020-08-05 23:25:50 +00:00
|
|
|
// Key is compressed public key used for signature.
|
|
|
|
bytes Key = 1;
|
|
|
|
|
2020-01-30 11:41:24 +00:00
|
|
|
// Sign is signature of the request or session key.
|
2020-08-05 23:25:50 +00:00
|
|
|
bytes Sign = 2;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Signatures is a set of signatures of every passed NeoFS Node
|
|
|
|
repeated Signature Signatures = 1;
|
2020-04-24 16:18:28 +00:00
|
|
|
|
|
|
|
// Token is a token of the session within which the request is sent
|
|
|
|
Token Token = 2;
|
2020-06-18 07:58:11 +00:00
|
|
|
|
|
|
|
// Bearer is a Bearer token of the request
|
|
|
|
BearerTokenMsg Bearer = 3;
|
2020-04-24 16:18:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// User token granting rights for object manipulation
|
|
|
|
message Token {
|
|
|
|
message Info {
|
|
|
|
// ID is a token identifier. valid UUIDv4 represented in bytes
|
2020-08-05 22:34:11 +00:00
|
|
|
bytes ID = 1;
|
2020-04-24 16:18:28 +00:00
|
|
|
|
2020-08-05 16:49:16 +00:00
|
|
|
// OwnerID carries identifier of the manipulation object owner.
|
|
|
|
refs.OwnerID OwnerID = 2;
|
2020-04-24 16:18:28 +00:00
|
|
|
|
|
|
|
// Verb is an enumeration of session request types
|
|
|
|
enum Verb {
|
|
|
|
// Put refers to object.Put RPC call
|
|
|
|
Put = 0;
|
|
|
|
// Get refers to object.Get RPC call
|
|
|
|
Get = 1;
|
|
|
|
// Head refers to object.Head RPC call
|
|
|
|
Head = 2;
|
|
|
|
// Search refers to object.Search RPC call
|
|
|
|
Search = 3;
|
|
|
|
// Delete refers to object.Delete RPC call
|
|
|
|
Delete = 4;
|
|
|
|
// Range refers to object.GetRange RPC call
|
|
|
|
Range = 5;
|
|
|
|
// RangeHash refers to object.GetRangeHash RPC call
|
|
|
|
RangeHash = 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Verb is a type of request for which the token is issued
|
2020-08-05 22:34:11 +00:00
|
|
|
Verb verb = 3;
|
2020-04-24 16:18:28 +00:00
|
|
|
|
|
|
|
// Address is an object address for which token is issued
|
2020-08-05 22:34:11 +00:00
|
|
|
refs.Address Address = 4;
|
2020-04-24 16:18:28 +00:00
|
|
|
|
2020-05-07 15:42:29 +00:00
|
|
|
// Lifetime is a lifetime of the session
|
2020-08-05 22:34:11 +00:00
|
|
|
TokenLifetime Lifetime = 5;
|
2020-04-24 16:18:28 +00:00
|
|
|
|
|
|
|
// SessionKey is a public key of session key
|
2020-05-07 15:42:29 +00:00
|
|
|
bytes SessionKey = 6;
|
2020-05-15 12:29:15 +00:00
|
|
|
|
|
|
|
// OwnerKey is a public key of the token owner
|
|
|
|
bytes OwnerKey = 7;
|
2020-04-24 16:18:28 +00:00
|
|
|
}
|
|
|
|
|
2020-04-27 15:44:13 +00:00
|
|
|
// TokenInfo is a grouped information about token
|
2020-08-05 22:34:11 +00:00
|
|
|
Info TokenInfo = 1;
|
2020-04-24 16:18:28 +00:00
|
|
|
|
|
|
|
// Signature is a signature of session token information
|
|
|
|
bytes Signature = 8;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
2020-04-24 16:18:28 +00:00
|
|
|
|
2020-05-07 15:42:29 +00:00
|
|
|
// TokenLifetime carries a group of lifetime parameters of the token
|
|
|
|
message TokenLifetime {
|
|
|
|
// Created carries an initial epoch of token lifetime
|
|
|
|
uint64 Created = 1;
|
|
|
|
|
|
|
|
// ValidUntil carries a last epoch of token lifetime
|
|
|
|
uint64 ValidUntil = 2;
|
|
|
|
}
|
|
|
|
|
2020-06-18 07:58:11 +00:00
|
|
|
// BearerTokenMsg carries information about request ACL rules with limited lifetime
|
|
|
|
message BearerTokenMsg {
|
|
|
|
message Info {
|
2020-06-18 08:56:26 +00:00
|
|
|
// ACLRules carries a binary representation of the table of extended ACL rules
|
2020-06-18 07:58:11 +00:00
|
|
|
bytes ACLRules = 1;
|
|
|
|
|
2020-08-05 16:49:16 +00:00
|
|
|
// OwnerID carries identifier of the token owner.
|
|
|
|
refs.OwnerID OwnerID = 2;
|
2020-06-18 07:58:11 +00:00
|
|
|
|
|
|
|
// ValidUntil carries a last epoch of token lifetime
|
|
|
|
uint64 ValidUntil = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// TokenInfo is a grouped information about token
|
2020-08-05 22:34:11 +00:00
|
|
|
Info TokenInfo = 1;
|
2020-06-18 07:58:11 +00:00
|
|
|
|
|
|
|
// OwnerKey is a public key of the token owner
|
|
|
|
bytes OwnerKey = 2;
|
|
|
|
|
|
|
|
// Signature is a signature of token information
|
|
|
|
bytes Signature = 3;
|
|
|
|
}
|