Closed lucasmrod closed 2 days ago
Thanks for tracking and putting some work into a POC @lucasmrod!
My gut says we should try to move quickly to get the true fix in: a better users
table.
If this is moving too slowly then I think we should add a new local_users
table: https://github.com/fleetdm/fleet/issues/18343#issuecomment-2117694007
The overrides feels more like a bandaid solution.
What do you think?
The overrides feels more like a bandaid solution.
I agree! Though the bandaid has helped customers in several situations (with non-performing detail queries). This issue makes the bandaid a bit more helpful.
Happy to close if we can wait for osquery or add a fleetd solution for the specific case of the users
detail query.
Hey @lucasmrod I think let's go w/ the osquery or fleetd solution (depending on outcome of osquery office hours).
Gotcha. Happy to close if we don't yet see a need for this.
Custom queries flow, Windows, Linux, or Mac, Flexibility grows.
Problem
Currently, users can override (or disable) the
users
query usingfeatures.detail_query_overrides
(seeusers:
below): https://github.com/fleetdm/fleet/blob/162c9f05951ae700cc03c17f5c16f26b9252cff2/docs/Configuration/configuration-files/README.md?plain=1#L571-L590Users have no way disable or change the query for a specific platform only only (e.g. https://github.com/fleetdm/fleet/issues/18343, so that I could disable the query for linux hosts only).
Potential solutions
A quick fix is for Fleet to define three queries:
users_linux
,users_macos
andusers_windows
(which all be the hardcoded to be the same SQL query) instead of the current oneusers
. This way a user can override or disable theusers
query for a specific platform only:PoC branch: https://github.com/fleetdm/fleet/compare/19108-poc-changes
PS: A more involved solution is to allow
overrides
per platforms for thefeatures
key in the yaml, but that's maybe a broader request.