Commit Graph

1192 Commits

Author SHA1 Message Date
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
Roberto Dip
a1ca172c95
allow to set up a DEP flow gated by Okta auth (#10338)
#10271
2023-03-13 10:33:32 -03:00
Martin Angers
28c02448bf
Various mdm-related documentation fixes (#10398) 2023-03-09 09:53:40 -06:00
Martin Angers
0d6b9b98d4
Add mdm.macos_settings disk encryption fields to the response of GET /hosts/{id} and device. (#10371) 2023-03-08 15:42:23 -05:00
Noah Talerman
9aa2ddd7ce
MDM docs: Correct config option (#10391)
- Correct name for config option required for MDM beta
2023-03-08 15:22:25 -05:00
Noah Talerman
50125b7ac3
Using Fleet docs: Add turn off MDM FAQ (#10237)
- Add FAQ that informs the user what does turning off MDM means and how
do I turn it back on

Addresses docs for the Turn off MDM story:
https://github.com/fleetdm/fleet/issues/8206#issuecomment-1448728160
2023-03-08 12:19:04 -08:00
Noah Talerman
63337690fd
MDM docs: Update contributor docs and add feature flags (#10373)
- Update configuration docs to include config options required for beta
users: feature flags and SCEP challenge
- Update contributor docs to point to user facing docs for generating
APNs and ABM cert and keys.
2023-03-08 13:57:02 -05:00
Gabriel Hernandez
5f30d2eafb
removing cypress references for e2e and add docs for QA wolf (#10382)
Documentation updates around cypress and new QA wolf platform for e2e
testing
2023-03-08 16:00:57 +00:00
Luke Heath
182846a686
Add disclaimer about setting FLEET_DEV_MDM_ENABLED (#10315)
- Required feature flag for MDM beta
2023-03-08 09:06:49 -05:00
Martin Angers
765c8754b6
Add enabled/disabled disk encryption activities and trigger profiles generation (#10319) 2023-03-08 08:31:53 -05:00
Luke Heath
917e07b67a
Add FLEET_DEV_MDM_ENABLED to MDM setup documentation (#10314) 2023-03-07 13:01:32 -06:00
Roberto Dip
9fb8fa464c
restore restrictive permissions for GET /mdm/apple and adjust UI (#10282)
Related to #10121 this reverts #10107, and modifies the UI to use
`mdm.enabled_and_configured` instead of the `GET /mdm/apple` endpoint so
we don't face permissions issues and Maintainers are able to see the
Controls page.

More details and rationale in
https://github.com/fleetdm/fleet/issues/10121#issuecomment-1450335235

Tested with Admins, Maintainers and Observers
2023-03-06 16:54:37 -03:00
Roberto Dip
074ea7dc8d
add config values for MDM Okta integration (#10295)
For #10228 , all new config values are automagically tested by
`TestConfigRoundtrip`.
2023-03-06 14:47:29 -03:00
Martin Angers
50a2739609
Allow updating enable_disk_encryption via the Modify Team endpoint (#10208) 2023-03-06 09:54:51 -05:00
gillespi314
36ac72d697
Add mdm profiles status filter to hosts endpoints (#10246) 2023-03-03 18:19:46 -06:00
Jacob Shandling
55fe65e062
Update aggregate profiles api (#10274)
* Change order of returned json fields
* Change field "failed" to "failing"

- [x] Manual QA
- [x] Updated docs

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-03-03 15:35:47 -08:00
Noah Talerman
57f628e6e7
MDM docs: Add MDM server in Apple Business Manager (#10236)
- Add instructions for creating an MDM server in ABM
2023-03-02 14:02:06 -05:00
Sharon Katz
a19d73511e
MAC CIS 13_2.1.1.1 (#10120) 2023-03-02 09:54:37 -05:00
gillespi314
615052a9ac
Create new API endpoint to provide aggregate status count of MDM profiles applying to hosts (#10194) 2023-03-01 18:36:59 -06:00
Lucas Manuel Rodriguez
9864048ee9
Allow setting user roles during JIT provisioning (#10193)
#8411

PS: I've opened #10209 to solve the issue with Golang Code Coverage CI
checks.

- [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:~
- ~[ ] 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-01 20:18:40 -03:00
Noah Talerman
8f84442b9a
MDM docs: End user UX for OS updates (#10078)
- Explain that Fleet automatically downloads the macOS update for the
end user
- Explain how to troubleshoot the scenario when the Mac says it's up to
date when it isn't
2023-03-01 09:56:37 -08:00
Martin Angers
4593c49ec4
Add disk_encryption option to config and team YAML (#10185) 2023-02-28 15:34:46 -05:00
Luke Heath
71f2a62b4c
Prepare for 4.28.0 (#10103) 2023-02-27 15:19:15 -08:00
Katheryn Satterlee
0455dfea92
Update list of endpoints (#10013)
Added`/api/osquery/log` to list of endpoints needed for hosts running
Orbit

.
2023-02-27 16:51:02 -06:00
gillespi314
6fec539fbf
Update API responses for hosts and labels endpoints to include host mdm info (#10141)
Issue #10126 

- Add mdm solution name to host mdm inf
- Add host mdm info in labels API response;
2023-02-27 18:40:34 -03:00
gillespi314
9031ee569d
Adjust permissions for Apple BM endpoints (#10107) 2023-02-24 19:25:26 -06:00
Noah Talerman
103edb11f0
MDM docs: Custom settings (profiles) (#10055)
Addresses:
- #9908

Changes:
- Add instructions for enforcing custom settings to macOS hosts using
profiles
- Add instructions for using iMazing Profile Creator to create profiles
- Add instructions for adding profiles to Fleet (UI and CLI)
- Add instructions for migrating settings that were enforced using the
old MDM solution to Fleet
- Update link in Fleet UI (**Custom settings** page) to point to docs

---------

Co-authored-by: Mo Zhu <mozhu888@gmail.com>
2023-02-24 16:09:14 -08:00
Juan Fernandez
7e366272c0
Feature 9386: Parse the Mac Office release notes for vulnerability processing (#9993)
This PR adds the capability of parsing the release notes posted in https://learn.microsoft.com/en-us/officeupdates/release-notes-office-for-mac into a JSON metadata file (to be released in the NVD repo) and use it for detecting vulnerabilities on Mac Office apps.
2023-02-24 14:18:25 -04:00
Benjamin Edwards
f3b0e4da72
add configuration parameters for filesystem logging file rotation (#10048) 2023-02-24 07:44:56 -05:00
Noah Talerman
ecf730d9be
MDM docs: Reset Mac password with recovery key (#10033)
- Update the instructions
2023-02-23 09:50:00 -05:00
Lucas Manuel Rodriguez
f4df9b58a4
Add docs for cis benchmarks macOS 13 (#9987)
See #9974.

---------

Co-authored-by: Mo Zhu <mo@fleetdm.com>
2023-02-22 18:07:36 -03:00
Katheryn Satterlee
066a0cbe4b
Update flags for plain osquery hosts (#10014)
Updated the recommended flags for osquery hosts to use unversioned
endpoint
2023-02-22 10:29:03 -06:00
Katheryn Satterlee
ed20ff44c1
Update endpoints for osquery (#10012)
Added `/api/osquery` to the list of endpoints to expose to public
internet.
2023-02-22 10:22:09 -06:00
Lucas Manuel Rodriguez
b3e8b6007a
Update docs for device_mapping, works on all OSs (with fleetd) (#9982)
The `google_chrome_profiles` table is present in the three OSs. The one
requirement is that the user must use fleetd.
2023-02-22 08:41:50 -03:00
Katheryn Satterlee
ad57147360
Add note about async logging (#9983)
Docs only change
2023-02-21 11:56:24 -06:00
Lucas Manuel Rodriguez
2e199dcdab
Fix golangci-lint issue and run Github action on all OSs (#9944)
We have code that builds conditionally depending on the platform (mostly
Orbit code) so we should run `golangci-lint` checks on all OSs.

This adds it to run on macOS, for Windows see:
https://github.com/fleetdm/fleet/issues/9943
2023-02-21 14:30:45 -03:00
Noah Talerman
bb1ae51128
Turn on MDM: Update end user instructions (#9959)
- Update docs
- Update instructions on My device page
2023-02-21 12:27:54 -05:00
Katheryn Satterlee
1d77b135ed
Update Audit Logging configuration docs (#9737)
Added note about the availability of audit logs and links to the
appropriate section for each logging destination.

Documentation-only change
2023-02-21 11:09:06 -06:00
Zachary Winnerman
765a43cb50
sandbox-oncall -> infrastructure-oncall and fix old channel names (#9969)
# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] 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.
- [ ] Added/updated tests
- [ ] 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-02-21 07:11:50 -05:00
Zach Wasserman
7fa739889d
Add 'Get Crowdstrike Falcon network content filter status' to query library (#9931) 2023-02-17 20:16:28 -08:00
Luke Heath
13e821d059
Prepare for 4.27.1 (#9885) 2023-02-17 19:19:02 -08:00
gillespi314
345a1f4c36
Update docs with permissions for MDM configuration profiles (#9906) 2023-02-17 13:26:39 -06:00
Lucas Manuel Rodriguez
1f97514200
Only set public IPs on host.public_ip and add docs (#9900)
#9857

The "Public IP address" field is sometimes set to a "Private IP" on the
following types of Fleet deployments:
- Local deployments.
- Deployments where Fleet is on a private network.
- Deployments where an agent connects to Fleet not via the public
internet.

This PR will prevent a private IP to be set on the `host.public_ip`
field.
And this PR also adds documentation on how Fleet deduces the public IPs
of the devices so that a user can make the changes to fix this.

- [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.~
- ~[ ] 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-02-17 13:00:56 -03:00
gillespi314
086964726d
Add API endpoints for MDM config profiles (#9817)
Issue #9586

# 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)
- [ ] Documented any permissions changes
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-02-17 09:28:28 -06:00
Benjamin Edwards
0db432f7e3
vuln processing distinct command (#9813)
closes https://github.com/fleetdm/fleet/issues/3723

Add new vuln processing command, configs, and documentation on how to utilize.
2023-02-17 10:00:57 -05:00
Noah Talerman
070f551070
MDM docs: Add supported macOS versions (#9887)
- Fleet supports MDM features on macOS 12+
2023-02-16 16:39:35 -05:00
Katheryn Satterlee
717f79f279
Update Fleet-desktop.md (#9891)
Add note for self-remediation
2023-02-16 15:23:54 -06:00
Lucas Manuel Rodriguez
b757e447bc
Fix private IP ingestion in network_interface_unix and network_interface_windows. (#9884)
#8924

This is reproduced in dogfood for `dogfood-centos-box` and
`dogfood-ubuntu-box` where their "Private IP" is also their "Public IP".
Given that these hosts have their "Primary IP" configured to be their
"Public IP" alongside their "Private IP", the `network_interface_unix`
and `network_interface_windows` queries are now changed to ingest only
private IPs for the "Private IP" field.

- [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.~
- ~[ ] 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-02-16 17:16:40 -03:00
Katheryn Satterlee
e4a8bf4130
Add note about Orbit host identifier (#9882)
Added a note reccomending `uuid` as host identifier when using Fleet
generated packages. Resolves #9033
2023-02-16 11:03:48 -06:00
Martin Angers
4a1f3988f0
Add "edited macos profiles" activity when applying custom settings via fleetctl (#9862)
#9587 and #9639
2023-02-16 13:53:26 -03:00