You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Session Token v2 solves the delegation, power of attorney, and chain-of-trust
problems. It enables:
- Account-based authority (direct or NNS-based indirect)
- Multi-account subjects (multiple entities can use same token)
- Multi-verb operations (GET, PUT, DELETE in single token)
- Delegation chains (verifiable like X.509 certificates)
- Indirect accounts (NeoFS Name Service resolution)
Refs #241.
Signed-off-by: Andrey Butusov <andrey@nspcc.io>
@@ -119,6 +142,57 @@ Session creation response body
119
142
| id |[bytes](#bytes)|| Identifier of a newly created session |
120
143
| session_key |[bytes](#bytes)|| Public key used for session |
121
144
145
+
146
+
<aname="neo.fs.v2.session.CreateV2Request"></a>
147
+
148
+
### Message CreateV2Request
149
+
CreateV2Request is information necessary for creating a session token v2.
150
+
151
+
152
+
| Field | Type | Label | Description |
153
+
| ----- | ---- | ----- | ----------- |
154
+
| body |[CreateV2Request.Body](#neo.fs.v2.session.CreateV2Request.Body)|| Body of create session token v2 request message. |
155
+
| meta_header |[RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader)|| Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
156
+
| verify_header |[RequestVerificationHeader](#neo.fs.v2.session.RequestVerificationHeader)|| Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
CreateV2Response is information about a newly created session token v2.
177
+
178
+
179
+
| Field | Type | Label | Description |
180
+
| ----- | ---- | ----- | ----------- |
181
+
| body |[CreateV2Response.Body](#neo.fs.v2.session.CreateV2Response.Body)|| Body of create session token v2 response message. |
182
+
| meta_header |[ResponseMetaHeader](#neo.fs.v2.session.ResponseMetaHeader)|| Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. |
183
+
| verify_header |[ResponseVerificationHeader](#neo.fs.v2.session.ResponseVerificationHeader)|| Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
| token |[SessionTokenV2](#neo.fs.v2.session.SessionTokenV2)|| The session token v2 with delegation and chain-of-trust support. |
195
+
122
196
<!-- end messages -->
123
197
124
198
<!-- end enums -->
@@ -147,6 +221,35 @@ Context information for Session Tokens related to ContainerService requests.
147
221
| container_id |[neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID)|| Particular container to which the action applies. Ignored if wildcard flag is set. |
| wildcard |[bool](#bool)|| If true, applies to all containers owned by the subject. |
235
+
| container_id |[neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID)|| Particular container to which the action applies. Ignored if wildcard is true. |
236
+
237
+
238
+
<aname="neo.fs.v2.session.DelegationInfo"></a>
239
+
240
+
### Message DelegationInfo
241
+
DelegationInfo represents a single delegation in a chain of trust.
242
+
243
+
244
+
| Field | Type | Label | Description |
245
+
| ----- | ---- | ----- | ----------- |
246
+
| issuer |[neo.fs.v2.refs.Account](#neo.fs.v2.refs.Account)|| Account that performed this delegation. |
247
+
| subject |[neo.fs.v2.refs.Account](#neo.fs.v2.refs.Account)|| Account that received the delegation. |
248
+
| timestamp |[int64](#int64)|| Unix timestamp when this delegation was created. |
249
+
| verbs |[string](#string)| repeated | List of verbs authorized by this delegation. |
250
+
| signature |[neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature)|| Signature of the issuer confirming this delegation record. The signature is created over the deterministic serialization of this DelegationInfo message excluding this field. |
@@ -171,6 +274,31 @@ Carries objects involved in the object session.
171
274
| objects |[neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID)| repeated | Indicates which objects the session is spread to. Objects are expected to be stored in the NeoFS container referenced by `container` field. Each element MUST have correct format. |
| container |[neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID)|| Container where operation is allowed. |
299
+
| objects |[neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID)| repeated | Specific objects where operation is allowed. Empty list means all objects in the container. |
300
+
301
+
174
302
<aname="neo.fs.v2.session.RequestMetaHeader"></a>
175
303
176
304
### Message RequestMetaHeader
@@ -256,23 +384,53 @@ Session Token body
256
384
| ----- | ---- | ----- | ----------- |
257
385
| id |[bytes](#bytes)|| Token identifier is a valid UUIDv4 in binary form |
258
386
| owner_id |[neo.fs.v2.refs.OwnerID](#neo.fs.v2.refs.OwnerID)|| Identifier of the session initiator |
259
-
| lifetime |[SessionToken.Body.TokenLifetime](#neo.fs.v2.session.SessionToken.Body.TokenLifetime)|| Lifetime of the session |
387
+
| lifetime |[TokenLifetime](#neo.fs.v2.session.TokenLifetime)|| Lifetime of the session |
260
388
| session_key |[bytes](#bytes)|| Public key used in session |
0 commit comments