Commit Graph

2381 Commits

Author SHA1 Message Date
RachelElysia
ad3ed4210f
Host Details Page: Software Inventory Searchable (#1390)
* Refactored Software inventory table to use TableContainer
* Add search, reordering, IconTooltipCell
2021-07-15 10:01:52 -07:00
gillespi314
87ab319b30
Launch transparency page for fleetdm.com (#1391)
* Implement transparency page for fleetdm.com
2021-07-15 09:48:21 -05:00
Tomas Touceda
804136127e
Remove repository sources from software inventory (#1387) 2021-07-15 10:23:27 -03:00
Tomas Touceda
74fecf0d5b
Remove duplicate enroll secrets (#1388) 2021-07-14 19:05:54 -03:00
Mike Thomas
7ffb327ae9
Watch video button and seamless cloud fix (#1381)
* Watch video button and seamless cloud fix

* Update website/views/pages/homepage.ejs

Added btn-link bootstrap class.

Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>

Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
2021-07-15 07:02:06 +09:00
Zach Wasserman
5865fa8cb6
Fix fleetctl NPM install with NPM 6 (#1389)
Fixes #1335
2021-07-14 15:01:05 -07:00
Mike Thomas
c140263134
Delete old markdown queries (#1382) 2021-07-14 09:25:41 -05:00
Tomas Touceda
82ab0a798e
Add host users (#1334)
* Add host users

* Add changes file and test removing pull_request from the on test

* Remove users and store the removal timestamp

* Improve test yml to allow for PRs from forks
2021-07-13 17:15:38 -03:00
Tomas Touceda
d5e40f329e
Issue 1324 add activity feed (#1343)
* Add activities generation

* Add activities endpoint

* Fix merge error

* Fix indentation issue

* Add changes file

* Address PR review comments

* Add mock activity func

* Address codacy warings

* Set foreign key but on delete set null

* Make user_id set to null if deleted
2021-07-13 16:54:22 -03:00
Tomas Touceda
322ac3c8f6
Make roles for users mandatory (#1338)
* Make roles for users mandatory

* Remove nop migration

* Add missing test for wrong role

* Properly validate global and team roles

* Address codacy issues

* Address codacy review

* No need to check for nil
2021-07-13 16:33:04 -03:00
Zach Wasserman
8723b83039
Fix data race in inmem query results test (#1369)
Missed locking caused a race condition detected with the --race flag:

```
==================
WARNING: DATA RACE
Read at 0x00c0004b2cf0 by goroutine 67:
  runtime.mapaccess2_fast64()
      /usr/local/Cellar/go/1.16.5/libexec/src/runtime/map_fast64.go:52 +0x0
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).WriteResult()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:37 +0x84
  github.com/fleetdm/fleet/v4/server/service.(*Service).ingestDistributedQuery()
      /Users/zwass/dev/fleet/server/service/service_osquery.go:1020 +0x258
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQueryRecordCompletionError()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1499 +0x61c
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202

Previous write at 0x00c0004b2cf0 by goroutine 104:
  runtime.mapassign_fast64()
      /usr/local/Cellar/go/1.16.5/libexec/src/runtime/map_fast64.go:92 +0x0
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).getChannel()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:31 +0x1a4
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).ReadChannel()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:53 +0x64
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQueryRecordCompletionError.func1()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1493 +0x117

Goroutine 67 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1238 +0x5d7
  testing.runTests.func1()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1511 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202
  testing.runTests()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1509 +0x612
  testing.(*M).Run()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1417 +0x3b3
  main.main()
      _testmain.go:303 +0x236

Goroutine 104 (running) created at:
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQueryRecordCompletionError()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1492 +0x558
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c0000ff2d8 by goroutine 67:
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).WriteResult()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:37 +0xa4
  github.com/fleetdm/fleet/v4/server/service.(*Service).ingestDistributedQuery()
      /Users/zwass/dev/fleet/server/service/service_osquery.go:1020 +0x258
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQueryRecordCompletionError()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1499 +0x61c
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202

Previous write at 0x00c0000ff2d8 by goroutine 104:
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).getChannel()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:31 +0x1bc
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).ReadChannel()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:53 +0x64
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQueryRecordCompletionError.func1()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1493 +0x117

Goroutine 67 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1238 +0x5d7
  testing.runTests.func1()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1511 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202
  testing.runTests()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1509 +0x612
  testing.(*M).Run()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1417 +0x3b3
  main.main()
      _testmain.go:303 +0x236

Goroutine 104 (running) created at:
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQueryRecordCompletionError()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1492 +0x558
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202
==================
--- FAIL: TestIngestDistributedQueryRecordCompletionError (0.01s)
    service_osquery_test.go:1502: PASS:	QueryCompletedByHost(string,uint)
    testing.go:1092: race detected during execution of test
==================
WARNING: DATA RACE
Read at 0x00c0000f8570 by goroutine 70:
  runtime.mapaccess2_fast64()
      /usr/local/Cellar/go/1.16.5/libexec/src/runtime/map_fast64.go:52 +0x0
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).WriteResult()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:37 +0x84
  github.com/fleetdm/fleet/v4/server/service.(*Service).ingestDistributedQuery()
      /Users/zwass/dev/fleet/server/service/service_osquery.go:1020 +0x258
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQuery()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1530 +0x5bc
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202

Previous write at 0x00c0000f8570 by goroutine 71:
  runtime.mapassign_fast64()
      /usr/local/Cellar/go/1.16.5/libexec/src/runtime/map_fast64.go:92 +0x0
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).getChannel()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:31 +0x1a4
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).ReadChannel()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:53 +0x64
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQuery.func1()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1524 +0x117

Goroutine 70 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1238 +0x5d7
  testing.runTests.func1()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1511 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202
  testing.runTests()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1509 +0x612
  testing.(*M).Run()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1417 +0x3b3
  main.main()
      _testmain.go:303 +0x236

Goroutine 71 (running) created at:
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQuery()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1523 +0x4f4
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c000c480d8 by goroutine 70:
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).WriteResult()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:37 +0xa4
  github.com/fleetdm/fleet/v4/server/service.(*Service).ingestDistributedQuery()
      /Users/zwass/dev/fleet/server/service/service_osquery.go:1020 +0x258
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQuery()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1530 +0x5bc
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202

Previous write at 0x00c000c480d8 by goroutine 71:
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).getChannel()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:31 +0x1bc
  github.com/fleetdm/fleet/v4/server/pubsub.(*inmemQueryResults).ReadChannel()
      /Users/zwass/dev/fleet/server/pubsub/inmem_query_results.go:53 +0x64
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQuery.func1()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1524 +0x117

Goroutine 70 (running) created at:
  testing.(*T).Run()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1238 +0x5d7
  testing.runTests.func1()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1511 +0xa6
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202
  testing.runTests()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1509 +0x612
  testing.(*M).Run()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1417 +0x3b3
  main.main()
      _testmain.go:303 +0x236

Goroutine 71 (running) created at:
  github.com/fleetdm/fleet/v4/server/service.TestIngestDistributedQuery()
      /Users/zwass/dev/fleet/server/service/service_osquery_test.go:1523 +0x4f4
  testing.tRunner()
      /usr/local/Cellar/go/1.16.5/libexec/src/testing/testing.go:1193 +0x202
==================
--- FAIL: TestIngestDistributedQuery (0.01s)
    service_osquery_test.go:1532: PASS:	QueryCompletedByHost(string,uint)
    testing.go:1092: race detected during execution of test
FAIL
FAIL	github.com/fleetdm/fleet/v4/server/service	42.743s
```
2021-07-13 12:27:41 -07:00
Zach Wasserman
bd68c52a52
Configure CodeQL to target appropriate files (#1357)
Excludes vendored dependencies in fleetdm.com.
2021-07-13 12:27:09 -07:00
gillespi314
5176a6d358
Remove unused import (#1370) 2021-07-13 11:20:54 -05:00
RachelElysia
43b526e36e
Create User Modal: No teams exists state (#1354)
* If no teams exist, render no team message when trying to assign a user to a team.
2021-07-12 18:08:03 -07:00
RachelElysia
3a51f95595
Dropdown Component: Clean Styling across Browsers (#1365)
* Dropdown styling (Chrome and Firefox)
* Fix incompatible row heights rendering in tables (Firefox)
2021-07-12 14:50:32 -07:00
gillespi314
e6a01d755c
User Modal: Fix default behaviors based on organization settings (#1366)
- Update create/edit user modal to accurately reflect if SSO is enabled for the individual user (rather than if enabled for the organization as a whole)
- Update create/edit user modal tooltips and disabled fields based on state of organization settings (SSO and SMTP)
2021-07-12 16:39:43 -05:00
Zach Wasserman
f14b1a563b
Increase timeout on Cypress enroll secret download (#1356)
This seemed to be causing flaky tests. TBD whether this improves the situation.
2021-07-12 11:06:03 -07:00
Zach Wasserman
00ebf5dcd3
Configure CodeQL Action (#1355)
Adds code quality checks via GitHub's built in CodeQL engine.
2021-07-12 10:25:49 -07:00
Zach Wasserman
bc1698767e
Fix Kinesis/Firehose error messages (#1316)
Previously we unintentionally logged the *pointer* when we intended to
log the *value* of how many records failed.
2021-07-12 10:18:02 -07:00
RachelElysia
29e900d7c3
Homepage Dashboard - New feature! (#1340)
* Adds homepage dashboard to Fleet app
* Host Summary is displayed on the dashboard
2021-07-12 10:15:47 -07:00
gillespi314
2bb2bf2d5d
Add ability in Fleet UI for admin to create new users without email invitations (#1261) 2021-07-12 10:26:11 -05:00
noahtalerman
2c277ba28a
Update documentation for auto table construction (#1353)
- Move auto table construction (ATC) docs into the "Organization settings" section.
2021-07-12 10:36:49 -04:00
Tomas Touceda
f534b8b6fe
When creating a pack store team, host, and label ids provided (#1332)
* When creating a pack store team, host, and label ids provided

* Mock store to test only the service
2021-07-12 10:48:50 -03:00
gillespi314
099b26724e
Update 2-Testing.md
Correct commands for launching Cypress tests in interactive mode
2021-07-11 10:51:05 -05:00
Martavis Parker
ec23d4ee8e
Select all matching hosts (#1226)
* #940 passing matching props to table; typescript

* #940 fixed use of results title

* #940 logic to swap states of selected and not

* #940 optimized rendering selected text

* #940 began styling to match flexbox spacing

* #940 added logic to API

* #940 clean up

* #940 fixed action

* #940 fixed conflict and coment

* #940 hide select matching if under 100 hosts

* #940 fixed issue with status filter
2021-07-10 10:29:27 -07:00
gillespi314
2d16ad1608
Fix asset url for email template images (#1347) 2021-07-09 18:34:08 -05:00
gillespi314
c9a406ec99
Adjust header and footer padding (#1341) 2021-07-09 14:39:48 -05:00
Tomas Touceda
7d3d84faaf
Make it possible to clear host settings from app config (#1339) 2021-07-09 15:13:11 -03:00
Mike McNeil
e19a4e2cf5
Add tips for moderating comments diplomatically 2021-07-09 11:53:14 -05:00
Tomas Touceda
12215bfbbd
Disable user sso_enable if org is disabling sso (#1331)
* Disable user sso_enable if org is disabling sso

* Cleanup test

* Add withTx and use it in SaveConfig
2021-07-09 13:12:21 -03:00
Tomas Touceda
d90c16f96f
Add changes files for previous PRs (#1330)
* Add chnages files for previous PRs

* Update changes/1239-improve-auth-errors

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

* Update changes/1208-fetch-all-host-data

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

* Remove contributor only change

Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2021-07-09 13:09:53 -03:00
gillespi314
5bb4a05b44
Fleetdm.com: Template for documentation pages (#1297)
* Create fleetdm.com docs template

* Create controller and view for docs template

* Refine docs template

* Add links to docs template

* Refactor docs page schema

* Add img alt text

* Implement docs landing page

* Update links

* Fix padding; fix related topics; stretch link

* Fix browser compatibility issues

* sandbox in-development doc routes and fiddle around with the aliases to make our doc urls shorter (useful when embedding in code comments, etc)

resolves https://github.com/fleetdm/fleet/pull/1297#discussion_r666682928

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2021-07-09 00:58:40 -05:00
RachelElysia
1196808f31
Update flash messages - Packs flash message, styling, timeout on success message (#1315)
* New flash message styling - success (4 seconds) and error
* Packs flash messages
2021-07-08 13:55:26 -04:00
Tomas Touceda
18fa2f6a02
Issue 1009 calculate diff software (#1305)
* First approach to diff

* Refactor things for better readability and testing

* Remove draft comment for algorithm

* Format things a bit better

* Remove unused and simplify code a bit

* Refactor for readability and testing

* Add changes file

* Implement new approach based on review comments

* Make sure to only delete from the current host

* Add single uninstall test and fix code

* Improve code based on review
2021-07-08 13:57:43 -03:00
Tomas Touceda
39034071ca
Issue 1286 improve errors (#1322)
* Refactor error handling for better extensibility and add more scaffolding for specific db errors

* Add integration tests to check errors from mysql are translated properly

* Address review comments

* Add changes file
2021-07-08 12:50:43 -03:00
Zach Wasserman
4fdfcf6b6f
Add note about usernames and SSO to changelog (#1328) 2021-07-07 16:16:51 -07:00
Zach Wasserman
d790ff7d80
Allow Redis connection with unknown CLUSTER command (#1312)
This improves compatibility with GCP Memorystore Redis.
2021-07-07 15:57:32 -07:00
Mike McNeil
6f1435b7f4
:) "prospective customer" => "customer" (#1323) 2021-07-07 14:33:32 -05:00
Mike McNeil
325c68b36b Fix typo in config for fleetdm.com 2021-07-06 22:11:06 -05:00
Mike McNeil
eebc9e430d
Update production.js (#1318)
https://stackoverflow.com/a/65618728/486547
2021-07-06 22:06:15 -05:00
Mike McNeil
f5f751fdd1
Add new script for fleetdm.com schema migrations (#1317)
* Make sails run wipe-staging just be sails run wipe.

* Add instructions to README

* use latest postgresql adapter + update wipe script  (will probably change this to mysql at some point for consistency)

* Update README.md
2021-07-06 21:58:20 -05:00
Mike McNeil
41cfaa1e76 Change webhook route + expose without relying on session 2021-07-06 21:22:02 -05:00
Tomas Touceda
587f6166a8
Add changes files doc (#1311)
* Describe changes files

* Minor fixes
2021-07-06 18:50:42 -03:00
Mike McNeil
2cea0c8c2c receive POST requests (fix for https://github.com/fleetdm/fleet/pull/1314) 2021-07-06 15:13:47 -05:00
Mike McNeil
d9431e4da5
Receive anonymous usages statistics (#1314) 2021-07-06 15:03:40 -05:00
RachelElysia
0834af5bb7
User Settings Page and User Management Page: SMTP config conditionally disables email update (#1309)
* Disable Email update field when SMTP is disabled
* Render tooltip, not-allowed cursor, greyed font for disabled UI
* Update integration tests accordingly
* Minor fixes to form styling
2021-07-06 12:22:51 -04:00
noahtalerman
498209614c
Update examples in documentation to use FleetDM where possible (#1310)
- Remove "Connecting a host" from fleetctl documentation
- Remove queries from REST API examples
- Point to Launcher documentation
- Update community projects
2021-07-06 12:14:20 -04:00
Zach Wasserman
fe230bb9f4
Add FAQ entries for common migration and TLS questions (#1307)
Closes #1303
2021-07-05 17:52:13 -07:00
Mike Thomas
891a49145d
Faqs and style fixes (#1306)
* Pricing FAQ + minor fixes

* Update pricing.ejs
2021-07-05 18:45:08 -05:00
noahtalerman
9fb1f9cac1
Add link to Loom video that walks through setting up dev environment (#1304) 2021-07-05 18:45:41 -04:00