From 0f7cd43cc6d1bf3cb9e42dacf3cb8117148f07d4 Mon Sep 17 00:00:00 2001 From: Andrey Butusov Date: Thu, 11 Dec 2025 16:57:05 +0300 Subject: [PATCH] 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 --- proto-docs/session.md | 2 +- session/types.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proto-docs/session.md b/proto-docs/session.md index 70ed0fa7..7e844b0c 100644 --- a/proto-docs/session.md +++ b/proto-docs/session.md @@ -317,7 +317,7 @@ Session Token body. | ----- | ---- | ----- | ----------- | | version | [uint32](#uint32) | | Token version. | | nonce | [uint32](#uint32) | | Random nonce to prevent collisions. | -| issuer | [Target](#neo.fs.v2.session.Target) | | Account that issued this token (who signed it). | +| issuer | [neo.fs.v2.refs.OwnerID](#neo.fs.v2.refs.OwnerID) | | Account that issued this token (who signed it). | | subjects | [Target](#neo.fs.v2.session.Target) | repeated | Accounts authorized by this token (who can use it). Maximum number of subjects: 8. | | lifetime | [TokenLifetime](#neo.fs.v2.session.TokenLifetime) | | Lifetime of this token. | | 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. | diff --git a/session/types.proto b/session/types.proto index 18fe03cc..5f6d9b18 100644 --- a/session/types.proto +++ b/session/types.proto @@ -352,7 +352,7 @@ message SessionTokenV2 { uint32 nonce = 2 [json_name = "nonce"]; // Account that issued this token (who signed it). - Target issuer = 3 [json_name = "issuer"]; + neo.fs.v2.refs.OwnerID issuer = 3 [json_name = "issuer"]; // Accounts authorized by this token (who can use it). // Maximum number of subjects: 8.