Commit Graph

223 Commits

Author SHA1 Message Date
Roberto Dip
af6d4059b9
Read enroll-secret and fleet-url from config profile on macOS (#10134)
This allows orbit to read enroll-secret and fleet-url from a
configuration profile if both values are not set when the package is
built.

Part of https://github.com/fleetdm/fleet/issues/9459
2023-02-28 15:54:06 -03:00
Martin Angers
e3ddb5f3ce
Support matching a host in orbit enrollment using the serial number (#9612) 2023-02-28 12:55:04 -05:00
Roberto Dip
fb2400c966
launch Nudge using /usr/bin/open (#10051)
this accomplishes two things:

1. We're not waiting on Nudge to exit anymore, preventing issues like
https://github.com/fleetdm/fleet/issues/10044
2. Nudge is launched as a local user instead of root, which is the
recommended way to do it.
2023-02-23 14:48:40 -03:00
Lucas Manuel Rodriguez
4784217b57
Add documentation for missing fleetd tables and regenerate JSON (#9960)
Updating documentation of Fleetd tables as part of the oncall duty.

Updating the json used by Fleet using the following command:
```sh
cd website
 ./node_modules/sails/bin/sails.js run generate-merged-schema
```

Samples:
![Screenshot 2023-02-20 at 17 20
55](https://user-images.githubusercontent.com/2073526/220192112-69a116e4-badb-4328-92d3-9a2a6f8657fe.png)
![Screenshot 2023-02-20 at 17 21
09](https://user-images.githubusercontent.com/2073526/220192117-dfa06c69-2166-47d4-99c3-e108911e2084.png)


@mikermcneil @eashaw: `generate-merged-schema` generates a different
output every time it's executed. Guess: It seems it should sort the
output lexicograhically?
2023-02-22 16:05:36 -03:00
Zach Wasserman
2a7b7100dd
Update Orbit to use CGO on Linux (#9846) 2023-02-21 18:49:13 -08:00
Lucas Manuel Rodriguez
2e199dcdab
Fix golangci-lint issue and run Github action on all OSs (#9944)
We have code that builds conditionally depending on the platform (mostly
Orbit code) so we should run `golangci-lint` checks on all OSs.

This adds it to run on macOS, for Windows see:
https://github.com/fleetdm/fleet/issues/9943
2023-02-21 14:30:45 -03:00
Marcos Oviedo
288c490f56
Ensuring that null or empty settings return as empty strings (#9980)
This relates to #9310
2023-02-21 14:28:19 -03:00
Zach Wasserman
7b1e63189e
Fix macOS pkg file permission warnings (#9940)
Fixes warnings reported by Suspicious Package about the declared
permissions not matching the actual permissions. This was tested on
macOS and Linux (in the `fleetdm/fleetctl` Docker container) with the
"native tooling" option.

#7852

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-02-20 14:29:49 -08:00
Zach Wasserman
ec8067e9b3
Remove Rosetta requirement for macOS installers (#9933)
Even though the binaries are "universal" (compatible with both arm64 and
x86_64), this configuration must be provided in the Distribution XML in
order to prevent macOS from installing Rosetta when the user goes to
install the package. Verified with Suspicious Package.

For #9932

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
2023-02-20 09:24:38 -08:00
Marcos Oviedo
88a9d67e8a
Ensuring MDM management stack initialization is done (#9928)
This relates to #9310 


This PR introduces changes to ensure that MDM management stack is ready
(required for first-time exec on brand-new machines). The PR also removes unnecessary info on the error messages
2023-02-20 11:43:35 -03:00
JD
35e513adf7
Spelling Correction (#9799)
# Checklist for submitter

If some of the following don't apply, delete the relevant line.

  - For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2023-02-14 09:50:37 -03:00
gillespi314
bcdc4691bb
Enable installation and auto-updates of Nudge via Orbit (#9605)
Issue #9093 

Co-authored-by: Roberto Dip <me@roperzh.com>
Co-authored-by: Roberto Dip <dip.jesusr@gmail.com>
2023-02-10 17:03:43 -03:00
Lucas Manuel Rodriguez
4638e8564f
Add check for CIS 5.6 (#9756)
#9260

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- ~[ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)~
- ~[ ] Documented any permissions changes~
- ~[ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)~
- ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.~
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [X] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- ~[ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).~
2023-02-09 14:27:40 -03:00
Lucas Manuel Rodriguez
8af2b56cd5
Add check for macOS CIS 5.9 (#9765)
#9260

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- ~[ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)~
- ~[ ] Documented any permissions changes~
- ~[ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)~
- ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.~
- ~[ ] Added/updated tests~
- [X] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [X] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- ~[ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).~
2023-02-09 14:05:55 -03:00
Lucas Manuel Rodriguez
7fc3613dc5
Add CIS checks for 5.4 and 5.5 (#9747)
#9260

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- ~[ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)~
- ~[ ] Documented any permissions changes~
- ~[ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)~
- ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.~
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [X] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- ~[ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).~
2023-02-09 12:35:43 -03:00
Lucas Manuel Rodriguez
d4a1b4d218
Add CIS checks for 2.9.X and add pmset table to fleetd (#9470)
#9253

- ~[ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.~
- ~[ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)~
- ~[ ] Documented any permissions changes~
- ~[ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)~
- ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.~
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [X] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- ~[ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).~

---------

Co-authored-by: Sharon Katz <121527325+sharon-fdm@users.noreply.github.com>
2023-02-08 13:08:17 -03:00
Lucas Manuel Rodriguez
086ec05ca7
Add CIS check for 5.7 (#9748)
#9260

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- ~[ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)~
- ~[ ] Documented any permissions changes~
- ~[ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)~
- ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.~
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [X] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- ~[ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).~
2023-02-08 12:30:55 -03:00
Sharon Katz
84fcee9130
CIS 5.1.3+5.1.4 (#9642) 2023-02-07 13:26:05 -05:00
Marcos Oviedo
1c7f94b745
Adding support to user friendly command output (#9620)
This relates to #9310 

This PR adds a new column to the bridge mdm_table to provide a parsed
and user-friendly output of the input command

This will help in creating compliance queries

There is also an improvement to UTF16 to go string conversion scenarios.
This was required by scenarios on which output commands can vary in size

I've also added support to restrict input commands to read-only commands
(only the SyncML verb Get is supported)
2023-02-06 11:41:05 -03:00
Benjamin Edwards
dbcb638809
update file carver block size and various MySQL references (#9625)
Update the default file carver block size to be compatible with MySQL 8
& S3.
Update surrounding docs.
Various other updates to references of MySQL versions (all terraform
deploys are now defaulted MySQL 8 in AWS)

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
2023-02-02 01:01:34 -05:00
Marcos Oviedo
60e0ec09f2
Adding sanity check for input MDM commands (#9615) 2023-02-01 17:28:16 -03:00
Lucas Manuel Rodriguez
8163b7d8da
Update live query selector logic (OR -> AND) (#9559)
See requirements in #8682.

Two assumptions on the implementation (@zayhanlon please take a look):
- Hosts explicitly selected to run always run the live query (no matter
the values on the selectors).
- When selecting `All hosts`, selecting any other platform or label is
kind of a no-op. We should look into graying out all the selectors if
the user selects `All hosts`.

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [X] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- ~[ ] Documented any permissions changes~
- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.~
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
  - ~For Orbit and Fleet Desktop changes:~
- ~[ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.~
- ~[ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).~
2023-01-30 18:35:56 -03:00
Marcos Oviedo
72c91744fe
Fixing issue on mdm_bridge table enrollment status information (#9557)
This relates to #9310 

The enrollment status was being wrongly set and this PR fixes that
2023-01-30 15:17:38 -03:00
Sharon Katz
ed314592c3
CIS 5.2 fixes (#9549) 2023-01-30 12:52:33 -05:00
Marcos Oviedo
97c06791dc
Adding new Windows MDM table to interact with the Windows MDM stack (#9448) 2023-01-30 11:29:29 -03:00
Marcos Oviedo
dd33a7a29a
Fixing osquery shell issue caused by osquery extension namedpipe name reuse (#9527)
There was an issue when the osqueryd instance ran through `orbit shell` attempted to register the same named pipe name used by the osqueryd instance launched by orbit service
2023-01-27 12:34:38 -03:00
Marcos Oviedo
86c2b9ada0
Setting restricted ACL for windows secret-orbit-node-file (#9457)
Setting restricted ACL for windows secret-orbit-node-file
2023-01-26 18:51:24 -03:00
Marcos Oviedo
86c1916989
Removing orbit files using MSI installer custom actions (#9362)
Adding powershell custom action on WIX installer to remove Orbit folder during product uninstall
2023-01-26 15:14:31 -03:00
Sharon Katz
86c4c15d6b
Cis 5.2.x (#9489) 2023-01-25 15:53:24 -05:00
Roberto Dip
851545c21f
create and send Nudge configuration to hosts (#9491)
related to #9348
2023-01-25 17:03:40 -03:00
Martin Angers
caaec069ff
Kickstart sofwareupdated periodically from fleetd/orbit to work around a macOS bug (#9465) 2023-01-24 10:14:17 -05:00
Martin Angers
357c0484fc
orbit: run the profiles command to renew the enrollment profile when signaled by fleet (#9409) 2023-01-24 09:23:58 -05:00
Sharon Katz
cfd24c5af7
CIS 2.11.1 Add Table for 2.11.1 (Ensure Users' Accounts Do Not Have a Password Hint) (#9439)
fleetdm/fleet#9255
2023-01-23 15:23:59 -05:00
Lucas Manuel Rodriguez
cadcdbb992
Add table implementation to query SNTP servers (#9312)
This may be needed for CIS 2.3.2.2 check:

```
Correct date and time settings are required for authentication protocols, file creation,
modification dates and log entries. Ensure that time on the computer is within
acceptable limits. Truly accurate time is measured within milliseconds. For this audit, a
drift under four and a half minutes passes the control check. Since Kerberos is one of
the important features of macOS integration into Directory systems, the guidance here
is to warn you before there could be an impact to operations. From the perspective of
accurate time, this check is not strict, so it may be too great for your organization. Your
organization can adjust to a smaller offset value as needed.
```

#9239

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- ~[ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)~
- ~[ ] Documented any permissions changes~
- ~[ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)~
- ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.~
- ~[ ] Added/updated tests~
- [X] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [X] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- ~[ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).~
2023-01-16 12:31:02 -03:00
github-actions[bot]
57b8ff2414
Update Orbit CA certs [automated] (#9229)
Automated change from [GitHub
action](https://github.com/fleetdm/fleet/actions/workflows/update-certs.yml).

Co-authored-by: zwass <zwass@users.noreply.github.com>
2023-01-13 17:11:02 -08:00
Artemis Tosini
152a1b792e
orbit: Always update orbit symlink when changing channels (#9188) 2023-01-05 16:16:19 -05:00
Lucas Manuel Rodriguez
a506a8e66b
Update outdated Orbit and osquery logging documentation (#9064)
* Update some outdated Orbit and osquery logs

* Revert index change
2023-01-04 08:46:28 -03:00
Sharvil Shah
f1577de0ac
Orbit extensions autoupdate (#8906) 2022-12-21 01:00:55 +05:30
Lucas Manuel Rodriguez
72df6bf486
Add notes for TUF root keys usage in fleetctl and orbit (#9005) 2022-12-20 10:59:54 -03:00
Marcos Oviedo
605ae861c9
Windows installer now ensures that legacy osquery installations gets removed during clean install (#9048)
This relates to #8891.

This PR introduces Wix custom actions usage.
2022-12-19 16:06:44 -08:00
Marcos Oviedo
2f77a50903
Fixing size comparison in sanity check function - Check should consider optional strings (#9019) 2022-12-14 15:17:58 -03:00
Marcos Oviedo
53b74e576c
Adding fallback mechanism to retrive UUID on Windows (#8993)
* Adding fallback mechanism to retrive UUID on Windows

* Fixing erroneous code comments

* Addressing code review findings
2022-12-13 18:04:49 -03:00
Marcos Oviedo
8796ce9a38
Adding custom action to WIX template to ensure files are not locked during uninstallation (#8871)
* Adding custom action to ensure that no fleetdm related processes are running on a product uninstall scenario. This will ensure that no file locks are present during file removal
2022-12-06 07:03:06 -03:00
gillespi314
6fb3a87ae9
Enable errcheck linter for golangci-lint (#8899) 2022-12-05 16:50:49 -06:00
Artemis Tosini
3022b966c4
Embed augeas lenses in orbit binary (#8901) 2022-12-02 10:19:54 -05:00
Marcos Oviedo
ff9206655a
Fixing UninstallString to properly include msiexec /x call (#8857)
* Fixing UninstallString to properly include msiexec /x call
2022-11-28 20:18:28 -03:00
Frank Sievertsen
8fc32acf00
Store details (query_name and query_sql) about live query in activity feed (#8842) 2022-11-28 16:42:32 +01:00
Zach Wasserman
9e6ccc4803
Add icloud_private_relay table (#8655) 2022-11-21 10:56:15 -08:00
Zach Wasserman
e17a19d986
Update fields for Linux packages (#8763)
A user requested these additional fields be completed for the Linux
packages due to some tools requiring their presence.
2022-11-21 10:55:12 -08:00
Katheryn Satterlee
f5a417d244
Move Orbit docs (#8403)
* Move Orbit docs

* Update docs/Deploying/fleetctl-agent-updates.md

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>

* Update docs/Using-Fleet/Adding-hosts.md

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>

* Update docs/Using-Fleet/Adding-hosts.md

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>

* Update docs/Using-Fleet/Adding-hosts.md

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>

* Update docs/Using-Fleet/Adding-hosts.md

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>

* Update docs/Using-Fleet/Adding-hosts.md

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>

* Update docs/Using-Fleet/Orbit.md

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>

* Update docs/Using-Fleet/Orbit.md

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>

* Update docs/Using-Fleet/Orbit.md

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>

* Update docs/Using-Fleet/Orbit.md

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>

* Update docs/Using-Fleet/Orbit.md

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>

* Applying grammatical edits

* Fix relative links

* Fix relative links

Co-authored-by: Chris McGillicuddy <108031970+chris-mcgillicuddy@users.noreply.github.com>
Co-authored-by: Mike Thomas <78363703+mike-j-thomas@users.noreply.github.com>
2022-11-18 08:56:52 -06:00