diff options
| author | mpereskokova <[email protected]> | 2023-09-20 08:37:57 +0300 |
|---|---|---|
| committer | mpereskokova <[email protected]> | 2023-09-20 08:51:52 +0300 |
| commit | dd4ce1488ef6663aafaeb9f7f59f5ba860dc4624 (patch) | |
| tree | fdb5e20760c6d5d1080d23fb303c394c575fbd6e /yt/cpp/mapreduce/client/file_reader.cpp | |
| parent | 9dfead37c3b0ec561c8474a5fe5e27aa9a7605b0 (diff) | |
YT-19885: Send impersonation in all requests when it exists
Diffstat (limited to 'yt/cpp/mapreduce/client/file_reader.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/client/file_reader.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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<TFormat>()); // 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<TFormat>()); // Binary format |
