Commit Graph
1226 Commits
Author SHA1 Message Date
James Alseth e88ea5dca5 Fix typo in logging_disable_banner docs (#2289) 2020-09-09 13:32:13 -07:00
billcobblerandBrendan Shaklovitz 20328b0f87 Add stdout and kinesis logger plugins and sts assume role to Firehose (#2282)
Co-authored-by: Brendan Shaklovitz <nyanshak@users.noreply.github.com>
2020-08-19 14:56:44 -07:00
James Alseth b67cfc479b Fix string(int) issues for Go 1.15 compatibility (#2286) 2020-08-19 13:36:36 -07:00
seph c2d8dccb8d Remove old package stuff (#2284)
Remove references to the long unused dl.kolide.co distribution site.
2020-08-11 18:14:59 -07:00
Brendan Shaklovitz 0cf47bf233 Fix fleetctl get options typo (#2281)
Fixes issue where `fleetctl get options` returns `option` (singular)
as `kind` instead of `options` (plural). This would cause `fleetctl
apply -f options.yml` to fail on options yaml generated by `fleetctl get
options` with this error: `unknown kind "option"`.
2020-08-07 15:28:24 -07:00
Zachary Wasserman 09632fb1ed Add note about downtime during database migrations (#2279)
This should help clarify that migrations should be run with server
instances stopped.
2020-08-06 17:16:23 -07:00
Zachary Wasserman c6ce648fef Update changelog for 3.1.0 release (#2278) 2020-08-06 16:50:34 -07:00
Zachary Wasserman 81c72b286c Fix URL Prefix for Edit Pack button (#2277)
Fixes #2275
2020-08-06 16:29:24 -07:00
Zachary Wasserman 34c4ce4ffb Fix parsing of integer label_type in yaml (#2276)
Fixes #2273
2020-08-06 16:07:13 -07:00
Zachary Wasserman 0619581b03 Print single secret value if name specified (#2274)
Closes #2272
2020-08-03 11:51:29 -07:00
Stephan Miehe 2ad5205a4b Add support for conn_max_lifetime (#2270)
This adds support to configure MySQL conn_max_lifetime.
2020-07-30 09:00:42 -07:00
Stephan Miehe cf4d8ecfee Add redis database number support (#2269)
Fixes #2268
2020-07-30 08:57:25 -07:00
Zachary Wasserman 0058d45902 Update go.sum (#2267) 2020-07-23 09:27:49 -07:00
Zachary Wasserman af5fefa564 Changelog for 3.0.0 release (#2266) 2020-07-22 19:56:01 -07:00
Zachary Wasserman 1058f57767 Remove noisy User log (#2265)
This log appears to add little value as it is generated by almost any
web UI request.
2020-07-22 09:49:34 -07:00
Zachary Wasserman 2bfcecf0d3 Add CAdvisor container to dev docker-compose (#2263)
This container is useful for monitoring stats of other containers.
2020-07-21 15:36:11 -07:00
Zachary Wasserman 4023296d86 Log at debug level when configured (#2262)
We added debug/info log levels in #2225 but the configuration was not
actually used to set the level.
2020-07-21 15:35:57 -07:00
Zachary Wasserman 7494513400 Clean up and comments before merge. 2020-07-21 14:05:46 -07:00
Zachary Wasserman 96fc090723 Improve server performance for host operations
- Debounce frontend to reduce number of target searches in live query.
- More efficiently calculate label counts in live query and hosts
  dashboard. Instead of using the (slow) CountHostsInTargets function,
  retrieve the host counts while looking up the labels.
- Optimize targets search query. Removing the nested query retrieves the
  same logical result set, but substantially optimizes MySQL CPU usage.
  Testing indicates about a 50% reduction in MySQL CPU usage for the
  frontend targets search API call after applying this change.
2020-07-21 14:05:46 -07:00
Zachary Wasserman fcb8418b2f Add fleetctl get host capability to get single host with labels
Getting a single host with `fleetctl get host foobar` will look up the
host with the matching hostname, uuid, osquery identifier, or node key,
and provide the full host details along with the labels the host is a
member of.
2020-07-21 14:05:46 -07:00
Zachary Wasserman 7f757d3144 Extract functionName into helper
Cleans up some repetition in tests.
2020-07-21 14:05:46 -07:00
Zachary Wasserman 42bea2a144 Implement manual labels
"Manual" labels can be specified by hostname, allowing users to specify
the membership of a label without having to use a dynamic query. See the
included documentation.
2020-07-21 14:05:46 -07:00
Zachary Wasserman 608772917c Refactor label membership storage
Label membership is now stored in the label_membership table. This is
done in preparation for adding "manual" labels, as previously label
membership was associated directly with label query executions.

Label queries are now all executed at the same time, rather than on
separate intervals. This simplifies the calculation of which distributed
queries need to be run when a host checks in.
2020-07-21 14:05:46 -07:00
Zachary Wasserman b0595748f1 Implement pagination of hosts in the web UI
This commit takes advantage of the existing pagination APIs in the Fleet
server, and provides additional APIs to support pagination in the web
UI. Doing this dramatically reduces the response sizes for requests from
the UI, and limits the performance impact of UI clients on the Fleet and
MySQL servers.
2020-07-21 14:05:46 -07:00
Zachary Wasserman 0502412e15 Move live query operations from MySQL to Redis
This change optimizes live queries by pushing the computation of query
targets to the creation time of the query, and efficiently caching the
targets in Redis. This results in a huge performance improvement at both
steady-state, and when running live queries.

- Live queries are stored using a bitfield in Redis, and takes
advantage of bitfield operations to be extremely efficient.

- Only run Redis live query test when REDIS_TEST is set in environment

- Ensure that live queries are only sent to hosts when there is a client
listening for results. Addresses an existing issue in Fleet along with
appropriate cleanup for the refactored live query backend.
2020-07-21 14:05:46 -07:00
Zachary Wasserman ea93843203 Store only primary IP and MAC for hosts
Fleet used significant resources storing the full network interface
information for each host. This data was unused, except to get the
IP and MAC of the primary interface. With these changes, only those
pieces of data are stored.

- Calculate and store primary IP and MAC
- Remove transaction for storing full interfaces
- Update targets search to use new IP and MAC columns
- Update frontend to use new new columns
2020-07-21 14:05:46 -07:00
Zachary Wasserman b76b23e6ee Fix yaml separator handling with comments (#2257)
Fixes #2245
2020-07-08 16:01:03 -07:00
Zachary Wasserman fd61dcab67 Clean up unused DB tables, migrations, and code (#2258)
This PR removes unused types, code, DB tables, and associated migrations that are unused since Fleet 2.0.

An existing migration was refactored, and should remain compatible with both existing and new Fleet installations.
2020-07-08 13:02:18 -07:00
Zachary Wasserman def51ae930 Add Go Report Card badge to readme (#2259) 2020-07-07 15:45:49 -07:00
Zachary Wasserman 168e1f9007 Update table schema for osquery 4.4.0 (#2253)
Osquery schema JSON has changed, so parsing code has been updated

Closes #2232
2020-07-07 09:47:50 -07:00
Zachary Wasserman 2578466697 Upgrade SockJS JS and Go dependencies (#2256) 2020-07-06 20:04:04 -07:00
Zachary Wasserman ccc8581229 Upgrade eslint and dependencies (#2255)
Updates configuration and fixes issues introduced
2020-07-06 19:31:48 -07:00
Zachary Wasserman 3fb76c4154 Remove typescript-require (#2254)
This JS import was unused and causes problems when running tests on Node
14.
2020-07-06 17:02:25 -07:00
William Theaker b5b43e7aa7 Brief Auto Table Construction docs (#2249) 2020-06-30 09:18:50 -07:00
grantseltzer 755f63f8c0 Refactor fleetctl get subcommands so that they all have json and yaml output options (#2244) 2020-06-23 08:11:47 -07:00
Zachary Wasserman c1aa8355cb Add support for multiple enroll secrets (#2238)
- Support multiple enroll secrets
- Record name of enroll secret used when host enrolls
- Update fleetctl and UI to support these features
2020-05-29 09:12:39 -07:00
Zachary Wasserman 619e36755c Add capability to collect "additional" information from hosts (#2236)
Additional information is collected when host details are updated using
the queries specified in the Fleet configuration. This additional
information is then available in the host API responses.
2020-05-21 08:36:00 -07:00
William Theaker ea2390614a Update Firehose logging docs (#2230)
Fixes a couple of inconsistencies and clarifies configuration.
2020-05-12 13:30:14 -07:00
Charlie Gildawie df93abd722 Reduce verbosity of default logging (#2225)
* Moves much logging from the info level to the debug level
* Tries to retain security/auditing relevant logs at info level
2020-04-22 14:01:34 -07:00
Zachary Wasserman be8dbb426e Sanitize column names for order key in MySQL (#2224)
This adds a SQL injection prevention for a case in which we cannot use
parameters in the query.

It is not clear that this was possible to exploit. If it was possible,
it would have required a valid login to the Fleet server.
2020-04-22 13:59:40 -07:00
Zachary Wasserman ed79c00341 Explicitly disable CGO in build (#2229)
Fleet does not use CGO. In some build situations, not explicitly
disabling CGO results in binaries that have linking errors when running
on an Alpine Docker container. This change should fix the build for
those containers.
2020-04-17 16:02:05 -07:00
Lars Lehtonen 04c9acce96 server/service: Fix appConfigResponse.OrgInfo json tag (#2212)
Fixes a typo in the JSON tag.
2020-04-17 09:35:15 -07:00
Zachary Wasserman 08225f9c34 Update client auth docs (#2219)
Suggest that users front Fleet with a proxy to do TLS client auth.
2020-04-13 13:49:09 -07:00
Zachary Wasserman bf232e8b68 Make HostResponse an exported type (#2215)
This commit makes it easier to use the client package from outside of
Fleet by exporting the HostResponse type.
2020-03-31 16:14:26 -07:00
Zachary Wasserman 45f6a74740 Allow import of github.com/kolide/fleet (#2213)
Previously a Go package attempting to import Fleet packages would run
into an error like "server/kolide/emails.go:93:23: undefined: Asset".

This commit refactors bindata asset handling to allow importing Fleet as
a library without changing the typical developer experience.
2020-03-29 19:22:04 -07:00
Zachary Wasserman d3849d8fe1 Update CHANGELOG for 2.6.0 release (#2210) 2020-03-24 10:26:05 -07:00
billcobbler 44c40e4255 Retry sqlx transactions (#2203)
- Add exponential backoff method to MySQL datastore
- Refactor queries using transaction to use backup.

Fixes #845
2020-03-10 18:14:02 -07:00
Zachary Wasserman 53256917a3 Add fleetctl convert to fleetctl file format docs (#2201) 2020-03-02 17:05:01 -08:00
Zachary Wasserman f6223ca0e4 Add ability to modify host detail update interval (#2200)
This may be desirable for some deployments to reduce server load.
2020-03-02 11:08:08 -08:00
Lars Lehtonen 96cbd10651 server/service: Fix Missing Test Errors (#2196)
This fixes 9 places in the `server/service` tests where err variables were being dropped. No new test failures identified.
2020-02-18 18:11:16 -08:00