frostfs-api-go/session/types.proto

36 lines
1.4 KiB
Protocol Buffer
Raw Normal View History

2019-11-18 13:34:06 +00:00
syntax = "proto3";
package session;
2020-03-31 07:05:26 +00:00
option go_package = "github.com/nspcc-dev/neofs-api-go/session";
2020-02-05 13:58:06 +00:00
option csharp_namespace = "NeoFS.API.Session";
2019-11-18 13:34:06 +00:00
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
message VerificationHeader {
// PublicKey is a session public key
2019-11-18 13:34:06 +00:00
bytes PublicKey = 1;
// KeySignature is a session public key signature. Signed by trusted side
2019-11-18 13:34:06 +00:00
bytes KeySignature = 2;
}
2019-11-20 16:46:30 +00:00
// User token granting rights for object manipulation
2019-11-18 13:34:06 +00:00
message Token {
2019-11-20 16:46:30 +00:00
// Header carries verification data of session key
2019-11-18 13:34:06 +00:00
VerificationHeader Header = 1 [(gogoproto.nullable) = false];
// OwnerID is an owner of manipulation object
2019-11-18 13:34:06 +00:00
bytes OwnerID = 2 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false];
// FirstEpoch is an initial epoch of token lifetime
2019-11-18 13:34:06 +00:00
uint64 FirstEpoch = 3;
// LastEpoch is a last epoch of token lifetime
2019-11-18 13:34:06 +00:00
uint64 LastEpoch = 4;
// ObjectID is an object identifier of manipulation object
2019-11-18 13:34:06 +00:00
repeated bytes ObjectID = 5 [(gogoproto.customtype) = "ObjectID", (gogoproto.nullable) = false];
// Signature is a token signature, signed by owner of manipulation object
2019-11-18 13:34:06 +00:00
bytes Signature = 6;
// ID is a token identifier. valid UUIDv4 represented in bytes
2019-11-18 13:34:06 +00:00
bytes ID = 7 [(gogoproto.customtype) = "TokenID", (gogoproto.nullable) = false];
// PublicKeys associated with owner
repeated bytes PublicKeys = 8;
2019-11-18 13:34:06 +00:00
}