fleet/cmd
Roberto Dip 2447a371b0
use nanomdm's multi service + integration tests and fixes (#9269)
**Use nano's multi service**

This allows us to integrate more seamlessly with nano and to run our
custom MDM logic _after_ the request was handled by nano, which gives us
more flexibility (for example: now we can issue commands after a
TokenUpdate message)

From nano's code:

> MultiService executes multiple services for the same service calls.
> The first service returns values or errors to the caller. We give the
> first service a chance to alter any 'core' request data (say, the
> Enrollment ID) by waiting for it to finish then we run the remaining
> services' calls in parallel.

**Integration tests + fixes**

- Move some of the service logic from `cmd/` to `server/service`
- Add integration tests for the MDM enrollment flow, including SCEP
authentication.
- Fixed a bug that set `host_mdm.mdm_id = 0`  during MDM enrollment due
  to how MySQL reports the last insert id when `ON DUPLICATE KEY` is
  used.
- Completely remove the host row from `host_mdm` when a device is
  unenrolled from MDM to match the behavior of how we ingest MDM data
  from osquery

Related to https://github.com/fleetdm/fleet/issues/8708,
https://github.com/fleetdm/fleet/issues/9034
2023-01-16 17:06:30 -03:00
..
cpe Enable errcheck linter for golangci-lint (#8899) 2022-12-05 16:50:49 -06:00
fleet use nanomdm's multi service + integration tests and fixes (#9269) 2023-01-16 17:06:30 -03:00
fleetctl Add software_updated_at field to host (#9116) 2023-01-09 08:55:43 -03:00
msrc Fleet server and tooling to use NETWORK_TEST_GITHUB_TOKEN when environment variable is set. (#9143) 2023-01-03 14:56:11 -03:00
osquery-perf Simplify disk encryption query in linux and filter at ingestion (#9037) 2022-12-19 10:01:59 -03:00