Commit Graph
443 Commits
Author SHA1 Message Date
Dante Catalfamo 3e55ddd955 Add macos-vm-auto-enroll script (#17448)
Script will build a fleet-osquery package, launch a fresh macos VM and
install it. It will also download the correct MDM profile and prepare it
to be enabled
2024-03-08 13:54:12 -05:00
Roberto Dip 53c270e3cd add webserver to unmanage Jamf devices for MDM migration (#17458)
# Checklist for submitter

- [x] Manual QA for all new/changed functionality
2024-03-07 12:52:02 -03:00
George Karr 33bb67b7af update changelog 4.46.2 (#17337)
- Updating changelog for 4.46.2
2024-03-06 15:41:55 -06:00
Lucas Manuel RodriguezandZach Wasserman 1fceb19ad0 Automate osqueryd release to edge (#17425)
Automation and documentation for releasing osqueryd to `edge`

---------

Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2024-03-06 17:31:49 -03:00
dependabot[bot] 3445a11c0c Bump axios from 0.21.4 to 0.28.0 in /tools/fleetctl-npm (#17023) 2024-03-04 12:56:50 -06:00
Sharon Katz 07511dc19c 4.46.1 changes (changelog, version numbers) (#17293) 2024-03-01 11:30:26 -05:00
Jahziel Villasana-Espinoza 2f2bee8522 feat: use an env var to control arch when building orbit for local tuf server (#16263)
Just a small developer quality of life update

# 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] Manual QA for all new/changed functionality
2024-03-01 09:07:00 -05:00
Lucas Manuel Rodriguez 4f0682f346 New scripts to automate download of components from Github actions (#17144)
#17054

This was used as part of the release of fleetd 1.22.0 to the `edge`
channel.
I added more automation to ease releasing fleetd. (They were too many
manual clicks and error prone actions.)
2024-02-26 14:29:04 -03:00
Martin Angers 2dfb260850 Move nanodep dependency in monorepo (#16984) 2024-02-26 10:26:00 -05:00
Roberto Dip 8645d4525e build universal binaries for orbit in macOS in our test tuf server (#16712)
two motivations:

- prevent mysterious crashes in arm64 machines without Rosetta (often
the case in fresh VMs)
- prevent unexpected errors in Windows arm64 VMs when using certain
system calls

# Checklist for submitter

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

- [x] Manual QA for all new/changed functionality
2024-02-23 19:09:56 -03:00
Victor Lyuboslavsky 8e2ca6ea50 Updated backup.sh to dump UTF8. (#17100)
#17099
2024-02-23 13:49:23 -06:00
Martin Angers c5b988d600 Fix stack trace of captured errors in Sentry, capture errors in more code paths (#16966)
#16480 

# Checklist for submitter

- [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
2024-02-22 15:10:28 -03:00
Lucas Manuel Rodriguez 0642387b32 Orbit to detect 5XX alongside network errors (#17084)
#16423, #16326 

On the [original PR](https://github.com/fleetdm/fleet/pull/16968) we
missed detecting 5XX errors. Fleet usually runs behind load balancers,
so when bringing Fleet down, orbit connects successfully but gets 5XX
errors, so we need to detect those too.
2024-02-22 14:24:17 -03:00
Luke Heath 7361f4d8d5 Prepare v4.45.0 (#17005) 2024-02-21 11:32:22 -06:00
Grant Bilstad 3c20cce575 Added some phython and bash examples (#16657)
Scripts in Bash and Python that some others might find helpful, or
assist when thinking about vulnerability API/pages
2024-02-15 16:23:41 -07:00
Lucas Manuel Rodriguez 763c137b67 [On-call improve docs] Versions of currently released fleetd components on Fleet's TUF (#16698)
Should tackle #14026.

This will run a daily Github action and create a PR if there's a new
update in our TUF on `edge` or `stable`.

E.g. somebody releases 1.22.0 fleetd to `stable` on our TUF and the next
day this automation runs and will create a PR that updates the versions
in `orbit/TUF.md` (or they can run the workflow manually).

Am happy to amend the shape of `orbit/TUF.md` (or we can iterate later).
2024-02-15 15:30:29 -03:00
George Karr aac971145f Update Versions for 4.44.1 (#16722) 2024-02-12 16:20:07 -06:00
Sarah Gillespie 78aa1b0080 Update backend MDM migration flow and add logging to aid in debugging migration errors (#16627) 2024-02-06 16:53:43 -06:00
Martin Angers 792d76e2cd Fix stack trace, duplicates and better coverage of captured errors in APM (#16516) 2024-02-05 11:53:39 -05: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
Jacob ShandlingandJacob Shandling c086d5a231 Make "create_n_policies" script (#16517)
## Tool for testing policies-related features

When you just need a bunch of random policies:
<img width="1487" alt="Screenshot 2024-01-31 at 1 30 54 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/77165bb9-8194-44e5-b57f-9e691de44785">

<img width="948" alt="Screenshot 2024-01-31 at 1 31 17 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/ad72ae8c-926f-461f-8824-53b8ae0d4c2f">


- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-02-02 16:26:47 -08:00
Luke Heath 668fe41611 Prepare v4.44.0 (#16486) 2024-01-31 16:11:22 -06:00
Victor Lyuboslavsky 4416a68496 Fixing SSL certificates to make them valid. (#16359)
SSL certificates have a maximum lifetime of 398 days right now (13
months).

It took me a while to figure out why these were not working via the
macOS keychain (specifically curl and Safari).
It appears the CA certificate can have a longer lifetime, but the SSL
certificates it issues must have a limited lifetime.
2024-01-31 12:00:59 -06:00
Lucas Manuel Rodriguez 9ca85411a1 Add more tooling for tuf (#16452)
I've added this tool while working on releasing #16422.

It may help us address #14026.

Running:
```sh
go run tools/tuf/status/tuf-status.go channel-version -channel stable
```
Outputs:
```json
{
  "desktop": {
    "linux": "1.20.0",
    "macos": "1.20.0",
    "windows": "1.20.0"
  },
  "nudge": {
    "macos": "1.1.10.81462"
  },
  "orbit": {
    "linux": "1.20.1",
    "macos": "1.20.1",
    "windows": "1.20.1"
  },
  "osqueryd": {
    "linux": "5.9.1",
    "macos": "5.9.1",
    "windows": "5.9.1"
  },
  "swiftDialog": {
    "macos": "2.1.0"
  }
}
```
2024-01-30 14:20:41 -03:00
Lucas Manuel Rodriguez 1afb015f6c Test DB migrations with Percona XtraDB MySQL server 5.7.25 (#16320)
#15881

This PR adds a script to test DB migrations with Percona XtraDB 5.7.25.

PS: To run this test before we merge this PR to `main` you will need to
change step 2 (`Make sure to be on latest main`), instead of `main` use
this branch `15881-test-migrations-with-percona`.
2024-01-29 14:21:37 -03:00
7d00d5a41e feature: target profiles by labels (#16202)
for #14715

---------

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
Co-authored-by: Sarah Gillespie <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: Jahziel Villasana-Espinoza <jahziel@fleetdm.com>
2024-01-26 11:00:58 -05:00
Victor Lyuboslavsky 970a37c87b Updated flags for osquery 5.11 (#16239)
#16180
osquery flag validation has been updated for osquery 5.11
- new flags have been added to validation
- `table_exceptions` flag has been replaced with
`ignore_table_exceptions`

NOTE: It appears the last time this flow was run on Linux. I moved
several flags from the automatically generated section to the linux
section.

# 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
2024-01-24 12:24:11 -06:00
Luke Heath bcc1799e07 Prepare v4.43.3 (#16297) 2024-01-23 17:15:19 -06:00
Luke Heath 877cc4d8fd Windows removal script (#16172) 2024-01-23 10:43:31 -06:00
Luke Heath 0430738030 Prepare v4.43.2 (#16261) 2024-01-22 15:55:43 -06:00
Roberto Dip f078660243 use the configured EntityID for audience validation on MDM SSO (#16144)
for #16139 this fixes a copy/paste error that caused the MDM SSO flow to
validate audiences using the global config EntityID

since we also consider an audience valid if you set EntityID to be:

- the same in both (case for local dev)
- your Fleet URL or the full path to the SSO API endpoint (QA)

we didn't notice this until now.
2024-01-22 14:30:45 -03:00
Martin Angers 45cc94d9c3 Fix polling schedule for Windows MDM (#16104) 2024-01-16 09:05:19 -05: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
Lucas Manuel Rodriguez 0a3131ea2f Update TUF scripts and docs (#16023)
The new script was used for the fleetd v1.20.0 release #15991:
```
/path/to/fleet/tools/tuf/promote_edge_to_stable.sh orbit 1.20.0
/path/to/fleet/tools/tuf/promote_edge_to_stable.sh desktop 1.20.0
```

And to release osqueryd 5.11.0 to stable the following can be executed:
```
/path/to/fleet/tools/tuf/promote_edge_to_stable.sh osqueryd 5.11.0
```
2024-01-15 12:20:37 -03:00
George Karr 48ef8f3933 Prepare new patch version 4.43.1 (#16087) 2024-01-12 16:54:42 -06:00
dependabot[bot] cd214978a1 Bump follow-redirects from 1.14.8 to 1.15.4 in /tools/fleetctl-npm (#15988)
Bumps
[follow-redirects](https://github.com/follow-redirects/follow-redirects)
from 1.14.8 to 1.15.4.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/follow-redirects/follow-redirects/commit/65858205e59f1e23c9bf173348a7a7cbb8ac47f5"><code>6585820</code></a>
Release version 1.15.4 of the npm package.</li>
<li><a
href="https://github.com/follow-redirects/follow-redirects/commit/7a6567e16dfa9ad18a70bfe91784c28653fbf19d"><code>7a6567e</code></a>
Disallow bracketed hostnames.</li>
<li><a
href="https://github.com/follow-redirects/follow-redirects/commit/05629af696588b90d64e738bc2e809a97a5f92fc"><code>05629af</code></a>
Prefer native URL instead of deprecated url.parse.</li>
<li><a
href="https://github.com/follow-redirects/follow-redirects/commit/1cba8e85fa73f563a439fe460cf028688e4358df"><code>1cba8e8</code></a>
Prefer native URL instead of legacy url.resolve.</li>
<li><a
href="https://github.com/follow-redirects/follow-redirects/commit/72bc2a4229bc18dc9fbd57c60579713e6264cb92"><code>72bc2a4</code></a>
Simplify _processResponse error handling.</li>
<li><a
href="https://github.com/follow-redirects/follow-redirects/commit/3d42aecdca39b144a0a2f27ea134b4cf67dd796a"><code>3d42aec</code></a>
Add bracket tests.</li>
<li><a
href="https://github.com/follow-redirects/follow-redirects/commit/bcbb096b32686ecad6cd34235358ed6f2217d4f0"><code>bcbb096</code></a>
Do not directly set Error properties.</li>
<li><a
href="https://github.com/follow-redirects/follow-redirects/commit/192dbe7ce671ecad813c074bffe3b3f5d3680fee"><code>192dbe7</code></a>
Release version 1.15.3 of the npm package.</li>
<li><a
href="https://github.com/follow-redirects/follow-redirects/commit/bd8c81e4f32d12f28a35d265f88b1716703687c6"><code>bd8c81e</code></a>
Fix resource leak on destroy.</li>
<li><a
href="https://github.com/follow-redirects/follow-redirects/commit/9c728c314b06f9595dcd7f245d40731e8a27d79f"><code>9c728c3</code></a>
Split linting and testing.</li>
<li>Additional commits viewable in <a
href="https://github.com/follow-redirects/follow-redirects/compare/v1.14.8...v1.15.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=follow-redirects&package-manager=npm_and_yarn&previous-version=1.14.8&new-version=1.15.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/fleetdm/fleet/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-11 16:38:51 -06:00
Lucas Manuel Rodriguez e466b569d4 Remove very old and outdated MDM docs (#16043)
Running some cleanup of very old docs around initial MDM implementation.
2024-01-11 11:53:51 -03:00
Lucas Manuel Rodriguez 3b2e97db89 Move kubequery dependency to monorepo (#16027)
#15561

We didn't find a way to preserve history of the original fork (see
[here](https://github.com/fleetdm/fleet/issues/15561#issuecomment-1883473504),
thus we are moving it with one commit.

The second commit updates a reference.
2024-01-11 08:30:26 -03:00
Lucas Manuel Rodriguez 4627a92447 Move external dependency osquery-in-a-box to monorepo (#15871)
#15563 

- [X] Manual QA for all new/changed functionality

Tested by running the following:

If the changes haven't been merged to `main`:
```sh
fleetctl preview --preview-config 15563-move-external-dep-osquery-in-a-box-to-monorepo
fleetctl preview stop
fleetctl preview reset
```
If the changes were already merged to `main`:
```sh
fleetctl preview 
fleetctl preview stop
fleetctl preview reset
```
2024-01-10 11:45:52 -03:00
Roberto Dip edaa7acac3 lock in macOS version for Fleet Desktop workers (#16009)
Implementing a safety measure to prevent issues like #15910 in
production.

Setting the macOS version explicitly avoids unexpected changes in the
builder runtime, ensuring the Fleet Desktop executable remains
compatible.

As of this commit, 'macos-latest' refers to 'macos-12'. We're aligning
the worker to this version, although building on macOS 13.x (presently
in GitHub workers' beta) should also be viable.
2024-01-10 11:33:48 -03:00
Luke Heath 502a811ce9 Prepare v4.43.0 (#15972) 2024-01-09 16:45:22 -06:00
Victor Lyuboslavsky e63e81076b Added a NOTE regarding osqueryd with TUF. (#15948)
Contributor doc change.
2024-01-08 08:06:40 -06:00
Jahziel Villasana-Espinoza 2833c80cfe feat: add option to disable scripts (#15815)
> 📜 Related issue: https://github.com/fleetdm/fleet/issues/14500

# 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
2024-01-03 10:42:08 -05:00
Lucas Manuel Rodriguez 417f45fc61 Move external dependency fleetdm/kolide-kit to monorepo (#15861)
#15556

We will need to pay attention when releasing fleet (the github actions
were modified to use the local file now).

Should be reviewed by commits (first commit is the actual adding of the
`version.go` file)

- [X] Manual QA for all new/changed functionality

Manually tested the following:
- `Settings -> My account` on the UI and checked the `/version` endpoint
response. (Or also visiting https://localhost:8080/version on a
browser).
- Ran `make fleetctl fleet`, `./build/fleetctl --version` and
`./build/fleet version`.
2024-01-02 18:22:52 -03:00
Luke Heath f5af49f766 Prepare v4.42.0 (#15812) 2023-12-21 15:30:40 -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
Luke Heath 3dc40d667e Prepare v4.41.1 (#15500) 2023-12-07 16:06:17 -06:00
Martin Angers e3d225ade7 Update fleetctl get software to list titles and versions. (#15444) 2023-12-06 16:07:03 -05:00
Martin Angers fb01e30f27 Require a custom Clone for cacheable items, add tooling and CI check to help catch issues (#15458) 2023-12-06 14:34:22 -05:00
Sharon Katz d40555e7cd Script for comparing two CIS PDF files (#15307) 2023-12-06 09:21:12 -05:00