From dbd5ed1978497f11bf002e9d958905032bf1a5ba Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 24 May 2021 14:12:03 +0300 Subject: [PATCH] [#156] session: Define structure of container session context Define `session.ContainerSessionContext` message with context information of container service RPCs. Signed-off-by: Leonard Lyubich --- session/types.proto | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/session/types.proto b/session/types.proto index 74c1d36..e4871bf 100644 --- a/session/types.proto +++ b/session/types.proto @@ -43,6 +43,34 @@ message ObjectSessionContext { neo.fs.v2.refs.Address address = 2 [json_name = "address"]; } +// Context information for Session Tokens related to ContainerService requests. +message ContainerSessionContext { + // Container request verbs + enum Verb { + // Unknown verb + VERB_UNSPECIFIED = 0; + + // Refers to container.Put RPC call + PUT = 1; + + // Refers to container.Delete RPC call + DELETE = 2; + + // Refers to container.SetExtendedACL RPC call + SETEACL = 3; + } + // Type of request for which the token is issued + Verb verb = 1 [json_name = "verb"]; + + // Spreads the action to all owner containers. + // If set, container_id field is ignored. + bool wildcard = 2 [json_name = "wildcard"]; + + // Particular container to which the action applies. + // Ignored if wildcard flag is set. + refs.ContainerID container_id = 3 [json_name = "containerID"]; +} + // NeoFS Session Token. message SessionToken { // Session Token body