fleet/docs/Using-Fleet
Lucas Manuel Rodriguez 3757aace08
Add UUID to Fleet errors and clean up error msgs (#10411)
#8129 

Apart from fixing the issue in #8129, this change also introduces UUIDs
to Fleet errors. To be able to match a returned error from the API to a
error in the Fleet logs. See
https://fleetdm.slack.com/archives/C019WG4GH0A/p1677780622769939 for
more context.

Samples with the changes in this PR:
```
curl -k -H "Authorization: Bearer $TEST_TOKEN" -H 'Content-Type:application/json' "https://localhost:8080/api/v1/fleet/sso" -d ''
{
  "message": "Bad request",
  "errors": [
    {
      "name": "base",
      "reason": "Expected JSON Body"
    }
  ],
  "uuid": "a01f6e10-354c-4ff0-b96e-1f64adb500b0"
}
```
```
curl -k -H "Authorization: Bearer $TEST_TOKEN" -H 'Content-Type:application/json' "https://localhost:8080/api/v1/fleet/sso" -d 'asd'
{
  "message": "Bad request",
  "errors": [
    {
      "name": "base",
      "reason": "json decoder error"
    }
  ],
  "uuid": "5f716a64-7550-464b-a1dd-e6a505a9f89d"
}
```
```
curl -k -X GET -H "Authorization: Bearer badtoken" "https://localhost:8080/api/latest/fleet/teams"
{
  "message": "Authentication required",
  "errors": [
    {
      "name": "base",
      "reason": "Authentication required"
    }
  ],
  "uuid": "efe45bc0-f956-4bf9-ba4f-aa9020a9aaaf"
}
```
```
curl -k -X PATCH -H "Authorization: Bearer $TEST_TOKEN" "https://localhost:8080/api/latest/fleet/users/14" -d '{"name": "Manuel2", "password": "what", "new_password": "p4ssw0rd.12345"}'
{
  "message": "Authorization header required",
  "errors": [
    {
      "name": "base",
      "reason": "Authorization header required"
    }
  ],
  "uuid": "57f78cd0-4559-464f-9df7-36c9ef7c89b3"
}
```
```
curl -k -X PATCH -H "Authorization: Bearer $TEST_TOKEN" "https://localhost:8080/api/latest/fleet/users/14" -d '{"name": "Manuel2", "password": "what", "new_password": "p4ssw0rd.12345"}'
{
  "message": "Permission Denied",
  "uuid": "7f0220ad-6de7-4faf-8b6c-8d7ff9d2ca06"
}
```

- [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)
- ~[ ] 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:
- [X] 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-03-13 13:44:06 -03:00
..
configuration-files Various mdm-related documentation fixes (#10398) 2023-03-09 09:53:40 -06:00
Adding-hosts.md Update flags for plain osquery hosts (#10014) 2023-02-22 10:29:03 -06:00
Application-security.md change relative links in documentation (#8441) 2022-10-26 18:26:49 -05:00
Audit-Activities.md Add enabled/disabled disk encryption activities and trigger profiles generation (#10319) 2023-03-08 08:31:53 -05:00
Automations.md change relative links in documentation (#8441) 2022-10-26 18:26:49 -05:00
CIS-Benchmarks.md MAC CIS 13_2.1.1.1 (#10120) 2023-03-02 09:54:37 -05:00
Detail-Queries-Summary.md Add enabled/disabled disk encryption activities and trigger profiles generation (#10319) 2023-03-08 08:31:53 -05:00
FAQ.md Using Fleet docs: Add turn off MDM FAQ (#10237) 2023-03-08 12:19:04 -08:00
Fleet-desktop.md Update Fleet-desktop.md (#9891) 2023-02-16 15:23:54 -06:00
Fleet-UI.md Fleet Documentation: Update agent options and enrollment secret documentation (#9565) 2023-02-13 10:45:37 -05:00
fleetctl-CLI.md update file carver block size and various MySQL references (#9625) 2023-02-02 01:01:34 -05:00
Learn-how-to-use-Fleet.md Fleet Documentation: Update agent options and enrollment secret documentation (#9565) 2023-02-13 10:45:37 -05:00
Log-destinations.md Generate audit logs for activities (#9001) 2022-12-23 19:04:13 -03:00
Mobile-device-management.md Add disclaimer about setting FLEET_DEV_MDM_ENABLED (#10315) 2023-03-08 09:06:49 -05:00
Monitoring-Fleet.md change relative links in documentation (#8441) 2022-10-26 18:26:49 -05:00
Orbit.md Fix broken links in Adding-hosts.md and Orbit.md (#9230) 2023-01-18 10:04:44 -06:00
Osquery-process.md Add new page explaining how osquery children process are terminated (#8134) 2022-10-11 14:09:56 -04:00
Permissions.md restore restrictive permissions for GET /mdm/apple and adjust UI (#10282) 2023-03-06 16:54:37 -03:00
README.md Update log destination docs (#8242) 2022-10-18 13:18:15 -04:00
REST-API.md Add UUID to Fleet errors and clean up error msgs (#10411) 2023-03-13 13:44:06 -03:00
Security-audits.md Publish pentest blog + Security-audits.md section (#5659) 2022-05-11 09:05:18 -04:00
Supported-browsers.md Update Supported-browsers.md (#5802) 2022-05-19 07:37:20 +09:00
Supported-host-operating-systems.md Link to our maintained tables (#8675) 2022-11-11 13:42:05 -08:00
Teams.md Remove packs from docs (#9452) 2023-01-20 16:47:24 -06:00
Usage-statistics.md Add orbit version and osquery version usage statistics (#8229) 2022-10-24 11:12:56 -05:00
Vulnerability-Processing.md Feature 9386: Parse the Mac Office release notes for vulnerability processing (#9993) 2023-02-24 14:18:25 -04:00

Using Fleet

Fleet UI

Provides documentation about running and scheduling queries from within the Fleet UI

fleetctl CLI

Includes resources for setting up and configuring Fleet via the fleetctl CLI

REST API

Provides resources for working with Fleet's API and includes example code for endpoints

Adding hosts

Provides resources for enrolling your hosts to Fleet

Log destinations

Includes documentation on the log destinations for sending with osquery logs

Osquery processes

Includes documentation about osquery children processes and under which conditions they are terminated

Monitoring Fleet

Provides documentation for load balancer health checks and working with Fleet server metrics and performance

Security best practices

Includes resources for ways to mitigate against the OWASP top 10 issues

FAQ

Includes frequently asked questions and answers about using Fleet from the Fleet community