Allow TLS to proceed without node key if enrollment disabled

This commit is contained in:
Zachary Wasserman 2016-04-07 08:47:03 -07:00 committed by Teddy Reed
parent 8207feecd1
commit 8cb862e327

View File

@ -134,8 +134,9 @@ Status TLSLoggerPlugin::logStatus(const std::vector<StatusLogLine>& log) {
Status TLSLoggerPlugin::init(const std::string& name, Status TLSLoggerPlugin::init(const std::string& name,
const std::vector<StatusLogLine>& log) { const std::vector<StatusLogLine>& log) {
auto node_key = getNodeKey("tls"); auto node_key = getNodeKey("tls");
if (node_key.size() == 0) { if (!FLAGS_disable_enrollment && node_key.size() == 0) {
// Could not generate an enrollment key, continue logging to stderr. // Could not generate a node key, continue logging to stderr.
LOG(WARNING) << "No node key, TLS logging disabled.";
FLAGS_logtostderr = true; FLAGS_logtostderr = true;
} else { } else {
// Start the log forwarding/flushing thread. // Start the log forwarding/flushing thread.