Commit graph

2240 commits

Author SHA1 Message Date
Martin Angers
c263923eab Explicitly set collation for character columns 2024-04-09 13:17:33 -04:00
Roberto Dip
f827a4727e
use license.IsPremium to check for premium licenses (#18141)
a license can be considered premium for trials, this replaces
occurrences that used comparison operators to check for premium
licences.
2024-04-09 11:15:22 -03:00
Sarah Gillespie
05ccf9ee23
Fix issues related to Fleet builtin labels and reserved MDM profile names (#18043) 2024-04-08 14:34:55 -05:00
Roberto Dip
bac13b4af2
Prevent MDM migration without assigned ADE profile (#17999)
for #15929 this prevents us sending the notification to start the MDM
migration if the device doesn't have the right JSON profile assigned.
2024-04-08 11:10:29 -03:00
Martin Angers
66f90ccd93
Merge branch 'main' into mna-17401-puppet-related-integration-tests 2024-04-08 08:45:56 -04:00
Roberto Dip
f1b45a3865
friday tidy up party (#18106)
- add missing tests
- remove unused code
- remove unnecessary nested branches
2024-04-08 08:42:42 -03: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
Victor Lyuboslavsky
f476ddcfd6
Fix panic due to nil calendar config. (#18065)
#18063

Fixing potential server panic when events are created with calendar
integration, but then global calendar integration is disabled.

Could not do a PR directly from
[fleet-v4.48.0](https://github.com/fleetdm/fleet/releases/tag/fleet-v4.48.0)
due to merge conflicts.

# 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.
- [ ] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-04-04 16:18:41 -05:00
Lucas Manuel Rodriguez
e8ca959888
Add enterprise integration test for calendar events (#17900)
Integration tests for the calendar feature: #17441.

Adding coverage screenshots for the calendar cron and the osquery
distributed/write coverage:

![Screenshot 2024-03-27 at 14 20
44](https://github.com/fleetdm/fleet/assets/2073526/40d394ab-2208-4bec-981b-fe22fae8b5c1)
![Screenshot 2024-03-27 at 14 21
20](https://github.com/fleetdm/fleet/assets/2073526/1e4c8611-21ba-48a6-82f8-a163594f7f01)
2024-04-04 14:58:31 -03:00
Jacob Shandling
74761b75d8
Update carve request block id mismatch error code from 500 –> 400 (#17974)
## Addresses #16951

# 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/`
- [x] Added/updated tests
- [ ] Manual QA for all new/changed functionality – @ksatter can you
please add reproduction steps to the issue to aid in manual QA?

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-04-04 09:38:10 -07:00
Victor Lyuboslavsky
0bca241680
Mark calendar webhook as errored so that it doesn't get stuck in pending and keeps logging warnings. 2024-04-02 16:03:51 -05:00
Martin Angers
0f55bf241d
Merge branch 'main' into mna-17401-puppet-related-integration-tests 2024-04-02 09:21:51 -04:00
Roberto Dip
7186cd9342 update tests 2024-04-01 13:42:27 -03:00
Noah Talerman
85a6d6f7a4
Update tests 2024-03-29 17:03:12 -04:00
Noah Talerman
9217625387
Update error message for OS updates declaration profile
- In Fleet 4.48, we'll ship ""
- OS updates w/ DDM will ship in 4.49
- Update error message to let user know OS updates w/ DDM are coming soon.
- In the Figma wireframes here for () add designs for new error message copy.
2024-03-29 16:44:36 -04:00
Sarah Gillespie
841350f556
Add cross-platform check for duplicate MDM profile names (#17916) 2024-03-29 14:55:03 -05:00
Roberto Dip
140dde17b7
add missing activity items, fix CLI error messages (#17961)
for #17954
2024-03-29 15:55:26 -03:00
Roberto Dip
9af01e53e9 add missing activity items, fix CLI error messages
for #17954
2024-03-29 14:43:28 -03:00
Roberto Dip
e39d5d9341 fix tests 2024-03-29 14:18:26 -03:00
Roberto Dip
4e11b3574c missing table cleanups for DDM
for #17953, this adds missing cleanups when:

- teams are deleted
- hosts are deleted

also includes a few extra tests.
2024-03-29 12:40:47 -03:00
Lucas Manuel Rodriguez
1833e1fc5b
Reset query report when platform/min_osquery_version is changed (#17847)
#17018

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

---------

Co-authored-by: RachelElysia <rachel@fleetdm.com>
Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
2024-03-29 12:17:52 -03:00
Sarah Gillespie
bb0d031ea8
Populate host.MDMInfo when getting host details for Windows host (#17893) 2024-03-29 09:48:31 -05:00
Roberto Dip
1158ad2559
Merge branch 'main' into ddm-unreleased-bugs 2024-03-28 16:58:33 -03:00
Roberto Dip
dacdac904c fix test 2024-03-28 16:57:51 -03:00
Roberto Dip
aabca1e40d lint 2024-03-28 16:08:59 -03:00
Roberto Dip
48ee019507 fix unreleased issues for macOS DDM
for #17924 and #17923
2024-03-28 15:44:14 -03:00
Tim Lee
d984de41e7
Add batch gitops processing for policies and queries (#17714) 2024-03-28 11:39:27 -06:00
Martin Angers
9d878f1fd2
Merge branch 'main' into mna-17401-puppet-related-integration-tests 2024-03-27 12:42:31 -04:00
Martin Angers
10b6365874 Remove debug println 2024-03-27 11:44:26 -04:00
Martin Angers
dc81c2154b Add assertion for enable release device manually to puppet flow integration test 2024-03-27 11:24:06 -04:00
Roberto Dip
0d15132ae4 fix tests and lint 2024-03-27 12:21:08 -03:00
Martin Angers
36aeeddf92 Fix / stabilize the puppet flow integration test 2024-03-27 11:06:23 -04:00
Roberto Dip
e34b320ed5 Merge remote-tracking branch 'origin/main' into feat-macos-ddm 2024-03-27 11:58:22 -03:00
Roberto Dip
15e671da9a add missing activities 2024-03-27 11:04:47 -03:00
Martin Angers
8abee3e72d
Merge branch 'main' into feat-prefill-account-name 2024-03-27 09:53:02 -04:00
Roberto Dip
0be9f085b0
batch set declarations as pending when they're uploaded (#17876)
#17685
2024-03-27 10:44:22 -03:00
Lucas Manuel Rodriguez
ea92433c34
Disabling calendar policies removes scheduled calendar events (#17882)
#17230

Fix for the following scenarios:
- Team has only one policy with calendar enabled. Events are created on
user calendars. Then the user disables the calendar on such policy.
Expected behavior: Events on the user calendar should be cleaned up in
that scenario.
- Policy `platform` is edited (which removes `policy_membership`
entries) and we'd like to have the calendar event removed for the hosts
that do not apply anymore.

To cover these scenarios I changed `ds.GetTeamHostsPolicyMemberships` so
that it also returns hosts that have a calendar event AND have no
results on policies (returned as passing=1).
E.g. this could happen if there ARE calendar events for a team but with
a platform that doesn't match the host (so it has no results).
2024-03-27 10:33:09 -03:00
Roberto Dip
fdc5aa57c2
add ddm declarations in the API (#17880)
for #17409
2024-03-27 09:53:43 -03:00
Martin Angers
b449900602 Regenerate schema.sql 2024-03-27 08:19:21 -04:00
Dante Catalfamo
7b13d9ce17
Add mdm_apple_declarative_requests table to log DDM requests (#17844)
#17792
2024-03-27 00:09:09 -03:00
Sarah Gillespie
1edd9f07bb
Update host details, list host filters, and MDM summary to include macOS declarations (#17866)
Issue #17619

---------

Co-authored-by: Roberto Dip <dip.jesusr@gmail.com>
2024-03-26 21:54:47 -03:00
Victor Lyuboslavsky
9bb1610408
Fleet in your calendar feature branch (#17584)
# 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] Manual QA for all new/changed functionality
2024-03-26 15:34:33 -05:00
Dante Catalfamo
0b04e7ea9f
Allow EnrollmentState to be in status '3' for MDM clients (#17868)
#17692

Recently there was a change that filtered out hosts in `EnrollmentState`
3. This change may cause some hosts that are in otherwise good health to
appear unresponsive to MDM in the management UI.

This change will allow hosts with `EnrollmentStatus` 3 show as enrolled.

The root cause of some hosts being in state 3 is still not entirely
clear, but may have to do with either trying to re-enroll once already
enrolled, or windows updates causing some sort of issue with fleet.

Despite the "failed" `EnrollmentState` 3, the host will still display
that the system is managed by Fleet, and will actively sync.
2024-03-26 16:33:52 -04:00
Victor Lyuboslavsky
72662291b0
Adding embedded timezone database. 2024-03-26 13:39:37 -05:00
Lucas Manuel Rodriguez
31fe9d17b9
More fixes to support users with hosts in same team and hosts in different teams (#17789)
#17441
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
Victor Lyuboslavsky
e4ba41ac85
Latest changes to configs (#17724)
- Remove email from team configs
- Accept api_key_json for global config
2024-03-26 13:39:37 -05:00
Victor Lyuboslavsky
196d8ce5b7
Calendar interface updates and mock calendar (#17701)
- Updated calendar interface to use updated `genBodyFn`
- The mock calendar is enabled by specifying `calendar-mock@example.com`
as the service account email.
2024-03-26 13:39:36 -05:00
Lucas Manuel Rodriguez
9a8ac02bc1
Happy path implementation of the calendar cron job (#17713)
Happy path for #17441.
2024-03-26 13:39:36 -05:00
Victor Lyuboslavsky
21f95d8b5d
Calendar interface fixes from code review and refactoring. (#17658)
Calendar interface fixes from code review and manual merge with
@lucasmrod changes.
2024-03-26 13:39:36 -05:00