mirror of https://github.com/apache/cloudstack.git
Bug 12047 - OVM Host Agent Username and Password are being logged in the management Server Log
status 12047: resolved fixed
This commit is contained in:
parent
aa9324855e
commit
e9b1c5f9c3
|
|
@ -62,7 +62,12 @@ public class Connection {
|
|||
return callTimeoutInSec(method, params, 600);
|
||||
}
|
||||
|
||||
public Object callTimeoutInSec(String method, Object[] params, int timeout) throws XmlRpcException {
|
||||
public Object call(String method, Object[] params, boolean debug) throws XmlRpcException {
|
||||
/* default timeout is 10 mins */
|
||||
return callTimeoutInSec(method, params, 600, debug);
|
||||
}
|
||||
|
||||
public Object callTimeoutInSec(String method, Object[] params, int timeout, boolean debug) throws XmlRpcException {
|
||||
TimingOutCallback callback = new TimingOutCallback(timeout * 1000);
|
||||
Object[] mParams = new Object[params.length + 1];
|
||||
mParams[0] = method;
|
||||
|
|
@ -70,7 +75,13 @@ public class Connection {
|
|||
mParams[i+1] = params[i];
|
||||
}
|
||||
|
||||
s_logger.debug("Call Ovm agent: " + Coder.toJson(mParams));
|
||||
if (debug) {
|
||||
/*
|
||||
* some parameters including user password should not be printed in log
|
||||
*/
|
||||
s_logger.debug("Call Ovm agent: " + Coder.toJson(mParams));
|
||||
}
|
||||
|
||||
long startTime = System.currentTimeMillis();
|
||||
_client.executeAsync("OvmDispatch", mParams, callback);
|
||||
try {
|
||||
|
|
@ -86,6 +97,10 @@ public class Connection {
|
|||
}
|
||||
}
|
||||
|
||||
public Object callTimeoutInSec(String method, Object[] params, int timeout) throws XmlRpcException {
|
||||
return callTimeoutInSec(method, params, timeout, true);
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return _ip;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class OvmHost extends OvmObject {
|
|||
|
||||
public static void registerAsMaster(Connection c) throws XmlRpcException {
|
||||
Object[] params = {c.getIp(), c.getUserName(), c.getPassword(), c.getPort(), c.getIsSsl()};
|
||||
c.call("OvmHost.registerAsMaster", params);
|
||||
c.call("OvmHost.registerAsMaster", params, false);
|
||||
}
|
||||
|
||||
public static void registerAsVmServer(Connection c) throws XmlRpcException {
|
||||
|
|
|
|||
Loading…
Reference in New Issue