mirror of https://github.com/milvus-io/milvus.git
Init storage config's SSL and IAM config (#20082)
Signed-off-by: xige-16 <xi.ge@zilliz.com> Signed-off-by: xige-16 <xi.ge@zilliz.com>pull/20097/head
parent
5378e03372
commit
89a9b6fda0
|
@ -31,6 +31,8 @@ NewLoadIndexInfo(CLoadIndexInfo* c_load_index_info, CStorageConfig c_storage_con
|
|||
storage_config.remote_root_path = std::string(c_storage_config.remote_root_path);
|
||||
storage_config.storage_type = std::string(c_storage_config.storage_type);
|
||||
storage_config.iam_endpoint = std::string(c_storage_config.iam_endpoint);
|
||||
storage_config.useSSL = c_storage_config.useSSL;
|
||||
storage_config.useIAM = c_storage_config.useIAM;
|
||||
|
||||
*c_load_index_info = load_index_info.release();
|
||||
auto status = CStatus();
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#include <aws/s3/model/GetObjectRequest.h>
|
||||
#include <aws/s3/model/PutObjectRequest.h>
|
||||
|
||||
#include "MinioChunkManager.h"
|
||||
|
||||
#include "storage/MinioChunkManager.h"
|
||||
#include "exceptions/EasyAssert.h"
|
||||
#include "log/Log.h"
|
||||
|
||||
#define THROWS3ERROR(FUNCTION) \
|
||||
|
@ -94,6 +94,9 @@ MinioChunkManager::MinioChunkManager(const StorageConfig& storage_config)
|
|||
<< " access_key:" << provider->GetAWSCredentials().GetAWSSecretKey()
|
||||
<< " token:" << provider->GetAWSCredentials().GetSessionToken() << "}";
|
||||
} else {
|
||||
AssertInfo(!storage_config.access_key_id.empty(), "if not use iam, access key should not be empty");
|
||||
AssertInfo(!storage_config.access_key_value.empty(), "if not use iam, access value should not be empty");
|
||||
|
||||
client_ = std::make_shared<Aws::S3::S3Client>(
|
||||
Aws::Auth::AWSCredentials(ConvertToAwsString(storage_config.access_key_id),
|
||||
ConvertToAwsString(storage_config.access_key_value)),
|
||||
|
|
Loading…
Reference in New Issue