This commit is contained in:
MikhailBurdukov 2024-10-30 09:27:50 +00:00
parent 961fb88901
commit c9810bbea0
3 changed files with 6 additions and 3 deletions

View File

@ -121,6 +121,7 @@ S3AuthSettings::S3AuthSettings(
S3AuthSettings::S3AuthSettings(const S3AuthSettings & settings)
: headers(settings.headers)
, access_headers(settings.access_headers)
, users(settings.users)
, server_side_encryption_kms_config(settings.server_side_encryption_kms_config)
, impl(std::make_unique<S3AuthSettingsImpl>(*settings.impl))
@ -129,6 +130,7 @@ S3AuthSettings::S3AuthSettings(const S3AuthSettings & settings)
S3AuthSettings::S3AuthSettings(S3AuthSettings && settings) noexcept
: headers(std::move(settings.headers))
, access_headers(std::move(settings.access_headers))
, users(std::move(settings.users))
, server_side_encryption_kms_config(std::move(settings.server_side_encryption_kms_config))
, impl(std::make_unique<S3AuthSettingsImpl>(std::move(*settings.impl)))
@ -147,6 +149,7 @@ S3AUTH_SETTINGS_SUPPORTED_TYPES(S3AuthSettings, IMPLEMENT_SETTING_SUBSCRIPT_OPER
S3AuthSettings & S3AuthSettings::operator=(S3AuthSettings && settings) noexcept
{
headers = std::move(settings.headers);
access_headers = std::move(settings.access_headers);
users = std::move(settings.users);
server_side_encryption_kms_config = std::move(settings.server_side_encryption_kms_config);
*impl = std::move(*settings.impl);
@ -202,7 +205,7 @@ void S3AuthSettings::updateIfChanged(const S3AuthSettings & settings)
headers = settings.headers;
if (!settings.access_headers.empty())
access_headers = settings.access_headers;
access_headers = settings.access_headers;
if (!settings.users.empty())
users.insert(settings.users.begin(), settings.users.end());

View File

@ -69,7 +69,7 @@ struct ProxyConfigurationResolver;
namespace S3
{
HTTPHeaderEntries getHTTPHeaders(const std::string & config_elem, const Poco::Util::AbstractConfiguration & config);
HTTPHeaderEntries getHTTPHeaders(const std::string & config_elem, const Poco::Util::AbstractConfiguration & config, std::string header_key = "header");
ServerSideEncryptionKMSConfig getSSEKMSConfig(const std::string & config_elem, const Poco::Util::AbstractConfiguration & config);
}

View File

@ -5,4 +5,4 @@
<access_header>custom-auth-token: ValidToken1234</access_header>
</s3_mock>
</s3>
</clickhouse>
</clickhouse>