diff --git a/BUILD/mdbci/copy_repos.sh b/BUILD/mdbci/copy_repos.sh index fd9503c92..d791953b9 100755 --- a/BUILD/mdbci/copy_repos.sh +++ b/BUILD/mdbci/copy_repos.sh @@ -8,10 +8,7 @@ if [ "$box_type" == "RPM" ] ; then # Build can be executed to check if it is possible to build # and to run install and upgrade tests # with thre real RHEL, but we use CentOS packages for production - if [[ "$platform" != "rhel" || ( "$platform" == "rhel" && "$platform_version" == "8" ) ]]; then - if [[ "$platform" == "rhel" && "$platform_version" == "8" ]]; then - export platform="centos" - fi + if [[ "$platform" != "rhel" ]]; then export arch=`ssh $sshopt "arch"` . ${script_dir}/generate_build_info_path.sh diff --git a/include/maxscale/modinfo.h b/include/maxscale/modinfo.h index 26edda9d0..7b2860aef 100644 --- a/include/maxscale/modinfo.h +++ b/include/maxscale/modinfo.h @@ -80,6 +80,7 @@ enum mxs_module_param_type MXS_MODULE_PARAM_BOOL, /**< Boolean value */ MXS_MODULE_PARAM_STRING, /**< String value */ MXS_MODULE_PARAM_QUOTEDSTRING, /**< String enclosed in '"':s */ + MXS_MODULE_PARAM_PASSWORD, /**< Password value that is masked in all output */ MXS_MODULE_PARAM_ENUM, /**< Enumeration of string values */ MXS_MODULE_PARAM_PATH, /**< Path to a file or a directory */ MXS_MODULE_PARAM_SERVICE, /**< Service name */ @@ -245,6 +246,9 @@ static inline const char* mxs_module_param_type_to_string(enum mxs_module_param_ case MXS_MODULE_PARAM_STRING: return "string"; + case MXS_MODULE_PARAM_PASSWORD: + return "password string"; + case MXS_MODULE_PARAM_QUOTEDSTRING: return "quoted string"; diff --git a/maxctrl/test/createdestroy.js b/maxctrl/test/createdestroy.js index 8fcafc622..35ea842eb 100644 --- a/maxctrl/test/createdestroy.js +++ b/maxctrl/test/createdestroy.js @@ -63,7 +63,7 @@ describe("Create/Destroy Commands", function() { res.data.relationships.servers.data.length.should.equal(1) res.data.relationships.servers.data[0].id.should.equal("server4") res.data.attributes.parameters.user.should.equal("maxuser") - res.data.attributes.parameters.password.should.equal("maxpwd") + res.data.attributes.parameters.password.should.equal("*****") }) }) diff --git a/server/core/config.cc b/server/core/config.cc index b5b503670..e2f773e36 100644 --- a/server/core/config.cc +++ b/server/core/config.cc @@ -317,7 +317,7 @@ const MXS_MODULE_PARAM config_service_params[] = }, { CN_PASSWORD, // Not mandatory due to RCAP_TYPE_NO_AUTH - MXS_MODULE_PARAM_STRING + MXS_MODULE_PARAM_PASSWORD }, { CN_ENABLE_ROOT_USER, @@ -515,7 +515,7 @@ const MXS_MODULE_PARAM config_monitor_params[] = }, { CN_PASSWORD, - MXS_MODULE_PARAM_STRING, + MXS_MODULE_PARAM_PASSWORD, NULL, MXS_MODULE_OPT_REQUIRED }, @@ -644,7 +644,7 @@ const MXS_MODULE_PARAM config_server_params[] = }, { CN_MONITORPW, - MXS_MODULE_PARAM_STRING + MXS_MODULE_PARAM_PASSWORD }, { CN_PERSISTPOOLMAX, @@ -3145,6 +3145,9 @@ const char* param_type_to_str(const MXS_MODULE_PARAM* params, const char* name) case MXS_MODULE_PARAM_STRING: return "a string"; + case MXS_MODULE_PARAM_PASSWORD: + return "a password string"; + case MXS_MODULE_PARAM_QUOTEDSTRING: return "a quoted string"; @@ -3791,6 +3794,10 @@ json_t* param_value_to_json(const MXS_MODULE_PARAM* param_info, const string& na rval = json_boolean(config_truth_value(value.c_str())); break; + case MXS_MODULE_PARAM_PASSWORD: + rval = json_string("*****"); + break; + default: rval = json_string(value.c_str()); break; @@ -4468,6 +4475,7 @@ bool config_param_is_valid(const MXS_MODULE_PARAM* params, break; case MXS_MODULE_PARAM_STRING: + case MXS_MODULE_PARAM_PASSWORD: if (*value) { valid = true; diff --git a/server/modules/monitor/mariadbmon/mariadbmon.cc b/server/modules/monitor/mariadbmon/mariadbmon.cc index e976eef03..d7f0c85ec 100644 --- a/server/modules/monitor/mariadbmon/mariadbmon.cc +++ b/server/modules/monitor/mariadbmon/mariadbmon.cc @@ -1015,7 +1015,7 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE() CN_REPLICATION_USER, MXS_MODULE_PARAM_STRING }, { - CN_REPLICATION_PASSWORD, MXS_MODULE_PARAM_STRING + CN_REPLICATION_PASSWORD, MXS_MODULE_PARAM_PASSWORD }, { CN_REPLICATION_MASTER_SSL, MXS_MODULE_PARAM_BOOL, "false"