Commit Graph

274 Commits

Author SHA1 Message Date
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
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
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
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
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
Jean M
877cd7e39a
Added support to logging X-Forward-For header (#2133) (#2193)
Allows Fleet to log the actual client address and not just the proxy address when communicating with the osquery endpoints.
2020-02-11 09:16:12 -08:00
Zachary Wasserman
6dbc3bc77a
Implement fleetctl goquery (#2186)
- Update fleet APIs to support necessary operations in goquery
- Implement support for goquery in fleetctl
2020-01-23 21:27:20 -08:00
Zachary Wasserman
ef1d69c371
Fix bugs in error handling for creation of live queries (#2181)
- Return the correct result type in error cases
- Handle nil values for campaign when logging
2020-01-13 17:35:42 -08:00
billcobbler
a83a26b279 Add ability to disable live queries (#2167)
- Add toggle to disable live queries in advanced settings
- Add new live query status endpoint (checks for disabled via config and Redis health)
- Update QueryPage UI to use new live query status endpoint

Implements #2140
2020-01-13 16:53:04 -08:00
thehellajeff
6580fe1c5a Improvements to server logging (#2155)
- Add logging for new campaigns
- Add logging for new query creations/modification/deletion
- Add usernames for logs found in labels, options, packs, osquery options, queries and scheduled queries where something is created, modified or deleted
2019-12-04 09:42:10 -08:00
billcobbler
a856fd5c0b Add fleetctl get/apply config (#2143)
Implements #1953
2019-11-19 21:13:15 -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
Austin Burnett
59efb495ca Add automatic host expiration capability (#2117)
When configured, this feature will delete hosts that have not checked in after the specified number of days.

Closes #1860.
2019-10-16 16:35:17 -07:00
William Theaker
a688b5cf5b Allow idp_name to be 4 characters (#2106) 2019-09-25 10:18:30 -07:00
Zachary Wasserman
1eccf9a874
Add warning in query UI when Redis fails (#2086)
- Add warning message when Redis fails
- Disable query button when Redis fails
- Refactor SMTP warning banner into component for reuse

Closes #2073
2019-08-13 09:42:58 -07:00
Zachary Wasserman
363b6157c4
Allow scheduled query shard to be set to empty in frontend (#2093)
Fixes #1452
2019-08-13 09:42:02 -07:00
Zachary Wasserman
fa10dbe0a8
Use Github hosted assets in emails sent by Fleet (#2090)
This change allows the images in Fleet emails to load properly from any
device with connectivity to github.com. Previously, emails might try to
load resources from a Kolide server not accessible from the email
client.

The asset URL will be based on the most recent git tag to accomodate
backwards-compatibility if the assets in the repo change.

Closes #1471
2019-08-02 14:08:42 -07:00
Michael Samuel
969d5f25af Add Google Cloud PubSub logging (#2049)
Adds Google Cloud PubSub logging for status and results.

This also changes the Write interface for logging modules to add a context.Context (only used by pubsub currently).
2019-07-16 15:41:50 -07:00
Zachary Wasserman
261b7f916c
Save details provided by host during enrollment (#2066)
When an osqueryd agent sends an enroll request it automatically sends
some details about the system. We now save these details which helps
ensure we send the correct platform config.

Closes #2065
2019-07-01 16:50:04 -07:00
Zachary Wasserman
1f7cffba11
Fix newlines in log output (#2029)
Fixes a regression introduced in 2.1.0 in which separate log lines are
no longer output separated by a newline. Now log lines in both output
plugins will do so.
2019-04-17 15:55:31 -07:00
Zachary Wasserman
e59714242e
Add Firehose logging capabilities for result and status logs (#2022)
- Refactor configuration for logging to use separate plugins
- Move existing filesystem logging to filesystem plugin
- Create new AWS firehose plugin
- Update documentation around logging
2019-04-08 11:47:15 -07:00
Zachary Wasserman
7153e0043c Update email contents and subjects (#2023)
- Refer to "Kolide" as "Fleet"
- Fix link to documentation
- Remove suggestion to email support@kolide.co
2019-04-04 18:56:15 -04: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
Zachary Wasserman
c8229cc0d6
Replace uses of the term "Kolide" with "Fleet" (#1999)
Almost two years ago, we began referring to the project as Fleet, but there are
many occurences of the term "Kolide" throughout the UI and documentation. This
PR attempts to clear up those uses where it is easily achievable.

The term "Kolide" is used throughout the code as well, but modifying this would
be more likely to introduce bugs.
2019-01-24 09:39:32 -08:00
James Thomas
5e5e4f3918 Add Support for SMTP LOGIN Authentication Method (#1988)
This PR adds support for the SMTP LOGIN authentication method. Office 365 Exchange removed support for PLAIN authentication some time ago, and only supports LOGIN and an OAuth2 authentication method. This patch has been tested with a licensed O365 account. This method should also be usable with any other email server that advertises LOGIN in its 250-AUTH response.

Note: If using this with O365, the account used must not have MFA enabled.

Closes #1663
2019-01-14 12:35:23 -08:00
blaedj
be85377326
Add 'get hosts' command to fleetctl (#1977)
This commit:
 - adds a new sub-command for fetching hosts to `fleetctl get` command.

Why?
 - this allows for listing of all hosts via the fleetctl interface.
 There may be additional attributes of the host that we'd like to
 display, but this should be a good start.

Closes #1962
2019-01-03 16:19:23 -06:00
Zachary Wasserman
0f99b454a0
Add username support to fleetctl setup (#1971)
Username continues to default to email if not specified in the options.

Closes #1970
2019-01-02 15:27:37 -08:00
Zachary Wasserman
b752073d05
Fix slow return of results in fleetctl query with high host count (#1965)
Prior to this change, the live query status was calculated after each retrieved
result. This was fine at a low host count, but when more hosts are added, doing
this calculation becomes slower.

Now, the status is only calculated every 5 seconds, while results can be
streamed continuously.

Fixes #1895
2018-12-20 17:44:49 -08:00
Zachary Wasserman
051d3c8b07
Fix errors when trying to retrieve specs with spaces in name (#1957)
We need to properly escape and unescape the name parameter.

Fixes #1948
2018-11-20 17:19:24 -08:00
Blake Atkinson
510ec10769 Documentation: Add mysql conn limits (#1947) 2018-11-01 17:43:24 -04:00
Zachary Wasserman
be6a16959a Fix error messages related to null users as creators of queries. (#1928)
Ensure that the queries page still loads even when users are deleted manually
in the DB.

Fixes #1911
2018-10-11 13:22:43 -07:00
adamenger
a99313533d Added custom CA support to fleetctl client (#1931) 2018-10-01 15:23:46 -07:00
Zachary Wasserman
7e26b915c5 Refactoring and fixes in user authorization
- Simplify/fix logic for authorization
- Rename/refactor for clarity
- Add tests for auth related code
2018-09-18 14:56:25 -04:00
Zachary Wasserman
5cbaa9cb9f Prevent non-admin users from modifying other users
An incorrect authorization check allowed non-admin users to modify the details of other users. We now enforce the appropriate authorization so that unprivileged users can only modify their own details.

Thanks to 'Quikke' for the report.
2018-09-18 14:56:25 -04:00
Zachary Wasserman
21269b1dd8 Prevent escalation of user privileges via ModifyUser method
The ability to modify a users admin and enabled status was erroneously left in
place during development of https://github.com/kolide/fleet/pull/959. To
mitigate a privilege escalation vulnerability we need to ensure those values
can only be modified through the explicit methods.

This patch includes a unit test and fix for the vulnerability.

Thanks to 'Quikke' for submitting this vulnerability.
2018-09-18 14:56:25 -04:00
Zachary Wasserman
79b2249e69
Allow update of settings page without enabling SMTP (#1903)
Fixes #1871
2018-09-07 15:37:35 -07:00
Zachary Wasserman
06832697d0
Fix deletion of labels in UI (#1848)
- Add endpoint for deletion of label by ID
- Use ID endpoint from frontend JS

Fixes #1847
2018-06-25 13:56:59 -07:00
Zachary Wasserman
08a2dc73cd
Fix bugs with packs created in UI (#1843)
- Delete duplicate queries in packs created by the UI (because the duplicates
  were causing undefined behavior). Now it is not possible to schedule
  duplicates in the UI (but is in fleetctl).
- Fix bug in which packs created in UI could not be loaded by fleetctl.
2018-06-21 17:06:44 -07:00
Zachary Wasserman
6424a029ee
Fix labels UI issues in Fleet 2.0 (#1830)
Replaces the UI endpoints for creating and modifying labels. These were removed
in #1686 because we thought we were killing the UI.

Now labels can be created and edited in the UI again.
2018-06-18 10:09:08 -07:00
Zachary Wasserman
0b7747bef0
Fix pack and query UI issues in Fleet 2.0 (#1829)
Replaces (and appropriately refactors) a number of endpoints that were removed long ago when we decided to kill the UI with the fleetctl release. We turned out not to do this, and now need to restore these missing endpoints.

This is not a straight up replacement of the existing code because of refactoring to the DB schemas that was also done in the migration.

Most of the replaced code was removed in #1670 and #1686.

Fixes #1811, fixes #1810
2018-06-15 10:13:11 -04:00
Mike Arpaia
c91a031d3e
Attempt 2 at returning a serializable config (#1819) 2018-06-11 11:34:05 -06: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
Mike Arpaia
1d70b082a5
Add a setup guide for new CLI users (#1798) 2018-05-22 17:57:56 -06:00
Zachary Wasserman
e626d5d060 Add options clients and commands (#1791) 2018-05-21 10:25:58 -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
Thordur Bjornsson
6a4d50c7a6 ensure email and passwords are set during setup (#1786) 2018-05-17 08:29:04 -06:00
Thordur Bjornsson
929000ba28 server: formatting (#1788) 2018-05-16 23:52:24 -06:00
Thordur Bjornsson
d7e1462d10 Check if the jwtToken is valid in authViewer. (#1785)
Closes #1514
2018-05-16 09:36:35 -06:00