Commit Graph

18 Commits

Author SHA1 Message Date
Victor Lyuboslavsky
0e040cc7b0
fleetctl now runs saved queries (#15667)
📺 Looom:
https://www.loom.com/share/1aec4616fa4449e7abac579084aef0ba?sid=0884f742-feb3-48bb-82dc-b7834bc9a6e1

Fixed fleetctl issue where it was creating a new query when running a
query by name, as opposed to using the existing saved query.
#15630

API change will be in a separate PR:
https://github.com/fleetdm/fleet/pull/15673

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-12-15 12:55:39 -06:00
Zach Wasserman
083b781c2c
Send custom headers for live queries (#8991)
This needed to be set specifically for the live query websocket dialer,
since that doesn't use the HTTP client that the rest of the API client
methods use.

Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2022-12-12 07:56:35 -08:00
Martin Angers
b3fc0cd844
Unversion the /setup endpoint, version the websocket endpoint (#5104) 2022-04-20 15:57:26 -04:00
Michal Nicpon
9f981f9e49
fleetctl query improve error message (#5141) 2022-04-20 11:35:46 -06:00
Martin Angers
90b15071a4
Introduce API version 2022-04, deprecate use of /global in paths (#4731) 2022-04-05 11:35:53 -04:00
Tomas Touceda
a18e09b613
Simplify fleetctl implementation and improve testing (#3830)
* Simplify fleetctl implementation and improve testing

* Add a few more

* Handle not founds better

* Fix tests

* Check that logout ds func is called
2022-01-24 16:40:51 -03:00
Martin Angers
69a4985cac
Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
keepwn
b42d213689
Support close the websocket of LiveQueryResultsHandler (#1006)
* Support close `LiveQueryResultsHandler`

* Start adding test

* Make LiveQuery exit when the context is Done

* Fix lint and remove debug print

* Update server/service/client_live_query.go

Co-authored-by: Zach Wasserman <zach@fleetdm.com>

* Revert "Update server/service/client_live_query.go"

This reverts commit be67ca1512fe502503e821393c2b9e84f5e6e82e.

Co-authored-by: Tomas Touceda <chiiph@gmail.com>
Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2021-09-10 16:26:39 -03:00
Zach Wasserman
c5280c0517
Add v4 suffix in go.mod (#1224) 2021-06-25 21:46:51 -07:00
Zach Wasserman
fb32f0cf40
Remove kolide types and packages from backend (#974)
Generally renamed `kolide` -> `fleet`
2021-06-06 15:07:29 -07:00
Zach Wasserman
cebd4df0f5
Update live query and targets APIs for Teams (#876)
- Take query_id in live query and target APIs.
- Use query_id to determine observer targets.
- Update documentation.
2021-05-26 20:45:06 -07:00
Zach Wasserman
7a68e3de65
Deprecate /api/v1/kolide routes (#297)
- Support both /api/v1/fleet and /api/v1/kolide routes in server.
- Add logging for use of deprecated routes.
- Rename routes in frontend JS.
- Rename routes and add notes in documentation.
2021-02-10 12:13:11 -08:00
Mike Arpaia
af96e52a00
Update the Go import paths to new repo name (#27) 2020-11-11 09:59:12 -08:00
Zachary Wasserman
e452cc6a8a
Add file carving support (#15)
- Add endpoints for osquery to register and continue a carve.
- Implement client functionality for retrieving carve details and contents in fleetctl.
- Add documentation on using file carving with Fleet.

Addresses kolide/fleet#1714
2020-11-04 20:45:16 -08:00
Zachary Wasserman
adf87140a7
Add ability to prefix Fleet URLs (#2112)
- Add the server_url_prefix flag for configuring this functionality
- Add prefix handling to the server routes
- Refactor JS to use appropriate paths from modules
- Use JS template to get URL prefix into JS environment
- Update webpack config to support prefixing

Thanks to securityonion.net for sponsoring the development of this feature.

Closes #1661
2019-10-16 16:40:45 -07:00
Zachary Wasserman
03c23973ca
Small cleanup in live query code (#2011)
- Additional comments
- Fix some cases where websocket may not be closed appropriately
2019-03-10 13:51:11 -07:00
Thordur Bjornsson
71217e6c52 server/service, livequery: Check totals Load for nil (#1802)
Matches status, if there are no results (yet) this bombs as the
the interface value is nil.
2018-06-04 09:40:41 -06:00
Zachary Wasserman
b80e0a102d
Add fleetctl query command (#1784)
Allow queries targeted by hostname and label name.
2018-05-17 15:54:34 -07:00