diff --git a/openframe/openframe_token_refresher.cpp b/openframe/openframe_token_refresher.cpp index 8adb9265c8c..6e3cf8def86 100644 --- a/openframe/openframe_token_refresher.cpp +++ b/openframe/openframe_token_refresher.cpp @@ -47,8 +47,6 @@ void OpenframeTokenRefresher::stop() { } void OpenframeTokenRefresher::process() { - LOG(INFO) << "Starting token refresh process..."; - try { auto new_token = extractor_->extractToken(); if (new_token.empty()) { @@ -60,11 +58,8 @@ void OpenframeTokenRefresher::process() { auto current_token = auth_manager.getToken(); if (new_token != current_token) { - LOG(INFO) << "Token has changed, updating authorization manager"; auth_manager.updateToken(new_token); - LOG(INFO) << "Token successfully updated"; - } else { - LOG(INFO) << "Token is up to date, no update needed"; + LOG(INFO) << "Openframe token refreshed"; } } catch (const std::exception& e) { LOG(ERROR) << "Error during token refresh: " << e.what(); diff --git a/osquery/core/init.cpp b/osquery/core/init.cpp index 319f23af340..cf23330851a 100644 --- a/osquery/core/init.cpp +++ b/osquery/core/init.cpp @@ -218,18 +218,15 @@ void initOpenFrame() { } try { - // Create encryption service + // Create openframe token services auto encryption_service = std::make_shared(FLAGS_openframe_secret); - - // Create token extractor with encryption service auto token_extractor = std::make_shared(encryption_service, FLAGS_openframe_token_path); - // Get initial token and set it in authorization manager auto initial_token = token_extractor->extractToken(); if (!initial_token.empty()) { auto& auth_manager = OpenframeAuthorizationManagerProvider::getInstance(); auth_manager.updateToken(initial_token); - VLOG(1) << "Initial OpenFrame token set from token file"; + LOG(INFO) << "OpenFrame token extracted successfully"; } else { LOG(ERROR) << "Failed to get initial token from token file"; } @@ -237,7 +234,6 @@ void initOpenFrame() { // Create and start token refresher static auto token_refresher = std::make_shared(token_extractor); token_refresher->start(); - VLOG(1) << "OpenFrame token refresher started"; } catch (const std::exception& e) { LOG(ERROR) << "Failed to initialize OpenFrame components: " << e.what(); } diff --git a/osquery/remote/transports/tls.cpp b/osquery/remote/transports/tls.cpp index aabb935fe16..e10ee3ac9ac 100644 --- a/osquery/remote/transports/tls.cpp +++ b/osquery/remote/transports/tls.cpp @@ -98,14 +98,10 @@ void TLSTransport::decorateRequest(http::Request& r) { r << http::Request::Header("User-Agent", kTLSUserAgentBase + kVersion); if (FLAGS_openframe_mode) { - LOG(INFO) << "Adding Authorization header with Bearer token for openframe mode"; auto& auth_manager = OpenframeAuthorizationManagerProvider::getInstance(); std::string token = auth_manager.getToken(); if (!token.empty()) { r << http::Request::Header("Authorization", "Bearer " + token); - LOG(INFO) << "Token added to request"; - } else { - LOG(ERROR) << "No token found in memory"; } } } @@ -116,7 +112,6 @@ http::Client::Options TLSTransport::getOptions() { options.follow_redirects(true).timeout(16); if (FLAGS_openframe_mode) { - LOG(INFO) << "Disable SSL verification for openframe mode"; options.always_verify_peer(false); return options; } diff --git a/osquery/remote/utility.h b/osquery/remote/utility.h index 1b5a89cbc86..225f2da76bb 100644 --- a/osquery/remote/utility.h +++ b/osquery/remote/utility.h @@ -58,7 +58,6 @@ class TLSRequestHelper : private boost::noncopyable { // Add the prefix "/tools/agent/fleetmdm-server" to all requests only if openframe mode is enabled if (FLAGS_openframe_mode) { - LOG(INFO) << "Adding /tools/agent/fleetmdm-server to URI for openframe mode"; uri += "/tools/agent/fleetmdm-server"; } diff --git a/plugins/remote/enroll/tls_enroll.cpp b/plugins/remote/enroll/tls_enroll.cpp index ea798535e76..57c4f3e888a 100644 --- a/plugins/remote/enroll/tls_enroll.cpp +++ b/plugins/remote/enroll/tls_enroll.cpp @@ -76,7 +76,6 @@ std::string TLSEnrollPlugin::enroll() { // Add the prefix "/tools/agent/fleetmdm-server" to all requests only if openframe mode is enabled if (FLAGS_openframe_mode) { - LOG(INFO) << "Adding /tools/agent/fleetmdm-server to URI for openframe mode"; uri += "/tools/agent/fleetmdm-server"; }