Zane Alumbaugh
03/06/2024, 5:48 PM.ext
binary). We have successfully managed to get the plugins to communicate with osqueryd
using extensions_require
and not specifying the extensions_autoload
flag.
However, we have noticed that before osqueryd
sets up the scheduler, it still waits the extensions_timeout
interval and then prints that it was unable to load the required extension (however, it does not crash because it was registered via connection to the socket from our process). Is there a way to disable the autoload behavior and only attempt to connect the plugins from the extension manager creation?seph
seph
extensions_require
option is how you tell osquery to wait for an extension to load. It says nothing about where the extension should be loaded from, It pauses startup for that extension to load.
This is critical if you need some extension for config/logs/enrollment. You’d need to pause osquery for the extension to load.
This is especially true if you have an external daemon trying to register extensions over the socketZane Alumbaugh
03/07/2024, 5:27 PM--extensions_require=logger_plugin_id
• --extensions_timeout=20
• --extensions_interval=2
• --logger_plugin=logger_plugin_id
Status logs soon after startup:
Extension manager service starting: /var/osquery/osquery.em
Registering extension (plugin_manager_id, 39582, version=, sdk=)
Extension 39582 registered logger plugin logger_plugin_id
Zane Alumbaugh
03/07/2024, 5:28 PMextensions_timeout
time, we see the following message:
Required extension not found or not loaded: logger_plugin_id
Zane Alumbaugh
03/07/2024, 5:29 PMosquery
continues to initialize after that point instead of crashing and runs scheduled queries and everything as expected.Zane Alumbaugh
03/07/2024, 5:48 PMosquery
manually and then immediately attempts to register the extensions which appears to be successful based on the log output above.seph
seph
Zane Alumbaugh
03/07/2024, 7:43 PMseph
seph
Zane Alumbaugh
03/07/2024, 7:49 PMseph
seph