From b1fca685a9631344875e53efab24c34f476d9752 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 10 Jan 2022 15:26:42 +0300 Subject: [PATCH] [#82] session: Add network magic to `RequestMetaHeader` To prevent theoretical cross-network replay attack, we need to have network magic in NeoFS requests. Add `magic_number` numeric field to `session.RequestMetaHeader` message. Signed-off-by: Leonard Lyubich --- session/types.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/session/types.proto b/session/types.proto index 256293d..4eff307 100644 --- a/session/types.proto +++ b/session/types.proto @@ -167,6 +167,10 @@ message RequestMetaHeader { // `RequestMetaHeader` of the origin request RequestMetaHeader origin = 7 [json_name = "origin"]; + + // NeoFS network magic. Must match the value for the network + // that the server belongs to. + uint64 magic_number = 8 [json_name = "magicNumber"]; } // Information about the response