You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-1175: add ability to encrypt CEJ password and use in Columnstore.xml (#2045)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
|
||||
include_directories( ${ENGINE_COMMON_INCLUDES} )
|
||||
include_directories( ${ENGINE_COMMON_INCLUDES} ${ENGINE_SRC_DIR}/tools/passwd)
|
||||
|
||||
|
||||
########### next target ###############
|
||||
@ -55,7 +55,8 @@ set(joblist_LIB_SRCS
|
||||
tupleunion.cpp
|
||||
unique32generator.cpp
|
||||
virtualtable.cpp
|
||||
windowfunctionstep.cpp)
|
||||
windowfunctionstep.cpp
|
||||
${ENGINE_SRC_DIR}/tools/passwd/secrets.cpp)
|
||||
|
||||
add_library(joblist SHARED ${joblist_LIB_SRCS})
|
||||
|
||||
|
@ -37,6 +37,7 @@ using namespace boost;
|
||||
#include "jl_logger.h"
|
||||
#include "cgroupconfigurator.h"
|
||||
#include "liboamcpp.h"
|
||||
#include "secrets.h"
|
||||
|
||||
using namespace config;
|
||||
|
||||
@ -266,6 +267,11 @@ ResourceManager::ResourceManager(bool runningInExeMgr) :
|
||||
fAllowedDiskAggregation = getBoolVal(fRowAggregationStr,
|
||||
"AllowDiskBasedAggregation",
|
||||
defaultAllowDiskAggregation);
|
||||
if (!load_encryption_keys())
|
||||
{
|
||||
Logger log;
|
||||
log.logMessage(logging::LOG_TYPE_ERROR, "Error loading CEJ password encryption keys");
|
||||
}
|
||||
}
|
||||
|
||||
int ResourceManager::getEmPriority() const
|
||||
@ -381,7 +387,9 @@ bool ResourceManager::getMysqldInfo(
|
||||
// MCS will read username and pass from disk if the config changed.
|
||||
bool reReadConfig = true;
|
||||
u = getStringVal("CrossEngineSupport", "User", hostUserUnassignedValue, reReadConfig);
|
||||
w = getStringVal("CrossEngineSupport", "Password", "", reReadConfig);
|
||||
std::string encryptedPW = getStringVal("CrossEngineSupport", "Password", "", reReadConfig);
|
||||
//This will return back the plaintext password if there is no MCSDATADIR/.secrets file present
|
||||
w = decrypt_password(encryptedPW);
|
||||
// MCS will not read username and pass from disk if the config changed.
|
||||
h = getStringVal("CrossEngineSupport", "Host", hostUserUnassignedValue);
|
||||
p = getUintVal("CrossEngineSupport", "Port", 0);
|
||||
|
Reference in New Issue
Block a user