add host additional info filters#28
add host additional info filters#28zwass merged 3 commits intofleetdm:masterfrom billcobbler:add-host-additional-info-filters
Conversation
zwass
left a comment
There was a problem hiding this comment.
Thank you for adding the SQLi fix!
I think the implementation is ready to merge. Before we do that can you please add a test in https://github.com/fleetdm/fleet/blob/master/server/datastore/datastore_hosts_test.go?
| low, high := d.getLimitOffsetSliceBounds(opt.ListOptions, len(hosts)) | ||
| hosts = hosts[low:high] | ||
|
|
||
| // Filter additional info |
There was a problem hiding this comment.
In the future please feel free not to implement anything in inmem. It's been mostly removed from use and I need to finish tearing it out.
There was a problem hiding this comment.
Added tests, but did you also want me to remove this inmem implementation?
There was a problem hiding this comment.
No need for that. I'll be removing all of this soon in any case.
zwass
left a comment
There was a problem hiding this comment.
Looks great! Thank you for adding the test. I also tested manually in my local Fleet install and it worked as documented.
| low, high := d.getLimitOffsetSliceBounds(opt.ListOptions, len(hosts)) | ||
| hosts = hosts[low:high] | ||
|
|
||
| // Filter additional info |
There was a problem hiding this comment.
No need for that. I'll be removing all of this soon in any case.
|
This resolves kolide/fleet#2329. |
Use permissive file permissions to allow mounting files into Wix Docker container. Fixes #1424
This change adds the ability to filter additional host info via the list hosts endpoint; a continuation from here, but now filtering is accomplished via SQL.
Additional object without filter:
Additional object with filter: