From dd4ce1488ef6663aafaeb9f7f59f5ba860dc4624 Mon Sep 17 00:00:00 2001 From: mpereskokova Date: Wed, 20 Sep 2023 08:37:57 +0300 Subject: YT-19885: Send impersonation in all requests when it exists --- yt/cpp/mapreduce/client/file_reader.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'yt/cpp/mapreduce/client/file_reader.cpp') diff --git a/yt/cpp/mapreduce/client/file_reader.cpp b/yt/cpp/mapreduce/client/file_reader.cpp index fc21e0bc02d..35b21336514 100644 --- a/yt/cpp/mapreduce/client/file_reader.cpp +++ b/yt/cpp/mapreduce/client/file_reader.cpp @@ -144,6 +144,11 @@ NHttpClient::IHttpResponsePtr TFileReader::Request(const TClientContext& context } else { header.SetToken(context.Token); } + + if (context.ImpersonationUser) { + header.SetImpersonationUser(*context.ImpersonationUser); + } + header.AddTransactionId(transactionId); header.SetOutputFormat(TMaybe()); // Binary format @@ -198,6 +203,11 @@ NHttpClient::IHttpResponsePtr TBlobTableReader::Request(const TClientContext& co } else { header.SetToken(context.Token); } + + if (context.ImpersonationUser) { + header.SetImpersonationUser(*context.ImpersonationUser); + } + header.AddTransactionId(transactionId); header.SetOutputFormat(TMaybe()); // Binary format -- cgit v1.3