Commit graph

506 commits

Author SHA1 Message Date
Victor Lyuboslavsky
addbceece0
Activity feed webhooks backend (#19261)
This is a redo of the already-approved PR
https://github.com/fleetdm/fleet/pull/19125

The difference is that this merge is into main as opposed to the feature
branch.
2024-05-24 11:25:27 -05:00
Lucas Manuel Rodriguez
b7aac2cfab
Fix bundle_identifier for common software in osquery-perf (#19023)
bundle_identifier should be unique for the common software (should not
have hostname name in it).
2024-05-24 09:26:42 -03:00
Roberto Dip
987b64a0c7
update to go1.22.3 + dependencies (#19142)
For #16795, this:

- Updates Go to go1.22.3
- Per
https://github.com/fleetdm/fleet/issues/16795#issuecomment-2100450618, I
also ran the following to update the versions requested by @getvictor

```
go get github.com/kataras/golog@v0.1.12
go get github.com/kataras/iris/v12@v12.2.11
go get github.com/sethvargo/go-password@v0.3.0
```

**Notes**

After this is merged people will need to update their Go version. I use
gvm and I did it like:

```
$ gvm install go1.22.3
$ gvm use go1.22.3 --default
```

**Relevant changes**

The release notes mention:

> Previously, the variables declared by a “for” loop were created once
> and updated by each iteration. In Go 1.22, each iteration of the loop
> creates new variables, to avoid accidental sharing bugs.

However, we already have a lint rule (see
https://github.com/fleetdm/fleet/pull/13877) for this scenario, so it
shouldn't affect us.
2024-05-23 16:23:38 -03:00
Luke Heath
a540e0e38b
Adding changes for Fleet v4.50.0 (#19191) 2024-05-23 11:11:28 -05:00
Luke Heath
2a70605976
Tweaks to Fleet releaser script (#19208) 2024-05-23 11:07:08 -05:00
Lucas Manuel Rodriguez
a10befe657
Release fleetd 1.25.0 (#19203) 2024-05-22 14:38:24 -03:00
Lucas Manuel Rodriguez
e7111f948d
TUF: Add action to update timestamp (#19196) 2024-05-22 11:09:43 -03:00
George Karr
e61e3edb39
Adding changes for patch 4.49.4 (#19163) 2024-05-21 11:20:37 -05:00
Lucas Manuel Rodriguez
bb310e685d
Support Ubuntu 24.04 with Xorg (by detecting user's DISPLAY environment variable) (#18996)
#18925 (Should also fix #17660.)

Tests:
- Ubuntu 22.04.2
	- Wayland
		- Works with chrome  
		- Doesn't work with Firefox. 
	- Xorg
		- Works with Chrome.  
		- Works with Firefox. 
- Ubuntu 24.04
	- Wayland
		- Doesn't work with Chrome. 
		- Doesn't work with Firefox. 
- Xorg (when using Xorg it defaults to `DISPLAY=:1`, and with the
changes in this PR it works):
		- Works with Chrome.  
		- Works with Firefox.  
---

How to change between Wayland and Xorg:

- Set `WaylandEnable=false` in `/etc/gdm3/custom.conf` and reboot.

---

How to determine what's running:
```sh
$ loginctl
SESSION  UID USER SEAT  TTY 
      2 1000 luk  seat0 tty2
     c2 1000 luk        

$ loginctl show-session 2 -p Type
# will output
Type=wayland
or
Type=x11
```
---

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/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-05-16 08:39:30 -03:00
Victor Lyuboslavsky
8d253fe19a
Updating user now updates activity feed. (#18962)
#18766
Fixed a bug where updating user via `/api/v1/fleet/users/:id` endpoint
sometimes did not update the activity feed and returned the un-updated
user object.

You must use a DB configuration with a replica to reproduce the issue.

# Checklist for submitter

<!-- 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://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-05-14 15:06:23 -05:00
Lucas Manuel Rodriguez
e5cdafc075
Add cleanup of idle connections in fleetd (#18857)
#18783

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [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-05-09 08:54:11 -03:00
Sharon Katz
e735e51915
Adding changes for patch 4.49.3 (#18769)
Co-authored-by: Luke Heath <luke@fleetdm.com>
2024-05-07 13:32:46 -04:00
Victor Lyuboslavsky
a3d94c8324
AI generated policy description/resolution (#18713)
Merging feature branch. Each commit into feature branch has already been
reviewed.
2024-05-03 15:23:27 -05:00
Victor Lyuboslavsky
4f4800be19
GitOps remove teams (#18640)
#16677 

Improvements to `fleetctl gitops` command:
- Added the ability to pass multiple files, like `fleetctl gitops -f
file1 -f file2`, where the first file must be the global configuration
- Added the ability to remove teams that were not specified in team
configs using the switch `--delete-other-teams`
- When passing a global config and team config during initial
configuration, the `org_settings.mdm.apple_bm_default_team` value can be
set to match the team that will be created by the provided team config.

After these changes are released to prod, we can update
https://github.com/fleetdm/fleet-gitops to use the new switches: #18692

# 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://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-05-03 08:03:00 -05:00
Victor Lyuboslavsky
4946c96e77
AI-generated calendar backend changes (#18571)
#18464

Added `/fleet/autofill/policy` endpoint to get autogenerated policy
description and resolution for a given SQL query.

Added `server_settings.ai_features_disabled` setting to disable the
above endpoint.

For Google calendar integration,
- changed the event title to: "💻 🚫 Scheduled maintenance"
- updated event description to include policy description and resolution
if only one policy is failing

# 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://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Luke Heath <luke@fleetdm.com>
2024-05-02 11:56:54 -05:00
George Karr
cb6cfe9da5
Adding changes for patch 4.49.2 (#18637) 2024-04-30 11:52:03 -05:00
Luke Heath
a38fa0d517
Change calendar event name (#18579)
Co-authored-by: Rachael Shaw <r@rachael.wtf>
2024-04-29 15:51:16 -05:00
Dante Catalfamo
1cb670a3c1
Tools: Choose Enrollment VM base image using environment variable (#18070)
Good for running out older versions of macOS during an semi-automated
test
2024-04-26 15:30:58 -04:00
George Karr
b75545ba26
Adding changes for patch 4.49.1 (#18573) 2024-04-26 12:35:44 -05:00
Lucas Manuel Rodriguez
1b26129465
Delete expired activities in cleanup cron (#18441)
#16989

API draft PR: #17809.
UI draft PR: #18243.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [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
- ~[ ] If database migrations are included, checked table schema to
confirm autoupdate~
- ~For database migrations:~
- ~[ ] Checked schema for all modified table for columns that will
auto-update timestamps during migration.~
- ~[ ] Confirmed that updating the timestamps is acceptable, and will
not cause unwanted side effects.~
- ~[ ] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).~
- [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)).~
2024-04-26 07:22:31 -03:00
George Karr
d3b821cf47
Adding in cherry-pick into prepare branch and push (#18499) 2024-04-24 17:22:24 -05:00
Luke Heath
2a1c19e26c
Adding changes for Fleet v4.49.0 (#18496) 2024-04-24 14:13:59 -05:00
Luke Heath
b047e39af7
Adding an announce only flag so we can announce after publishing content (#18500) 2024-04-24 13:45:35 -05:00
Roberto Dip
d677546e04
sign fleetctl for macOS during releases (#16670)
possible approach to solve #16664

---------

Co-authored-by: Luke Heath <luke@fleetdm.com>
2024-04-19 14:36:30 -03:00
George Karr
6457adf90e
Adding quiet option to publish_release and TODO article automation (#18324) 2024-04-18 14:55:14 -05:00
Lucas Manuel Rodriguez
6fde96a984
releaser.sh to use gh to create PRs (#18379)
The changes were tested by releasing fleetd 1.24.0 to `edge`.
2024-04-17 18:21:45 -03:00
Sharon Katz
420e2adb0f
Adding changes for patch 4.48.3 (#18306)
Co-authored-by: Luke Heath <luke@fleetdm.com>
2024-04-17 16:41:06 -04:00
Luke Heath
3ef4358133
Update to Go convention and use same version defined in GitHub enviro… (#18348) 2024-04-16 16:05:37 -05:00
dependabot[bot]
8b9099717d
Bump tar from 6.1.11 to 6.2.1 in /tools/fleetctl-npm (#18179) 2024-04-15 15:44:54 -05:00
Martin Angers
ea0da5e2fa
Add tool to get a profile as defined in Apple BM (#18274) 2024-04-15 15:11:46 -04:00
Lucas Manuel Rodriguez
598dfa3061
Move and fix oncall.sh script (#18217)
In the future we can create automation to send reminders to a Slack
channel. Or send the list every time there's a oncall changeover.
2024-04-11 16:23:00 -03:00
Lucas Manuel Rodriguez
cfdce42970
Fixes for releasing to stable channel (#18200)
Bug fixes found while releasing fleetd `1.23.0` to `stable`.
2024-04-10 18:34:33 -03:00
George Karr
f02d4706f5
Adding changes for patch 4.48.2 (#18148) 2024-04-10 13:21:59 -05:00
Lucas Manuel Rodriguez
23772c69b7
Create releaser.sh to release fleetd updates (#18134)
#16131

`releaser.sh` was used to release fleetd 1.23.0.
2024-04-09 18:37:55 -03:00
Victor Lyuboslavsky
3367b7e036
Added orbit_version, fleet_desktop_version, and scripts_enabled to host details. (#18123)
#17361
#17148

In GET fleet/hosts/:id response, added the following fields:
- orbit_version
  - `orbit_version == null` means this agent is not an orbit agent
- fleet_desktop_version
- `fleet_desktop_version == null` means this agent is not an orbit agent
or it is an older version which is not collecting the desktop version
- `fleet_desktop_version == ""` means this agent is an orbit agent but
does not have fleet desktop
- scripts_enabled
- `scripts_enabled == null` means this agent is not an orbit agent or it
is an older version which is not collecting scripts_enabled

In orbit_info table, added the following fields:
- desktop_version
- scripts_enabled

Updated docs for orbit_info PR:
https://github.com/fleetdm/fleet/pull/18135

Updated API docs: https://github.com/fleetdm/fleet/pull/17814

MDM lock/unlock/wipe error messages are not part of this PR. They will
be in a separate PR.

# 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 support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [x] Added/updated tests
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- [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-04-09 16:33:44 -05:00
George Karr
af7f0fa89e
Adding changes for patch 4.48.1 (#18129) 2024-04-09 11:41:41 -05:00
Noah Talerman
65ab7a896d
Remove duplicate DEP profile example (#18114)
- Remove duplicate
- Add redirect so the example profile can move later w/o breaking links
- Update links
2024-04-09 09:47:47 -04:00
George Karr
b9ef0290b9
Fixed invalid bash (empty if) / ignore directories we don't need to change versions (#18116) 2024-04-08 10:49:47 -05:00
Victor Lyuboslavsky
5a6c407e1b
Calendar webhook will retry if it receives response 429 (#18067)
#18044 
Calendar webhook will retry if it receives response 429 Too Many
Requests. Webhook request will retry for 30 minutes with a 1 minute max
delay between retries.

# 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.
- [ ] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-04-05 12:44:56 -05:00
George Karr
6f78531280
Small changes to release and adding start of README (#18012) 2024-04-05 11:13:58 -05:00
Marko Lisica
4585a6e2c2
API design: Pre-fill and lock local account creation screen during out-of-the-box macOS setup (#17118)
API design for:
- #9147
2024-04-04 14:38:42 -04:00
Victor Lyuboslavsky
746309ca47
Waive 3 Go code scanning vulnerability alerts. (#18007)
Waiving 3 Go code scanning alerts flagged by osv-scanner.
2024-04-03 16:04:01 -05:00
Luke Heath
7b91434452
Updating changelog for 4.48.0 (#18014) 2024-04-02 15:38:42 -05:00
George Karr
011d97fad1
Adding theoretical main variation (#17904) 2024-04-02 13:26:31 -05:00
George Karr
4d2d704bb9
georgekarrv publish release (#17870)
- **Added confirmation for tag**
- **Adding npm publish**
2024-03-27 14:02:35 -05:00
George Karr
f2b3a58bff
Updating changelog for 4.47.3 (#17871) 2024-03-27 10:41:51 -05:00
Martin Angers
b449900602 Regenerate schema.sql 2024-03-27 08:19:21 -04:00
Victor Lyuboslavsky
35a21d5f0c
Calendar helper scripts for testing (#17798)
Calendar helper scripts for testing
2024-03-26 13:39:37 -05:00
Victor Lyuboslavsky
16f122f02a
Adding calendar test server and other fixes. (#17751)
- Added a calendar server that can be used for load testing at
/tools/calendar
- Fixed minor calendar bugs

# Checklist for submitter
- [ ] 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-03-26 13:39:37 -05:00
Lucas Manuel Rodriguez
e8f177dd43
Additional changes to happy path and cleanup cron job (#17757)
#17441 & #17442
2024-03-26 13:39:37 -05:00