Skip to content

Commit 0f7cd43

Browse files
committed
session: change issuer of token v2 to OwnerID
Since the issuer cannot be indirect (from NNS) because the token must be signed by the user, the issuer must be a `OwnerID` type. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
1 parent eaf2cf3 commit 0f7cd43

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

proto-docs/session.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ Session Token body.
317317
| ----- | ---- | ----- | ----------- |
318318
| version | [uint32](#uint32) | | Token version. |
319319
| nonce | [uint32](#uint32) | | Random nonce to prevent collisions. |
320-
| issuer | [Target](#neo.fs.v2.session.Target) | | Account that issued this token (who signed it). |
320+
| issuer | [neo.fs.v2.refs.OwnerID](#neo.fs.v2.refs.OwnerID) | | Account that issued this token (who signed it). |
321321
| subjects | [Target](#neo.fs.v2.session.Target) | repeated | Accounts authorized by this token (who can use it). Maximum number of subjects: 8. |
322322
| lifetime | [TokenLifetime](#neo.fs.v2.session.TokenLifetime) | | Lifetime of this token. |
323323
| contexts | [SessionContextV2](#neo.fs.v2.session.SessionContextV2) | repeated | Unified session contexts for both object and container operations. Multiple contexts allow authorization for different combinations. Maximum number of contexts: 16. |

session/types.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ message SessionTokenV2 {
352352
uint32 nonce = 2 [json_name = "nonce"];
353353

354354
// Account that issued this token (who signed it).
355-
Target issuer = 3 [json_name = "issuer"];
355+
neo.fs.v2.refs.OwnerID issuer = 3 [json_name = "issuer"];
356356

357357
// Accounts authorized by this token (who can use it).
358358
// Maximum number of subjects: 8.

0 commit comments

Comments
 (0)