Commit Graph

76 Commits

Author SHA1 Message Date
Zach Wasserman
653c46b777
Use template icon for Fleet Desktop (#4784)
This enables support for light vs. dark mode.
2022-03-24 15:00:01 -07:00
Zach Wasserman
d0630b00e1
Allow Orbit shell to run while daemon is running (#4772)
Use a different data path so that the new osquery instance doesn't try
to use the same pidfile, db file, extension socket, etc.

#4769
2022-03-23 15:27:52 -07:00
Lucas Manuel Rodriguez
378b1dd34f
Upgrade osquery-go (#4728)
* Upgrade and replace kolide/osquery-go with osquery/osquery-go

* Upgrade macadmins/osquery-extension to v0.0.7

* Upgrade kolide/launcher to latest

* go mod tidy
2022-03-23 12:15:37 -03:00
Lucas Manuel Rodriguez
4d7c9d19d2
Add missing desktop channel to orbit's Info.plist (#4724) 2022-03-21 19:56:12 -03:00
Zach Wasserman
cc687d9d1e
Add Notarization for Fleet Desktop (#4720) 2022-03-21 15:01:50 -07:00
Lucas Manuel Rodriguez
ecdfd627b6
Fleet Desktop MVP (#4530)
* WIP

* WIP2

* Fix orbit and fleetctl tests

* Amend macos-app default

* Add some fixes

* Use fleetctl updates roots command

* Add more fixes to Updater

* Fixes to app publishing and downloading

* Add more changes to support fleetctl cross generation

* Amend comment

* Add pkg generation to ease testing

* Make more fixes

* Add changes entry

* Add legacy targets (until our TUF system exposes the new app)

* Fix fleetctl preview

* Fix bool flag

* Fix orbit logic for disabled-updates and dev-mode

* Fix TestPreview

* Remove constant and fix zip-slip attack (codeql)

* Return unknown error

* Fix updater's checkExec

* Add support for executable signing in init_tuf.sh

* Try only signing orbit

* Fix init_tuf.sh targets, macos-app only for osqueryd

* Specify GOARCH to support M1s

* Add workflow to generate osqueryd.app.tar.gz

* Use 5.2.2 on init_tuf.sh

* Add unit test for tar.gz target

* Use artifacts instead of releases

* Remove copy paste residue

* Fleet Desktop Packaging WIP

* Ignore gosec warning

* Trigger on PR too

* Install Go in workflow

* Pass url parameter to desktop app

* Fix fleetctl package

* Final set of changes for v1 of Fleet Desktop

* Add changes

* PR fixes

* Fix CI build

* add larger menu bar icon

* Add transparency item

* Delete host_device_auth entry on host deletion

* Add SetTargetChannel

* Update white logo and add desktop to update runner

* Add fleet-desktop monitoring to orbit

* Define fleet-desktop app exec name

* Fix update runner creation

* Add API test before enabling the My device menu item

Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2022-03-21 14:53:53 -03:00
Zach Wasserman
efbc2b92bb
Fix race condition in updates test (#4661)
Copy the DefaultOptions in order to prevent a data race on the Targets
map. This race should only have effected testing.

Race detector output:

```
WARNING: DATA RACE
Read at 0x00c0000908d0 by goroutine 15:
  runtime.mapaccess1_faststr()
      /opt/hostedtoolcache/go/1.18.0/x64/src/runtime/map_faststr.go:13 +0x0
  github.com/fleetdm/fleet/v4/orbit/pkg/update.TestMakeRepoPath.func1()
      /home/runner/work/fleet/fleet/orbit/pkg/update/update_test.go:58 +0xb6
  testing.tRunner()
      /opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486 +0x47

Previous write at 0x00c0000908d0 by goroutine 12:
  runtime.mapassign_faststr()
      /opt/hostedtoolcache/go/1.18.0/x64/src/runtime/map_faststr.go:203 +0x0
  github.com/fleetdm/fleet/v4/orbit/pkg/update.TestMakeRepoPath.func1()
      /home/runner/work/fleet/fleet/orbit/pkg/update/update_test.go:62 +0x1cb
  testing.tRunner()
      /opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486 +0x47

Goroutine 15 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486 +0x724
  github.com/fleetdm/fleet/v4/orbit/pkg/update.TestMakeRepoPath()
      /home/runner/work/fleet/fleet/orbit/pkg/update/update_test.go:53 +0x1a4
  testing.tRunner()
      /opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486 +0x47

Goroutine 12 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486 +0x724
  github.com/fleetdm/fleet/v4/orbit/pkg/update.TestMakeRepoPath()
      /home/runner/work/fleet/fleet/orbit/pkg/update/update_test.go:53 +0x1a4
  testing.tRunner()
      /opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486
      +0x47
 ```
2022-03-18 09:30:45 -07:00
Lucas Manuel Rodriguez
d2ba34c8fc
Add distributed discovery query support for detail queries, add orbit… (#4597)
* Add distributed discovery query support for detail queries, add orbit_info ingestion

* Amend changes file
2022-03-15 16:51:00 -03:00
Lucas Manuel Rodriguez
f4d3159cc9
Fleetctl to package .app bundles for osquery (and changes for orbit to support them) (#4393)
* WIP

* WIP2

* Fix orbit and fleetctl tests

* Amend macos-app default

* Add some fixes

* Use fleetctl updates roots command

* Add more fixes to Updater

* Fixes to app publishing and downloading

* Add more changes to support fleetctl cross generation

* Amend comment

* Add pkg generation to ease testing

* Make more fixes

* Add changes entry

* Add legacy targets (until our TUF system exposes the new app)

* Fix fleetctl preview

* Fix bool flag

* Fix orbit logic for disabled-updates and dev-mode

* Fix TestPreview

* Remove constant and fix zip-slip attack (codeql)

* Return unknown error

* Fix updater's checkExec

* Add support for executable signing in init_tuf.sh

* Try only signing orbit

* Fix init_tuf.sh targets, macos-app only for osqueryd

* Specify GOARCH to support M1s

* Add workflow to generate osqueryd.app.tar.gz

* Use 5.2.2 on init_tuf.sh

* Add unit test for tar.gz target

* Use artifacts instead of releases

* Remove copy paste residue

* Trigger workflow on PR

* Fixes to ease handling of artifact

* Fix, do not use target name as dir

* Remove workaround
2022-03-15 16:04:12 -03:00
Lucas Manuel Rodriguez
ab9c2307fc
Add orbit_info table extension (#4587) 2022-03-14 19:09:55 -03:00
Zach Wasserman
b9beb6c2de
Update Orbit changelog for 0.0.7 (#4520) 2022-03-08 12:58:45 -08:00
Lucas Manuel Rodriguez
9edda9f3e8
Document result and status logs for Orbit (#4450) 2022-03-04 13:36:53 -03:00
Lucas Manuel Rodriguez
aaf62a9e14
Use filepath for proper multi-platform support (#4449) 2022-03-04 13:30:20 -03:00
Lucas Manuel Rodriguez
b5be858071
Fix update checks for orbit at startup (#3835)
* Fix update checks for orbit at startup

* Add tests

* Add scripts for testing local TUF server

* Remove -x used for debugging
2022-02-23 14:58:07 -03:00
Lucas Manuel Rodriguez
e39ba93a90
Orbit to wait for osqueryd extension manager socket to be ready (#3836)
* Wait for osquery extension manager socket to be ready

* PR review feedback

* Add WIP Github Action to test orbit

* Set fleet address on fleetctl

* Add logging for troubleshooting

* Add prepare db statement

* Use tls-skip-verify on fleetctl

* Move steps around

* Fix addresses

* Fix fleetctl path

* Add certs.pem to orbit root dir

* Add orbit logs

* Increase timeout

* Add proper orbit log paths

* Fix tmp path orbit

* Add get hosts command to troubleshoot

* Fix orbit job termination

* Add comments to workflows

* Wait for server to go down

* Add orbit Windows job

* Use bash on windws-latest

* Fix missing quote

* Run orbit on Ubuntu

* Bump host count

* Increase timeout for extensions and not terminate on err

* Add comment to clarify high timeout value

* Revert change, we do want to exit in case of err
2022-02-22 15:05:32 -03:00
Lucas Manuel Rodriguez
c641e39ef4
Allow disabling auto updates in fleetctl package and orbit (#4296)
* Add disable-updates flag to fleetctl and orbit

* Fix ruleguard execution error on make lint-go

* Introduce dev-mode for ease of development of orbit

* Add changes file
2022-02-18 15:42:39 -03:00
Tomas Touceda
fee7fae579
Set log path to root-dir when calling osquery (#4237)
* Set log path to root-dir when calling osquery

* Update based on review and set filesystem,tls as logging plugin
2022-02-17 09:03:54 -03:00
Nate Felton
68b0a33aee
Linting LaunchDaemon to fix formatting (#4180)
This is the equivalent of running the command
`plutil -convert xml1 com.fleetdm.orbit.plist`
2022-02-16 08:31:27 -03:00
Nate Felton
bb0b56acb7
Update postinstall to use more modern launchctl commands (#4179)
* Update postinstall to use more modern launchctl comamnds

Fixes #3995

* Switching to service-target specifier

* Removing unnecessary kill flag
2022-02-16 08:31:16 -03:00
eashaw
9af92b23aa
Update links to documentation (#4163)
* update links to documentation

* revert .sailsrc change

* fix broken link
2022-02-10 19:26:18 -06:00
Zach Wasserman
1b1d3f8a61
Update go-tuf dependency (#3837)
Resolves the warning described in #3699 by updating to the latest
version of the dependency with the warning fixed.

The warning should go away on all clients after new metadata is 
generated with these changes.
2022-02-10 08:16:36 -08:00
github-actions[bot]
87ef4e464f
Update Orbit CA certs [automated] (#4055)
Generated automatically with curl mk-ca-bundle.pl script.

Co-authored-by: zwass <zwass@users.noreply.github.com>
2022-02-07 10:27:45 -08:00
Zach Wasserman
96d81596f3
Add GitHub action for updating CA certs bundle (#4041)
See #4029
2022-02-07 09:44:31 -08:00
Lucas Manuel Rodriguez
a8135aa928
Fix typo and lint checks (#4013) 2022-02-03 17:06:49 -03:00
Zach Wasserman
80960e47f8
Allow reinstallation of MSI packages (#3958)
Make the necessary changes to the WiX XML to allow the generated MSI
installers to be reinstalled.
2022-01-31 16:09:59 -08:00
Frederico F. de Oliveira
80ef806b2f
linux_shared.go: update postinstall script (#3959)
1. In sh, `which` is actually a binary usually located at `/usr/bin`, but not every GNU/Linux distribution comes with it installed by default. Whereas, `command` is a built-in shell tool, hence, it's safer to use it instead of which to verify if a binary is present in the machine
2. I believe there was a typo in the redirections in the `systemctl daemon-reload 2>/dev/null 2>&1` line
3. The `systemctl enable` command is necessary because the service is created, but not activated, meaning when the user reboots his machine orbit won't automatically relaunch
2022-01-31 15:56:05 -08:00
Lucas Manuel Rodriguez
9f70ffd5c6
Amend fleetctl package tests to not hardcode orbit version (#3898)
* Amend fleetctl package tests to not hardcode orbit version

* Readd Version, it is indeed used

* Fix bool logic

* Readd opt.Version usage
2022-01-31 10:41:11 -03:00
Lucas Manuel Rodriguez
d7e2e33e01
Disable orbit osquery extensions on Windows (#3705)
* Disable orbit osquery extensions on Windows

* Add the same to shell.go
2022-01-14 17:42:38 -03:00
Zach Wasserman
ef42199c57
Improve Orbit debug logging (#3687)
Log reasons for runners terminating.
2022-01-13 16:54:28 -08:00
Zach Wasserman
1dc6ef6226
Orbit 0.0.6 changelog (#3682) 2022-01-13 14:31:58 -08:00
Lucas Manuel Rodriguez
7823bbbaba
Fix orbit and osqueryd logging on Windows (#3521)
* Fix orbit and osqueryd logging on Windows

* Add functionality to test the change and use systemprofile app data

* Add centos syslog to README.md

* Add wait on orbit for osquery extension socket to exist (#3571)

* Wait for osquery extension socket to exist

* Amend changes

* Fix lint

* Restore timeout
2022-01-07 19:32:31 -03:00
Zach Wasserman
08ff4e941c
Make Linux postinstall more permissive (#3550)
In some installations (observed on GitHub Actions), the postinstall
script would fail to start the service because the `systemctl` binary
was at a different path than expected, or the `systemd` binary was not
found running.

This change allows the service to start on these environments.
2022-01-01 15:18:30 -08:00
Zach Wasserman
51b19b445f
Prepare for Orbit 0.0.5 release (#3478) 2021-12-22 16:02:26 -08:00
Zach Wasserman
fa568575d0
Don't strip debugging symbols from Orbit binary (#3477) 2021-12-22 15:58:06 -08:00
Zach Wasserman
d377923750
Fix handling of enroll secret env vars in Orbit (#3458) 2021-12-22 15:57:09 -08:00
Zach Wasserman
3ff3d35f45
Update Orbit changelog for 0.0.4 release (#3415) 2021-12-19 17:38:10 -08:00
Zach Wasserman
698ef79495
Update GitHub goreleaser configuration for Orbit (#3414) 2021-12-19 17:37:54 -08:00
Zach Wasserman
4e72ebb68f
Build Orbit releases in GitHub Actions (#3413)
Complete build including macOS signing+notarization.
2021-12-19 17:06:17 -08:00
Zach Wasserman
050cffa886
Remove Badger DB in Orbit (#3404)
The database is currently unused and sometimes causing problems in Orbit
deployments due to file corruption on Windows. We may need to look at
something less prone to corruption.
2021-12-16 17:20:15 -08:00
Zach Wasserman
a7aa14fa76
Enable function-style file carving in Orbit (#3268) 2021-12-09 09:59:58 -08:00
Zach Wasserman
3a973af164
Fix Windows Orbit packaging with non-stable channel (#3210) 2021-12-07 19:49:57 -08:00
Martin Angers
c997f853e5
Make creation of http.Client uniform across the codebase (#3097) 2021-11-24 15:56:54 -05:00
Martin Angers
69a4985cac
Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
Zach Wasserman
b65c61cb12
Change Orbit osquery to Fleet osquery in generated packages (#3034)
Use "Fleet osquery" rather than "Orbit osquery" in packages generated
 by `fleetctl package`.
2021-11-18 17:43:52 -08:00
Zach Wasserman
83036672d7
Package osquery certificate bundle with orbit (#3033)
- Include the osquery certs.pem with Orbit installers.
- Use the certs.pem if available and no other certificate specified.
2021-11-18 17:17:05 -08:00
Zach Wasserman
73ee2c6b16 Add changes files 2021-11-18 16:52:53 -08:00
Zach Wasserman
01f136313d
Use UUID as default host identifier for Orbit (#3008)
This matches the default identifier used in Fleet's prior recommended
osquery installation, easing migration for users. It can still be
overridden via a flagfile.
2021-11-18 15:15:28 -08:00
Zach Wasserman
3811a63daf
Add osquery flagfile support in Orbit (#3006)
- Orbit automatically loads the flagfile when it exists in the orbit
  root.
- Add packaging support to include flagfile with package.
- Fix a panic when osquery fails to start up.
2021-11-18 15:06:33 -08:00
Zach Wasserman
f97c3949fe
Add additional tables and Windows support in Orbit extension (#2947)
More tables from https://github.com/macadmins/osquery-extension
2021-11-17 16:34:31 -08:00
Victor Vrantchan
a760cdc26d
Add MacAdmins tables in Orbit extension (#2140)
Uses the extension tables from https://github.com/macadmins/osquery-extension.

Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2021-11-15 18:40:53 -08:00