[#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 <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-01-10 15:26:42 +03:00 committed by LeL
parent 848b96ede0
commit b1fca685a9

View file

@ -167,6 +167,10 @@ message RequestMetaHeader {
// `RequestMetaHeader` of the origin request // `RequestMetaHeader` of the origin request
RequestMetaHeader origin = 7 [json_name = "origin"]; 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 // Information about the response