[security] Don't print token (#30227)

This commit is contained in:
ZhangJian He
2024-01-23 17:07:32 +08:00
committed by yiguolei
parent b98acf2d90
commit 72f4e7e2d1
2 changed files with 2 additions and 3 deletions

View File

@ -200,8 +200,7 @@ Status HeartbeatServer::_heartbeat(const TMasterInfo& master_info) {
_master_info->__set_token(master_info.token);
LOG(INFO) << "get token. token: " << _master_info->token;
} else if (_master_info->token != master_info.token) {
return Status::InternalError("invalid token. local_token: {}, token: {}",
_master_info->token, master_info.token);
return Status::InternalError("invalid token");
}
}

View File

@ -1151,7 +1151,7 @@ public class Env {
clusterId = storage.getClusterID();
if (storage.getToken() == null) {
token = Strings.isNullOrEmpty(Config.auth_token) ? Storage.newToken() : Config.auth_token;
LOG.info("new token={}", token);
LOG.info("refresh new token");
storage.setToken(token);
storage.writeClusterIdAndToken();
} else {