Commit Graph

824 Commits

Author SHA1 Message Date
John Murphy
d1b37616a0 Fix SSO for ADFS (#1535)
Closes #1533

Since the SAML 2.0 spec doesn't say what characters are valid in an Entity ID and Active Directory doesn't like '=' signs in base64 encoded ID's I added code that generates ID's with a character set that we know works.  Also, removed ProtocolBinding attribute from AuthRequest as is was forcing ADFS to use redirect binding when it should use post binding.
2017-07-31 21:48:42 -05:00
John Murphy
e67157345a Added ability to handle nested signed assertions in SAML response
Closes #1532

Fixes error that was caused because there was a bug in processing nested assertions in a successful SAML response. This was not caught in the initial push of this code because the IDP's we tested against all sign the entire response document as opposed to parts of it.  Thus the existing test cases didn't cover the code that dealt with nested assertions.
2017-07-18 15:28:35 -05:00
Mike Arpaia
f05204b4dc Updating README to rename project (#1531)
* Updating README to rename project

* updating the badge
2017-06-22 17:05:47 -04:00
Mike Arpaia
018b91ab2c Rename project to Kolide Fleet (#1529) 2017-06-22 15:50:45 -04:00
Zachary Wasserman
ce32498bdf Fix aliased config_tls_refresh processing (#1530)
Changes in osquery 2.4.6 prevented us from correctly retrieving the config
interval. This commit retrieves the new aliased interval.
2017-06-19 20:04:21 -04:00
Mike Arpaia
0ef944c0a4 Updating the team photo (#1528) 2017-06-18 14:00:43 -06:00
Victor Vrantchan
f8d01b03f5 update yarn deps (#1527) 2017-06-18 12:39:58 -06:00
Kyle Knight
61973ecceb Fix up styles in IE11 (#1391)
* Fix up styles in IE11

* Getting check marks to show
2017-06-18 12:38:16 -06:00
Mike Arpaia
71abc38c22 Adding comments to the osquery types (#1519) 2017-06-18 12:26:08 -06:00
John Murphy
095aa7df7a Fix issue where empty strings are returned as ints in log results (#1522)
Fix for issue where osquery sends empty strings where we expect integers in detail queries. We handle empty strings in these cases by changing them to "0" and then letting the different conversion functions change the "0" string into the appropriate integer type. This has been tested against running osquery hosts.

Closes #1521
2017-06-08 12:57:12 -05:00
John Murphy
db10fd5ece removed package directive from ci (#1517)
Package generation is now managed differently.
2017-06-02 10:57:46 -05:00
John Murphy
28c0e3239b Updated change log (#1516) 2017-06-02 09:54:24 -05:00
John Murphy
d8ce89f42d Add ability to handle empty set of decorators (#1515)
Normally a Kolide user will always have at least two built in decorators that they can't delete through the UI so a situation with zero decorators should never happen; however, in the event we change this behavior in the future, or a user manually deletes decorators from the database the UI should handle an empty decorator set.
2017-06-01 17:17:37 -05:00
John Murphy
7a8f418d0f Added support for atomic imports and dry run imports (#1510)
Closes issue #1475

The command line tool that uses this endpoint -> https://github.com/kolide/configimporter

* Added support for atomic imports and dry run imports

* Added code so that imports are idempotent
2017-05-30 14:42:00 -05:00
John Murphy
151ce35e8c Front end support for decorator crud ops (#1509)
This PR closes #1448, providing front end CRUD operations for decorators.* Front end support for decorator crud ops.
2017-05-30 13:36:29 -05:00
Zachary Wasserman
e9b07fd1f0 Fix host authentication errors in case of DB failure (#1512)
Closes #1511
2017-05-25 14:10:12 -07:00
John Murphy
019191c36b SSO Login and Configuration Support (#1506)
Closes issue #1456 This PR adds a single sign on option to the login form, exposes single sign on to the end user, and allows an admin user to set single sign on configuration options.
2017-05-17 10:58:40 -05:00
John Murphy
12d2df1f9a Add SSO support to new user activation (#1504)
Closes #1502. This PR adds support for SSO to the new user creation process. An admin now has the option to select SSO when creating a new user.  When the confirmation form is submitted, the user is automatically authenticated with the IDP, and if successful, is redirected to the Kolide home page. Password authentication, password change and password reset are not allowed for an SSO user.
2017-05-10 11:26:05 -05:00
John Murphy
368b9d774c Server Side SSO Support (#1498)
This PR partially addresses #1456, providing SSO SAML support. The flow of the code is as follows.

A Kolide user attempts to access a protected resource and is directed to log in.
If SSO identity providers (IDP) have been configured by an admin, the user is presented with SSO log in.
The user selects SSO, which invokes a call the InitiateSSO passing the URL of the protected resource that the user was originally trying access. Kolide server loads the IDP metadata and caches it along with the URL. We then build an auth request URL for the IDP which is returned to the front end.
The IDP calls the server, invoking CallbackSSO with the auth response.
We extract the original request id from the response and use it to fetch the cached metadata and the URL. We check the signature of the response, and validate the timestamps. If everything passes we get the user id from the IDP response and use it to create a login session. We then build a page which executes some javascript that will write the token to web local storage, and redirect to the original URL.
I've created a test web page in tools/app/authtest.html that can be used to test and debug new IDP's which also illustrates how a front end would interact with the IDP and the server. This page can be loaded by starting Kolide with the environment variable KOLIDE_TEST_PAGE_PATH to the full path of the page and then accessed at https://localhost:8080/test
2017-05-08 19:43:48 -05:00
Zachary Wasserman
5a69cf1530 Update TLS cert documentation (#1499) 2017-04-27 14:11:04 -04:00
John Murphy
2945031a86 Fix bug in Osquery import and updated import docs (#1478)
This PR contains a fix for a bug that turned up when I was testing configimporter. If the platform field is not specified, its supposed to default to all per the osquery configuration spec. The default was not properly implemented, and if the platform value was missing from the imported configuration it failed. The PR also added instructions to the api documentation describing how to import an osquery configuration.
2017-04-23 19:41:27 -05:00
Zachary Wasserman
49e4bad88d Do not return deleted packs with query (#1497)
Closes #1476
2017-04-18 12:41:51 -07:00
Zachary Wasserman
22fbb65db3 Re-enable all tests in TestUpdateHostIntervals (#1496) 2017-04-18 11:29:04 -07:00
Zachary Wasserman
dfa2d83855 Update online status calculation to use per-host intervals (#1494)
Replaces the existing calculation that uses a global online interval. This method was lacking due to the fact that different hosts may have different checkin intervals set.

The new calculation uses `min(distributed_interval, config_tls_refresh) + 30` as the interval. This is calculated with the stored values for each host.

Closes #1321
2017-04-18 10:39:50 -07:00
Zachary Wasserman
d6e15e695a Fix lint-license for compatibility with rc-pagination (#1493) 2017-04-14 16:44:11 -07:00
Kyle Knight
97eb49017a Allow uncheck of Query if All selected (#1483) 2017-04-13 15:05:23 -05:00
Victor Vrantchan
9e5dd0ccce fix gcloud deployment on CircleCI (#1492)
update kube config permissions and add --set-gtid-purged=OFF
flag for mysqldump
2017-04-13 15:40:05 -04:00
Zachary Wasserman
629a740b45 Require JWT Key to be specified for server startup (#1480)
If server is started without a JWT key, a message like the following is printed:
```
################################################################################
# ERROR:
#   A value must be supplied for --auth_jwt_key. This value is used to create
#   session tokens for users.
#
#   Consider using the following randomly generated key:
#   om3w95gMA2drT5xAdLd2Q5oE8fLw+Miz
################################################################################
```

Closes #1480.
2017-04-12 15:05:56 -07:00
John Murphy
789596a78e SAML Database Support
Partially addresses #1456. This PR provides datastore support for SSO by creating a new entity IdentityProvider. This entity is an abstraction of the SAML IdentityProvider and contains the data needed to perform SAML authentication.
2017-04-12 15:42:10 -05:00
Mike Arpaia
40610e508f Removing app_token_key from documentation (#1489)
d3eb3b7272 removed `app_token_key` from
the application, but not the docs.
2017-04-12 09:57:19 -06:00
Zachary Wasserman
d3eb3b7272 Remove unused --app_token_key flag (#1479)
Closes #1469
2017-04-11 17:13:38 -07:00
Victor Vrantchan
64a42c7c72 update circle-ci deployment dependencies (#1477)
changes to the gcloud dependencies and circle ci image broke the deployment steps. 
disabled caching for now and updated how kubectl runs.
2017-04-10 09:34:49 -04:00
Kyle Knight
3544535e1d Make % online round to two decimal places (#1427) 2017-04-07 07:50:11 -07:00
Kyle Knight
54bd9a8f66 Nudge the Apple icon over a bit to line up everything (#1428) 2017-04-07 07:50:03 -07:00
Zachary Wasserman
0d11c8a995 Update go get packages in make deps (#1474) 2017-04-06 12:12:20 -07:00
Zachary Wasserman
d7cd91c0e4 Retrieve and store host checkin intervals (#1473)
We now track the `config_tls_refresh`, `distributed_interval` and
`logger_tls_period` flag values for each host. Each value is updated by a
detail query agains the `osquery_flags` table, because they may be specified
outside of Kolide. The flags that can be specified within Kolide are also
updated when a config is returned to the host that changes their value.

This will enable us to do a more accurate per-host online status calculation as
discussed in #1419.
2017-04-06 11:55:24 -07:00
Zachary Wasserman
6a3ea3fc8c Remove remaining uses of golang.org/x/net/context (#1464) 2017-04-05 12:25:34 -07:00
Victor Vrantchan
79d95af7c9 increment version in changelog (#1467) 2017-04-04 10:15:12 -04:00
John Murphy
c90368c4af Changed default osquery logging behavior
Made log rotation for osquery results and status logs optional.  This required writing the logwriter package which is a drop in replacement for lumberjack.  We still use lumberjack if the log rotation flag --osquery_enable_log_rotation flag is set. Note that the performance of the default is quite a bit better than lumberjack.


BenchmarkLogger-8       	 2000000	       747 ns/op
BenchmarkLumberjack-8   	 1000000	      1965 ns/op
PASS
BenchmarkLogger-8       	 2000000	       731 ns/op
BenchmarkLumberjack-8   	 1000000	      2040 ns/op
PASS
BenchmarkLogger-8       	 2000000	       741 ns/op
BenchmarkLumberjack-8   	 1000000	      1970 ns/op
PASS
BenchmarkLogger-8       	 2000000	       737 ns/op
BenchmarkLumberjack-8   	 1000000	      1930 ns/op
PASS
2017-04-03 16:48:50 -05:00
John Murphy
bff737444f Updated CHANGELOG for 1.0.3 release 2017-04-03 11:15:42 -05:00
Zachary Wasserman
38a900dad5 Edits to admin app settings text (#1460) 2017-03-31 10:11:02 -07:00
Zachary Wasserman
3ef2876aab Minor improvements to logger SIGHUP test (#1459)
These should provide a slight reliability improvement for this test.
2017-03-31 09:59:23 -07:00
Zachary Wasserman
be34ecc557 Add a debug endpoint for collecting performance statistics and profiles. (#1461)
When `kolide serve --debug` is used, additional handlers will be started to
 provide access to profiling tools. These endpoints are authenticated with a
 randomly generated token that is printed to the Kolide logs at startup. The
 profiling tools are not intended for general use, but they may be useful when
 providing performance-related bug reports to the Kolide developers.
2017-03-31 09:56:38 -07:00
John Murphy
d533931799 Addresses Issue where the reset button doesn't work on options page (#1447)
Closes issue #1388. The problem here is that previously, the reset button loaded a hard coded list of default options into the component state, instead of the proper behavior which is to reset the options to default values on the back end, and then load them back into the redux store. This PR adds a ResetOptions endpoint on the server, and wires up the UI so that it triggers the endpoint, then loads the default options from the backend server.
2017-03-30 18:56:11 -05:00
John Murphy
f4bee00b01 Fix Issue where saving same option value errs. (#1433)
Closes issue #1390

There were quite a few places where UPDATES could fail silently because we weren't checking target rows where actually found where we expect them to be. In order to address this problem clientFoundRows was set in the sql driver configuration and checks for UPDATES were added to determine if matched rows were found where we expect them to be.
2017-03-30 17:03:48 -05:00
Zachary Wasserman
765b4b207c Update changelog (#1458) 2017-03-30 11:17:38 -07:00
Zachary Wasserman
60607cb366 Speed up manage packs page loading (#1429)
Push the calculation of target counts into the SQL query, rather than loading
all of the targets and then counting them. This provides a dramatic (>100x)
speedup in loading of the manage packs page when large numbers of hosts are
present.

Closes #1426
2017-03-30 08:31:28 -07:00
Zachary Wasserman
6d9085da71 Remove extraneous calls to MarkHostSeen (#1441)
The seen time should only be updated once per request from the osquery agent to
the Kolide server. We now do that only in AuthenticateHost (which every request
besides enrollment must go through).
2017-03-30 08:31:05 -07:00
Zachary Wasserman
06ed4c2771 Only calculate online interval once when retrieving hosts (#1457)
This makes a major perf difference, as it reduces the O(# of hosts) queries
down to constant.
2017-03-30 08:30:05 -07:00
John Murphy
587b6592ff Fixed problem where changed port didn't trigger validation (#1451)
Closes issue #1380

Skipped validation caused garbage data to get sent to the server which caused an error in the transport middleware.
2017-03-29 22:29:08 -05:00