Commit Graph

95 Commits

Author SHA1 Message Date
Noah Talerman
1777b9c5d1
Update macos-install-wine.sh (#17828)
- Add note about running the script in user context
- Add redirect so that we can change the link later
2024-03-27 11:21:19 -04:00
github-actions[bot]
0856c44544
Update Orbit CA certs [automated] (#17556)
Automated change from [GitHub
action](https://github.com/fleetdm/fleet/actions/workflows/update-certs.yml).

Co-authored-by: zwass <zwass@users.noreply.github.com>
2024-03-13 07:55:50 -03:00
github-actions[bot]
6fbee3fc8f
Update Orbit CA certs [automated] (#15576)
Automated change from [GitHub
action](https://github.com/fleetdm/fleet/actions/workflows/update-certs.yml).

Co-authored-by: zwass <zwass@users.noreply.github.com>
2024-02-23 09:59:03 -08:00
Lucas Manuel Rodriguez
5360029d67
Allow custom osquery database on fleetd (#16554)
#16014

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
- [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.
- [x] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2024-02-05 09:41:06 -03:00
Victor Lyuboslavsky
ed7ab1e428
Fixed macOS MSI package -- using local wine and wix (#16307)
New flow for `fleetctl --package --type=msi` on macOS using arm64
processor (M1, M2, etc.)
- wine must be installed locally. See
./orbit/tools/build/install-wine-macos.sh and
https://wiki.winehq.org/MacOS for reference.
- --local-wix-dir can be used to point to a local Wix3 installation
(using this switch requires a current Fleet EE subscription)
#15463 

PR for docs: https://github.com/fleetdm/fleet/pull/16459

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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

---------

Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
2024-01-30 11:08:21 -06:00
Victor Lyuboslavsky
ab4c505f4b
Enroll secret in macOS keychain and Windows Credential Manager (#16068)
#13832

For macOS hosts, fleetd now stores and retrieves enroll secret from
macOS keychain.
- this feature must use the official signed and notarized version of
fleetd
- for contributors, this feature can disabled with either:
  - fleetctl package flag: --disable-keystore
  - fleetd runtime flag: --disable-keystore

This feature does not cover the MDM usecase where enroll secret is
stored in the MDM profile. This usecase will hopefully be worked on next
sprint with the MDM team.

For Windows hosts, fleetd now stores and retrieves enroll secret from
Windows Credential Manager.

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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
  - For Orbit and Fleet Desktop changes:
- [x] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [x] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2024-01-16 06:51:37 -06:00
Victor Lyuboslavsky
ebf1650671
device_token endpoint improvements (#15849)
Fixed badly formatted error messages in /api/fleet/orbit/device_token
endpoint and others.
In /api/fleet/orbit/device_token:
- Added token validation -- empty token not allowed
- Replaced 500 error with 409 when token conflicts with another host

#15832 

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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
2023-12-28 14:20:36 -06:00
Martin Angers
2e8da551d0
Custom email device-mapping: implement the CLI (fleetd + fleetctl) changes (#15763)
Co-authored-by: Sarah Gillespie <73313222+gillespi314@users.noreply.github.com>
2023-12-21 11:22:59 -06:00
Lucas Manuel Rodriguez
024a20ac11
Allow enrolling fleetd using osquery's instance identifier (#15570)
#14879

- [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
  - For Orbit and Fleet Desktop changes:
- [x] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [x] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2023-12-15 15:26:32 -03:00
Marcos Oviedo
097114e8f5
Fix windows installer orbit delete pending (#15301)
Relates to #14958 

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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.
- [ ] 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-11-23 12:29:40 -03:00
Jahziel Villasana-Espinoza
5131879292
feat: remove file if it exists before creating new one (#15186)
# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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-11-22 14:04:38 -05:00
George Karr
51772873bc
Update to latest gon with notarytool until we find a better solution (#14918)
Co-authored-by: Roberto Dip <dip.jesusr@gmail.com>
2023-11-03 18:56:30 -05:00
guangwu
33858d7301
chore: remove refs to deprecated io/ioutil (#14485)
# Checklist for submitter

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

- [ ] 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 (docs/Using
Fleet/manage-access.md)
- [ ] 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
- [ ] 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)).

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-10-27 15:28:54 -03:00
Benjamin Edwards
71709e5ef9
Handle RPM upgrade in %postun script (#14379)
This pull request addresses a key aspect of the RPM upgrade process -
handling of scripts during upgrades vice pure deletion events.

An RPM upgrade operation consists of both an Install and an Uninstall
operation, meaning that during an upgrade, our %postun script is run and
previously, it was causing the accidental deletion of binaries needed
for the upgrade.

To prevent this unwanted removal during upgrade scenarios, the %postun
script now checks for the execution scenario in which it finds itself.
2023-10-27 12:29:09 -04:00
Jacob Shandling
b6f072775f
Add ability for fleetctl package to use local WiX v3 binaries when generating installer .msi (#14033) 2023-09-22 08:49:01 -07:00
Roberto Dip
b50e1939db
Allow to configure fleetd for script execution (#13564)
Related to #13310 and #13304 this adds two ways to enable script
execution in `fleetd` (the orbit component)

- By building a package with `--enable-scripts`
- By providing a setting via a configuration profile (macOS only)

Due to how the profile assignment works, this change automatically
updates the `com.fleetdm.fleetd.config` for hosts that already have the
profile installed.

> [!NOTE]
> Documentation is in
[#13577](https://github.com/fleetdm/fleet/pull/13577) to decouple
reviews.
2023-08-30 10:18:34 -03:00
github-actions[bot]
7f19069f38
Update Orbit CA certs [automated] (#13446)
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-08-22 06:01:58 -03:00
Roberto Dip
ac25d8f581
remove quotes from FLEET_URL property in Windows templates (#13190)
related to #13175 and #13186
2023-08-08 16:36:33 -03:00
Marcos Oviedo
7cfea0787e
Windows Installer changes to support MDM Azure flow (#13025)
This relates to #12600 

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
- [X] Manual QA for all new/changed functionality
2023-07-31 12:12:06 -03:00
github-actions[bot]
d2b49931ca
Update Orbit CA certs [automated] (#12028)
Automated change from [GitHub
action](https://github.com/fleetdm/fleet/actions/workflows/update-certs.yml).

Co-authored-by: zwass <zwass@users.noreply.github.com>
Co-authored-by: Lucas Manuel Rodriguez <lucas@fleetdm.com>
2023-07-05 15:04:51 -03:00
Juan Fernandez
827c4a7c33
Feature 8058: Added resource.syso metadata file (#10783)
Addresses https://github.com/fleetdm/fleet/issues/8058, https://github.com/fleetdm/fleet/issues/11012 and https://github.com/fleetdm/fleet/issues/11013

This PR adds a new VERSIONINFO metadata file using the
https://github.com/josephspurrier/goversioninfo library.
2023-05-17 18:53:25 -03:00
Lucas Manuel Rodriguez
7dadec3ecf
Add mTLS support to fleetd (#11319)
#7970

- [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.
- [x] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2023-04-27 08:44:39 -03:00
Roberto Dip
670492c129
Write an enroll secret to osquery when it's read from config profile (#11066)
#11065

Since `secret.txt` is written when the installer is built, but
installers using `--use-system-config` don't have an enroll secret at
build time, this file was empty and causing osquery to have trouble
enrolling.

This PR writes the file when the values are read from a configuration
profile.
2023-04-07 19:34:16 -03:00
Marcos Oviedo
9f6c803b4f
Adding fix to not use COM installer object (#9661)
This relates to #9576
2023-04-06 17:26:33 -03:00
Roberto Dip
1516caad46
explicitly enable orbit to read config from the system (#10980)
in #10134 we added a silent mechanism to try to read configuration
values from macOS configuration profiles if --fleet-url and
--enroll-secret weren't present.

while using this logic to test #9459 I have found that there's a race
condition where sometimes `fleetd` is installed before the configuration
profile with the values delivered by Fleet, causing orbit to get stuck
forever.

I added logic to loop every 30 seconds and try to fetch the values again
if none are found, but I didn't felt comfortable adding this logic
without also adding an extra flag to explicitly enable this behavior.
2023-04-05 15:02:18 -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
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
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
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
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
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
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
Marcos Oviedo
131cc7eeec
Orbit MSI installer now includes the necessary manifest file to use windows_event_log as a logger_plugin. (#8343)
* Orbit MSI installer now includes the necessary manifest file to use windows_event_log as a logger_plugin
2022-10-27 10:19:30 -03:00
Marcos Oviedo
8b77939494
Fixed an Orbit MSI installer bug that caused Orbit files not to be removed during uninstallation (#8333) 2022-10-25 09:00:37 -03:00
Lucas Manuel Rodriguez
b016fc8a3a
Orbit: Add retries to launchctl bootstrap to fix issue with MDM push (#8187)
* Add retries to launchctl bootstrap to fix MDM push

* Increment retries from 5 to 30
2022-10-12 15:59:01 -03:00
Lucas Manuel Rodriguez
bec3824ddb
Update mk-ca-bundle.pl tool in repository (#8184)
* Update mk-ca-bundle.pl in repository

* Update certs.pem with new version of mk-ca-bundle.pl

* Add extra check against curl.se site
2022-10-12 12:01:18 -03:00
Zach Wasserman
44dc5ab175
Add handling for Apple Team ID in Notarization (#7991)
Fleet's Notarization workflows no longer work without this argument, so this is added as an optional argument for Notarization.
2022-10-04 09:48:21 -07:00
Zach Wasserman
bdad9ac1d3
Use Group SID on fleetctl on Windows (#7854)
This is intended to allow packages to be built on localizations other than English.

See #5065.

Co-authored-by: Lucas Rodriguez <lucas@fleetdm.com>
2022-09-21 11:39:26 -07:00
Shawn Maddock
8e9396c65c
fixes #7856 (#7858) 2022-09-20 19:41:22 -03:00
Roberto Dip
15c93f02ea
add retry logic for native notarization and codesigning (#7806)
Related to #7130, this adds logic to retry native notarization up to three times if it fails for some reason.

Since we're adding retries in various places, I added a new package under pkg for this purpose.
2022-09-19 13:08:39 -03:00
Tomas Touceda
8457e55b53
Bump go to 1.19.1 (#7690)
* Bump go to 1.19.1

* Bump remaining go-version to the 1.19.1

* Add extra paths for test-go

* Oops, putting the right path in the right place

* gofmt file

* gofmt ALL THE THINGS

* Moar changes

* Actually, go.mod doesn't like minor versions
2022-09-12 20:32:43 -03:00
Roberto Dip
6fead4c08d
better handling of path differences for MSI installers (#7035)
Related to #7036, Tested in:

- [x] macOS via `fleetctl package --type=msi` (non-native)
- [x] Linux native via `docker run -v "$(pwd)" fleetdm/fleetctl package --type=msi` (native)
- [x] Windows via `fleetctl pacakge --type=msi` (thanks to @edwardsb) (non-native)
2022-08-05 17:12:05 -03:00
Artemis Tosini
b56d2e452e
Stop the previous desktop agent when updating on macOS. Fixes #6441 (#7015) 2022-08-02 17:03:14 -04:00
Roberto Dip
5a44d01566
update documentation of orbit/pkg/packaging (#6819)
This updates the documentation of orbit/pkg/packaging mainly to note that the exported functions are not safe for concurrent usage (subject to change.)
2022-07-25 20:14:20 -03:00
Roberto Dip
d63f56f8c0
add support for notarization in fleetdm/fleetctl images (#6818)
#6674
2022-07-25 20:06:10 -03:00
github-actions[bot]
f4cdf921d0
Update Orbit CA certs [automated] (#6735)
Generated automatically with curl mk-ca-bundle.pl script.

Co-authored-by: zwass <zwass@users.noreply.github.com>
2022-07-19 08:00:40 -03:00
Lucas Manuel Rodriguez
ae27d42a37
Add blueprint for Fleet Packager service (#6229)
* Add blueprint for fleet packager service

* Fix formatting

* Add rate-limit comments and remove API versioning

* Add review comments and notarization alternative

* Other optimizations

* Add storing of state and fix typo

* Add error case for /create

* Add installers for Sandbox document

* Remove already done optimization

* Add S3 alternative to package storage

* Move to proposals directory

* Last amends to specs

* Add fleetctl proposal

* Add comment from Guillaume
2022-07-18 14:30:17 -03:00
Roberto Dip
f7dd8c86cd
implement a docker image to package orbit natively in Linux (#6504)
Related to #6364 and #6363, this:

- Adds a new Docker image, `fleetdm/fleetctl` equipped with all necessary dependencies to build Fleet-osquery binaries for all platforms
- Modifies the package generation logic to special case this scenario via an environment variable `FLEETCTL_NATIVE_TOOLING`
- Adds a new GitHub workflow to test this

There are more details in the README, but part of the special-casing logic is in place to output the binaries to a folder named `build` when they are run with `FLEETCTL_NATIVE_TOOLING`, this is so we can persist the binary generated by the docker container via a bind mount:

```bash
docker run -v "$(pwd):/build" fleetdm/fleetctl package --type=msi
```

To test this changeset, I have generated packages for all platforms, both via the new Docker image and via the classic `fleetctl package`.
2022-07-11 09:49:13 -03:00
github-actions[bot]
356d691695
Update Orbit CA certs [automated] (#5366)
Generated automatically with curl mk-ca-bundle.pl script.

Co-authored-by: zwass <zwass@users.noreply.github.com>
2022-06-22 08:37:54 -03:00