frostfs-api-go/session/types.proto

33 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

2019-11-18 13:34:06 +00:00
syntax = "proto3";
package session;
option go_package = "github.com/nspcc-dev/neofs-proto/session";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
message VerificationHeader {
2019-11-20 16:46:30 +00:00
// Session public key
2019-11-18 13:34:06 +00:00
bytes PublicKey = 1;
2019-11-20 16:46:30 +00:00
// 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];
2019-11-20 16:46:30 +00:00
// Owner of manipulation object
2019-11-18 13:34:06 +00:00
bytes OwnerID = 2 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false];
2019-11-20 16:46:30 +00:00
// Initial epoch of token lifetime
2019-11-18 13:34:06 +00:00
uint64 FirstEpoch = 3;
2019-11-20 16:46:30 +00:00
// Last epoch of token lifetime
2019-11-18 13:34:06 +00:00
uint64 LastEpoch = 4;
2019-11-20 16:46:30 +00:00
// ID of manipulation object
2019-11-18 13:34:06 +00:00
repeated bytes ObjectID = 5 [(gogoproto.customtype) = "ObjectID", (gogoproto.nullable) = false];
2019-11-20 16:46:30 +00:00
// Token signature. Signed by owner of manipulation object
2019-11-18 13:34:06 +00:00
bytes Signature = 6;
2019-11-20 16:46:30 +00:00
// Token ID (UUID)
2019-11-18 13:34:06 +00:00
bytes ID = 7 [(gogoproto.customtype) = "TokenID", (gogoproto.nullable) = false];
}