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-08-06 09:28:13 +00:00
|
|
|
import "acl/types.proto";
|
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.
|
2020-08-06 21:59:50 +00:00
|
|
|
bytes key = 1;
|
2020-08-05 23:25:50 +00:00
|
|
|
|
2020-01-30 11:41:24 +00:00
|
|
|
// Sign is signature of the request or session key.
|
2020-08-06 21:59: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
|
2020-08-06 21:59:50 +00:00
|
|
|
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
|
2020-08-06 21:59:50 +00:00
|
|
|
Token token = 2;
|
2020-06-18 07:58:11 +00:00
|
|
|
|
|
|
|
// Bearer is a Bearer token of the request
|
2020-08-06 21:59:50 +00:00
|
|
|
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-06 21:59:50 +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.
|
2020-08-06 21:59:50 +00:00
|
|
|
refs.OwnerID owner_id = 2;
|
2020-04-24 16:18:28 +00:00
|
|
|
|
|
|
|
// Verb is an enumeration of session request types
|
|
|
|
enum Verb {
|
2020-08-11 08:22:46 +00:00
|
|
|
// Refers to object.Put RPC call
|
|
|
|
OBJECT_PUT = 0;
|
|
|
|
// Refers to object.Get RPC call
|
|
|
|
OBJECT_GET = 1;
|
|
|
|
// Refers to object.Head RPC call
|
|
|
|
OBJECT_HEAD = 2;
|
|
|
|
// Refers to object.Search RPC call
|
|
|
|
OBJECT_SEARCH = 3;
|
|
|
|
// Refers to object.Delete RPC call
|
|
|
|
OBJECT_DELETE = 4;
|
|
|
|
// Refers to object.GetRange RPC call
|
|
|
|
OBJECT_RANGE = 5;
|
|
|
|
// Refers to object.GetRangeHash RPC call
|
|
|
|
OBJECT_RANGEHASH = 6;
|
2020-04-24 16:18:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
2020-05-07 15:42:29 +00:00
|
|
|
// Lifetime is a lifetime of the session
|
2020-08-11 08:11:23 +00:00
|
|
|
TokenLifetime lifetime = 4;
|
2020-04-24 16:18:28 +00:00
|
|
|
|
|
|
|
// SessionKey is a public key of session key
|
2020-08-11 08:11:23 +00:00
|
|
|
bytes session_key = 5;
|
2020-05-15 12:29:15 +00:00
|
|
|
|
|
|
|
// OwnerKey is a public key of the token owner
|
2020-08-11 08:11:23 +00:00
|
|
|
bytes owner_key = 6;
|
|
|
|
|
|
|
|
// Carries context of the session.
|
|
|
|
oneof context {
|
|
|
|
// object_address represents the object session context.
|
|
|
|
refs.Address object_address = 7;
|
|
|
|
}
|
2020-04-24 16:18:28 +00:00
|
|
|
}
|
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
// token_info is a grouped information about token
|
|
|
|
Info token_info = 1;
|
2020-04-24 16:18:28 +00:00
|
|
|
|
|
|
|
// Signature is a signature of session token information
|
2020-08-11 08:12:41 +00:00
|
|
|
bytes signature = 2;
|
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 {
|
2020-08-06 21:59:50 +00:00
|
|
|
// created carries an initial epoch of token lifetime
|
|
|
|
uint64 created = 1;
|
2020-05-07 15:42:29 +00:00
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
// valid_until carries a last epoch of token lifetime
|
|
|
|
uint64 valid_until = 2;
|
2020-05-07 15:42:29 +00:00
|
|
|
}
|
|
|
|
|
2020-06-18 07:58:11 +00:00
|
|
|
// BearerTokenMsg carries information about request ACL rules with limited lifetime
|
|
|
|
message BearerTokenMsg {
|
|
|
|
message Info {
|
2020-08-06 09:28:13 +00:00
|
|
|
// EACLTable carries table of extended ACL rules.
|
2020-08-06 21:59:50 +00:00
|
|
|
acl.EACLTable eacl_table = 1;
|
2020-06-18 07:58:11 +00:00
|
|
|
|
2020-08-05 16:49:16 +00:00
|
|
|
// OwnerID carries identifier of the token owner.
|
2020-08-06 21:59:50 +00:00
|
|
|
refs.OwnerID owner_id = 2;
|
2020-06-18 07:58:11 +00:00
|
|
|
|
|
|
|
// ValidUntil carries a last epoch of token lifetime
|
2020-08-06 21:59:50 +00:00
|
|
|
uint64 valid_until = 3;
|
2020-06-18 07:58:11 +00:00
|
|
|
}
|
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
// token_info is a grouped information about token
|
|
|
|
Info token_info = 1;
|
2020-06-18 07:58:11 +00:00
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
// owner_key is a public key of the token owner
|
|
|
|
bytes owner_key = 2;
|
2020-06-18 07:58:11 +00:00
|
|
|
|
|
|
|
// Signature is a signature of token information
|
2020-08-06 21:59:50 +00:00
|
|
|
bytes signature = 3;
|
2020-06-18 07:58:11 +00:00
|
|
|
}
|