Commit Graph
816 Commits
Author SHA1 Message Date
gillespi314 8cc7d38300 Mark "verifying" or "verified" MDM profiles as "failed" if osquery cannot confirm they are installed (#12414) 2023-06-21 13:00:49 -05:00
Martin Angers 1c249b60da Add support to configure and enable Windows MDM, notify elegible hosts (#12340) 2023-06-20 14:06:45 -04:00
Martin Angers 96aec85a0a Add mechanism to force read from primary DB, use it for puppet matching (#12396) 2023-06-19 13:55:15 -04:00
Martin Angers 68fa60c54d Add a transferred_hosts activity when hosts are transferred to a new team (#12287) 2023-06-14 08:15:05 -04:00
Roberto Dip 1ad80fa251 bugfixes + adjustments for the puppet module (#12221)
A few minor things going on:

1. Adjusted the Puppet module to send the profiles base64 encoded
2. Enabled FileVault by default on teams created using the `/match`
endpoint.
3. Remove profiles when a team is removed. We can't do a foreign key
because the global team.id is NULL. I also included a migration to
cleanup orphaned profiles.
2023-06-08 18:05:44 -03:00
Martin Angers de42164c53 Ignore fleet profiles when matching a set of custom profiles to a team (#12209) 2023-06-07 15:43:27 -04:00
Lucas Manuel Rodriguez 2a532ede94 Do not return empty SSO and SMTP settings for non-global-admins (#12180)
#11266

PS: I first attempted a serialization trick by introducing a new
`appConfigResponse` and implementing `json.Marshal` to exclude these
fields but it was too hacky and hard to maintain moving forward, so I'm
bitting the bullet now. Happy to hear other ideas.

- [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:~
- ~[ ] 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-06-07 16:06:36 -03:00
Roberto Dip 6617938393 ensure we send post-enrollment commands if a DEP device is enrolling (#12159)
for #11257, h/t to @mna for the idea of resetting `token_update_tally`.

this is to cover scenarios where a host might be re-enrolling (eg: the
device has been wiped) but we don't know about it.

since `TokenUpdate` might be called multiple times during the lifecycle
of an MDM enrollment, we add a check on the value of
`nano_enrollments.token_update_tally`. For the scenarios described
above, the tally is still `> 0` even thought the host is enrolling for
the first time.

to mitigate this, we reset its value to 0 when we receive an
`Authenticate` message (which only happens only per enrollment)

I set the value to `0` because it's incremented to `current_value+1` by
nanomdm before calling our handler.
2023-06-06 20:18:14 -03:00
Juan Fernandez 801f38b80b Renamed 'ChromeOS' label to 'chrome' (#12156)
Renamed 'ChromeOS' label to 'chrome'
2023-06-06 15:25:23 -04:00
Martin Angers f27fcddd55 Prevent clearing macos updates settings when applying/modifying a team without those settings (#12160) 2023-06-06 14:31:33 -04:00
Roberto Dip 3127c9fffd handle "modified" and "deleted" operation types in DEP sync (#12150)
for #10605, this modifies the cron used to ping the list/sync devices
API from ABM to account for the "deleted" and "modified" operation
types.

We know that:

1. Sometimes, Apple sends a "modified" operation type when a device's
MDM server is reassigned in ABM, up until now, we were ignoring these
devices.
2. Devices that are no longer assigned to Fleet in ABM can't be
migrated.
2023-06-06 15:04:59 -03:00
Juan Fernandez 1eb8bb800e Bug: spec/labels endpoint should include the id (#12135)
spec/labels endpoint should include the ID prop
2023-06-06 09:11:03 -04:00
Martin Angers 9f064acd2e Match pre-assigned profiles to a team (or create one) and assign host to team (#12127) 2023-06-05 15:08:21 -04:00
gillespi314 372c77ff23 Add backend for verified MDM profiles (#12078) 2023-06-05 12:05:28 -05:00
Martin Angers 48774876ea Move post-DEP-enrollment processing to a worker job (#12017) 2023-06-05 11:58:23 -04:00
Roberto Dip 3fa809e167 strip query strings from MDM server_url during ingestion (#12107)
for #12106
2023-06-05 12:53:36 -03:00
Martin Angers 4322a28f5a Implement preassign endpoint as first step to match profiles and hosts to teams (#12046) 2023-05-31 09:24:22 -04:00
gillespi314 e2243d24bf Insert "verified" to mdm_apple_delivery_status table (#12033) 2023-05-30 14:11:42 -05:00
Juan Fernandez de7377e54f ChromeOS support for Fleet dashboard (#11953)
- Added built-in label for ChromeOS
- Ingest os_version info from ChromeOS hosts.
2023-05-26 14:32:01 -04:00
Juan Fernandez 2d5477266a Feature 10566: Optimize query used for listing activities (#11708)
- Added index on `created_at` which is the sort key used when loading the log activities widget on the dashboard.
- Refactored query used when loading activities to avoid a full table scan.
2023-05-25 15:50:36 -04:00
Juan Fernandez 2249d171bc Return DB results even if nothing has changed (#11936) 2023-05-24 14:05:45 -05:00
gillespi314 259d4fa1ac Track host DEP assignments in new table (#11875) 2023-05-23 13:01:04 -05:00
Roberto Dip 8e532a5e76 pre-populate username/fullname during account creation (#11557)
Related to #10744, this pre-populates and disables the username/fullname
fields.

https://user-images.githubusercontent.com/4419992/236854781-ac67ee28-c19c-4130-a5e6-2872220501b5.mov


# 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] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-05-18 12:50:00 -03:00
Benjamin Edwards f2ffb88cc3 wildcard host search support (#11303)
relates to #9996 

Added support for wildcard search on host search.

say for example you have the following hosts:

```
+------------------+
|hostname          |
+------------------+
|Molly‘s MacbookPro|
|Molly's MacbookPro|
|Molly‘s MacbookPro|
|Molly❛s MacbookPro|
|Molly❜s MacbookPro|
|Alex's MacbookPro |
+------------------+
```

searching for `Molly's` yields just the single host, but searching for
`Molly❜s` will perform a broader wildcard search using the literal `_`
character to match any character _in that position_.

- [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
2023-05-18 10:01:57 -04:00
Juan Fernandez 009a87d33e Feature 10196: Add filepath to end-points and third party integrations (#11285)
Adds the software installed path property to the proper end-points and third party integrations (webhook, Zendesk and Jira).
2023-05-17 16:53:15 -04:00
Martin Angers 3f9eccc7f8 Refetch host mdm enrollment status until unenrolled (#11740) 2023-05-17 15:52:45 -04:00
Juan Fernandez 7f83135aa1 Feature: Store installed file path when ingesting software (#11214)
Store software installed paths into the host_software_installed_paths table when ingesting osquery software data.
2023-05-17 14:49:09 -04:00
Martin Angers e3a4e5fa0c Add support for profile UUIDs per team/no-team for the default profile (#11717) 2023-05-17 09:06:14 -04:00
Martin Angers 043606895c Add new error message to detect as non-cluster redis (#11719) 2023-05-16 14:24:38 -04:00
Roberto Dip 4dd127d577 base logic to show/hide the new Migrate to Fleet FD menu (#11679)
Related to #11670
2023-05-15 17:00:52 -03:00
Martin Angers 7b1b392627 Implement worker jobs that update/re-assign setup assistants on changes (#11630) 2023-05-15 14:06:09 -04:00
gillespi314 ceeb4c1ed5 Add mdm.macos_migration to app config endpoints (#11694) 2023-05-15 11:50:07 -05:00
gillespi314 a9584dc32f Allow end user authentication during automatic MDM enrollment to be enabled on a per-team basis (#11566) 2023-05-10 15:22:08 -05:00
Roberto Dip e635eb19fd use writer for database reads on TokenUpdate (#11605)
Related to #11604
2023-05-10 09:40:11 -03:00
Martin Angers 70f18dda4a Apply custom setup assistants (if present) when ingesting new devices (#11563) 2023-05-09 13:00:18 -04:00
Martin Angers b3993ebda4 Allow "not_before" timestamp for worker jobs, schedule more quickly (#11512) 2023-05-03 16:25:36 -04:00
Roberto Dip 11356b2f15 add CRUD for EULA (#11274)
https://github.com/fleetdm/fleet/issues/10741
2023-05-02 10:09:33 -03:00
Roberto Dip 5544b2c579 account for pending hosts in bootstrap package filters (#11417)
https://github.com/fleetdm/fleet/issues/11395
2023-04-28 16:37:56 -03:00
bd9176d67e UI for bootstrap package flows (#11288)
relates to #10935

This is the UI for all the flows around adding, removing, downloading,
and viewing information about a bootstrap package for fleet mdm. This is
pretty comprehensive but includes:

### Backend

**Update `Get host/id`** to include bootstrap package name

```json
{
  "macos_setup": {
    ...
    "bootstrap_package_name": "test.pkg"
  }
}
```

### Frontend

**UI for ABM not being set up**:


![image](https://user-images.githubusercontent.com/1153709/234018772-3221e27b-50a4-454e-8e9f-b62c9d349010.png)

**UIs for uploading, downloading, and deleting bootstrap package**:


![image](https://user-images.githubusercontent.com/1153709/234017915-871f252f-bf80-4282-9acf-5ebea12c6efa.png)


![image](https://user-images.githubusercontent.com/1153709/234018029-322a5f30-dd22-44e3-b9ae-a4af7acb68b4.png)


![image](https://user-images.githubusercontent.com/1153709/234018163-4b84a2ce-a064-4952-a63d-0c8307391052.png)

**UIs for seeing bootstrap status aggregate data**


![image](https://user-images.githubusercontent.com/1153709/234018107-455d63ab-5b2c-4727-ad20-eef6b269c336.png)

**UIs for filtering hosts by bootstrap status**


![image](https://user-images.githubusercontent.com/1153709/234018334-170fe93a-700e-48eb-b198-2a1cc54d31a7.png)

**UIs for seeing package status on host details and my device page**:


![image](https://user-images.githubusercontent.com/1153709/234018488-7b515db4-1248-4be7-8de3-9b74bb5d4795.png)


![image](https://user-images.githubusercontent.com/1153709/234018525-d653cb2d-9ef9-437e-8eba-141e557f4f39.png)

- [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: Roberto Dip <dip.jesusr@gmail.com>
Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2023-04-27 16:10:41 +01:00
a23d208b1d gate DEP enrollment behind SSO when configured (#11309)
#10739

Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
2023-04-27 09:43:20 -03:00
gillespi314 003e208e4d Update CLI flow to manage adding and deleting MDM bootstrap packages by applying config and team specs (#11349) 2023-04-26 16:09:21 -05:00
Roberto Dip 9068faf38f Allow to configure SSO settings for MDM end user authentication (#11270)
Related to #10741, this adds a new key to app config named
`end_user_authentication`, which can be configured using the same keys
as the existing SSO feature.

Per the spec, if the feature is configured, it's implicitly enabled, at
least until we get to #10999.

Note that this only enables the SSO config, a second part of the ticket
with endpoints for the EULA will be tackled separately.
2023-04-25 12:16:33 -03:00
Martin Angers 582e85c876 Add support for the mdm.macos_setup.macos_setup_assistant key in fleetctl, API (#11296) 2023-04-25 09:36:01 -04:00
gillespi314 a37d138f4b Migrate MDM status values in datastore and API layers (#11278) 2023-04-24 16:27:15 -05:00
5c487890ca add an endpoint to get an aggregate summary of bootstrap packages (#11156)
Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2023-04-22 10:23:38 -05:00
gillespi314 bb2fbbdd38 Add apple_bm_enabled_and_configured to app config responses (#11255) 2023-04-21 11:08:09 -05:00
gillespi314 be76e209d9 Update macOS settings status filter and aggregate host counts to incorporate disk encryption key status (#11182) 2023-04-19 10:03:44 -05:00
Martin Angers 7483f56b76 Report empty command status as "Pending", fix test (#11220) 2023-04-17 13:37:52 -04:00
Martin Angers c1d3f67e6f Add fleetctl get mdm-commands command and supporting API endpoint (#11163) 2023-04-17 11:45:16 -04:00
Juan Fernandez c16184a647 Bug 10767: Don't return 500s if enroll secret not found (#11121)
Return proper status code (401) on '/api/fleet/orbit/enroll' if secret is invalid.
2023-04-13 16:16:40 -04:00