Commit graph

669 commits

Author SHA1 Message Date
Victor Lyuboslavsky
fc33df1981
Basic Android MDM on/off functionality (#26309)
For #26218 

Basic Android MDM on/off backend functionality. Manually tested.

The following env vars must be set:
```
FLEET_DEV_ANDROID_ENABLED=1
FLEET_DEV_ANDROID_SERVICE_CREDENTIALS=$(cat credentials.json)
FLEET_DEV_ANDROID_PUBSUB_TOPIC=projects/your-project/topics/your-topic
```

I picked https://github.com/go-json-experiment/json as the JSON library,
which seems like the safest option.
- will become json/v2 at some point
- currently used in production by other companies, like Tailscale
- well-maintained
- Some context here: https://github.com/fleetdm/fleet/issues/25512

Plan for next work:
- refactoring from 1st PR
- add pubsub with device enroll -> spec proxy for fleetdm.com
- come back to this sub-task to add tests and finish TODOs

# Checklist for submitter

- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-02-18 09:43:11 -06:00
Lucas Manuel Rodriguez
df3954ba44
Fixes to releaser.sh (#26397)
For #26324.

My previous PR broke the script. This fixes it. (I used to release
osqueryd 5.16.0 to edge.)
2025-02-17 19:10:55 -03:00
Lucas Manuel Rodriguez
3ba12fd082
Small improvements to releaser.sh (#26385)
These were discussed during the release of 1.39.0 to our `edge` channel.
2025-02-17 14:10:59 -03:00
Victor Lyuboslavsky
c1e8f36493
Added --update-interval=1m to prompts to help with releasing. (#26263)
Updated releaser.sh script

Increasing the update frequency makes it faster to see the update pushed
out to your local agent.
2025-02-17 12:42:37 -03:00
Victor Lyuboslavsky
4b007e20e1
Android scaffold (#26274)
Android scaffold code and refactorings
- Android packages intended to be decoupled from other Fleet code

Video explaining the PR: https://www.youtube.com/watch?v=cza-35Z9Wxk

# Checklist for submitter

- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-02-13 14:32:19 -06:00
Martin Angers
240f55b9e8
Add script execs and software installs stats to osquery-perf (#26239) 2025-02-11 12:46:53 -05:00
Lucas Manuel Rodriguez
562670961d
Update releaser.sh to use new TUF (#26068)
For #25863.

I will test this script when releasing `1.39.0` to the `edge` channel.
2025-02-07 18:46:13 -03:00
Lucas Manuel Rodriguez
9114d0405b
Update TUF status generation to use new TUF repository (#26099)
For #25853.
2025-02-07 08:30:07 -03:00
Luke Heath
6a0432fd8e
Update release script to reflect new release article URL convention (#26041) 2025-02-06 15:48:21 -06:00
Reed Haynes
943919b1a2
Update Fleetd-auto-update-test-guide.md (#26156)
updating the ordering of commands and adding semantic version for
windows desktop build
2025-02-06 18:47:17 -03:00
Janis Watts
8bc00096d2
Add troubleshooting note to README.md (#26145)
Adding a troubleshooting note to the README.md to address failures to
generate ARM Linux enrollment packages when running Docker Desktop on an
Apple Silicon Mac.

---------

Co-authored-by: Lucas Manuel Rodriguez <lucas@fleetdm.com>
2025-02-06 15:26:10 -06:00
Lucas Manuel Rodriguez
5c5fc1cf1b
Fix local TUF windows orbit build on Apple silicon (#26097) 2025-02-05 18:57:49 -03:00
Scott Gress
94eb573736
Add Fleet dev snapshot tool (#25909)
For #23750 

# Overview

This PR adds a basic tool for creating and restoring Fleet dev
snapshots. In this first iteration a snapshot is just a folder
containing a MySQL db dump made using the existing backup/restore
scripts, and the tool allows you to easily save and restore snapshots
interactively.

## Usage

* `make snapshot` to create a new snapshot
* `make restore` to select and restore a snapshot 

## Future plans

Future iterations can add metadata to snapshots to integrate things
like:

* node keys from osquery-perf, so you can easily reconnect to hosts
created in a previous session
* env vars from when the snapshot was made
* the branch from when the snapshot was made, to allow switching to that
branch and restarting the server as part of the restore process
*
![image](https://github.com/user-attachments/assets/6dc86581-5c12-4b57-b900-5034e00bc496)

## Demo


https://github.com/user-attachments/assets/1590c37a-3df9-4201-a42b-ccd1a36cb6cf
2025-02-05 09:52:10 -06:00
Luke Heath
5e83ba6cc8
Adding changes for Fleet v4.63.0 (#25433) 2025-02-04 13:55:00 -06:00
Luke Heath
647c24042e
Simplify release prompt for accuracy (#26036) 2025-02-04 13:50:12 -06:00
George Karr
9e5ecfb1bc
Adding changes for Fleet v4.62.3 (#25768)
Co-authored-by: Robert Fairburn <8029478+rfairburn@users.noreply.github.com>
2025-01-29 07:49:45 -06:00
Lucas Manuel Rodriguez
a4db139e82
Remove fleetctl binary from fleetdm/fleet image and remove unused Dockerfile (#25749)
For #25748.

Manually tested by:
1. Building a `fleet` executable for Linux on a Ubuntu VM (with
`-extldflags "-static"`) for Alpine.
2. Placing the executable in `tools/fleet-docker`.
3. Building a local docker image using `docker build -t
fleetdm/fleet:v42.42.42 --platform=linux/amd64 .`.
4. Running the docker image (using `docker run`) and use Fleet on the
browser.
```
docker run -v $(pwd)/../osquery:/run -p 8412:8412 -e FLEET_MYSQL_ADDRESS=host.docker.internal:3306 -e FLEET_MYSQL_DATABASE=fleet -e FLEET_MYSQL_USERNAME=fleet -e FLEET_MYSQL_PASSWORD=insecure -e FLEET_REDIS_ADDRESS=host.docker.internal:6379 -e FLEET_SERVER_ADDRESS=0.0.0.0:8412 -e FLEET_SERVER_CERT=/run/fleet.crt -e FLEET_SERVER_KEY=/run/fleet.key -e FLEET_LOGGING_JSON='true' -e FLEET_VULNERABILITIES_CURRENT_INSTANCE_CHECKS="yes" -e FLEET_VULNERABILITIES_DATABASES_PATH=/vulndb -e FLEET_LOGGING_DEBUG='true' -it fleetdm/fleet:v42.42.42
```

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
2025-01-28 19:58:20 -03:00
Luke Heath
b0de218606
Clean up engineering docs (#25708)
No additions, just cleaning up organization and moving some things
around.
2025-01-23 16:20:42 -06:00
Lucas Manuel Rodriguez
9ec02dff0b
Fix migration script to add arm64 on second and third generation of p… (#25737) 2025-01-23 18:19:17 -03:00
Lucas Manuel Rodriguez
d6e026982a
Update migration_test.sh (#25707) 2025-01-22 20:04:13 -03:00
Lucas Manuel Rodriguez
5c6fe54a10
Update migration_test.sh (#25696) 2025-01-22 18:01:05 -03:00
Reed Haynes
ede9086e0a
Update migration_test.sh (#25693)
add prompt when downgrading hosts to 1.37
2025-01-22 18:00:26 -03:00
Luke Heath
ce012687cc
Adding changes for Fleet v4.62.2 (#25564) 2025-01-17 14:55:09 -06:00
George Karr
5cbf1fa3fc
Update publish_release.sh (#25435)
Just updating publish script to fix new qa and teams
2025-01-17 14:38:39 -06:00
Lucas Manuel Rodriguez
14d7749138
Migration script to support multiple hosts and rpm and arm64 (#25542) 2025-01-17 14:13:27 -03:00
Lucas Manuel Rodriguez
4b523bc6ae
Add support for universal binary on test migration script (#25483) 2025-01-16 13:07:09 -03:00
Lucas Manuel Rodriguez
70096e86ac
Changes for migration TUF QA (#25468) 2025-01-15 18:36:53 -03:00
George Karr
a672ff8f1d
Adding changes for Fleet v4.62.1 (#25417) 2025-01-14 15:19:54 -06:00
Lucas Manuel Rodriguez
f1705280fe
Add instructions to use ngrok for migration testing (#25420)
Adding some capabilities to test migration locally with ngrok. To test
HTTPS.
2025-01-14 17:25:05 -03:00
Luke Heath
4cca22384d
Adding changes for Fleet v4.62.0 (#25092)
Ready for review.
2025-01-13 16:23:26 -06:00
dependabot[bot]
de530407f2
Bump golang.org/x/net from 0.25.0 to 0.33.0 in /tools/terraform (#25342) 2025-01-10 13:32:34 -06:00
Lucas Manuel Rodriguez
009f54bdda
Changes to migrate to new TUF repository (#23588)
# Changes

- orbit >= 1.38.0, when configured to connect to
https://tuf.fleetctl.com (existing fleetd deployments) will now connect
to https://updates.fleetdm.com and start using the metadata in path
`/opt/orbit/updates-metadata.json`.
- orbit >= 1.38.0, when configured to connect to some custom TUF (not
Fleet's TUFs) will copy `/opt/orbit/tuf-metadata.json` to
`/opt/orbit/updates-metadata.json` (if it doesn't exist) and start using
the latter.
- fleetctl `4.63.0` will now generate artifacts using
https://updates.fleetdm.com by default (or a custom TUF if
`--update-url` is set) and generate two (same file) metadata files
`/opt/orbit/updates-metadata.json` and the legacy one to support
downgrades `/opt/orbit/tuf-metadata.json`.
- fleetctl `4.62.0` when configured to use custom TUF (not Fleet's TUF)
will generate just the legacy metadata file
`/opt/orbit/tuf-metadata.json`.

## User stories

See "User stories" in
https://github.com/fleetdm/confidential/issues/8488.

- [x] Update `update.defaultRootMetadata` and `update.DefaultURL` when
the new repository is ready.
- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [X] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [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)).
2025-01-10 14:27:30 -03:00
Ian Littman
6014908ab6
Correct fix for long MSI interned strings (#25104)
h/t https://github.com/binref/refinery/issues/72, for #24720. No changes
file as this is an unreleased bug.

Also added output for version in the custom package parser tool.

# 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/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
2025-01-02 14:43:36 -06:00
Lucas Manuel Rodriguez
2781193cdd
Added fleetd docker images to test/develop linux fleetd features (#25027)
Useful while testing/developing #24385.

In the future we can push some of these to Fleet's Docker Hub and
include them in `fleetctl preview` to allow demoing of e.g. script
execution on linux devices.
2024-12-27 16:16:39 -03:00
Lucas Manuel Rodriguez
963cc7e22c
Automatic install custom packages (#25021)
#24385

Some docs change here: https://github.com/fleetdm/fleet/pull/25026.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
2024-12-27 15:10:28 -03:00
Luke Heath
ace2fa3f9f
Adding changes for Fleet v4.61.0 (#24407) (#24904) 2024-12-19 10:09:22 -06:00
RachelElysia
8888127998
Fleetctl: Update dependencies, improve error handling, ensure compatibility (#24845) 2024-12-18 11:22:01 -05:00
dependabot[bot]
39e71cf5e0
Bump golang.org/x/crypto from 0.21.0 to 0.31.0 in /tools/terraform (#24715) 2024-12-13 14:59:19 -06:00
Ian Littman
07852b4c60
Bump Go version from 1.23.1 to 1.23.4, Alpine on Docker images from 3.20 to 3.21 (#24518)
Kept the Debian-based image at Bullseye.

For #24517.

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality: Validated builds
(Docker and make) all work after this change, except for BitLocker
(requires Windows).
2024-12-09 11:06:07 -06:00
Tim Lee
e3d9801f6d
add kdialog for kubuntu key escrow (#24405) 2024-12-05 08:44:16 -07:00
Tim Lee
7547dcb74e
bugfix: orbit linux zenity progress windows (#24280) 2024-12-05 08:02:03 -07:00
George Karr
d0cb6b8629
Adding changes for Fleet v4.60.1 (#24332) 2024-12-04 18:16:27 -06:00
Martin Angers
7d3b11a10c
Merge branch 'main' into feat-automatic-migrate-windows-hosts 2024-12-03 11:07:25 -05:00
Luke Heath
b312bb99e5
Adding changes for Fleet v4.60.0 (#23817) (#24294) 2024-12-03 10:03:37 -06:00
Martin Angers
aa8e20f21e
Merge branch 'main' into feat-automatic-migrate-windows-hosts 2024-12-02 16:12:30 -05:00
Luke Heath
4b5de2646a
Remove fleetctl check from release script (#24275) 2024-12-02 12:35:05 -06:00
Martin Angers
c27c859b3a
Windows MDM migration: implement fleetd notification and migration (#24185) 2024-12-02 09:14:10 -05:00
Martin Angers
c4404d9d68
Windows MDM Migration: API, CLI and activities (#24141) 2024-11-26 11:52:56 -05:00
Lucas Manuel Rodriguez
5cb85603a7
Lock rust dependencies for apple-codesign (#24123)
Fixes the following failures:
https://github.com/fleetdm/fleet/actions/runs/11984354126/job/33415026230
2024-11-25 11:04:21 -03:00
Tim Lee
ee1c3c5b8d
Linux Key Escrow - Agent (#23771) 2024-11-21 09:31:03 -07:00