Commit Graph

195 Commits

Author SHA1 Message Date
Roberto Dip
98845f03a6
remove feature flags to enable MDM (#10746)
https://github.com/fleetdm/fleet/issues/10025
2023-03-27 16:30:29 -03:00
Martin Angers
b6e10eb6da
Update host MDM profile status to pending in response to triggering events (#10443) 2023-03-27 14:43:01 -04:00
Marcos Oviedo
518cbecfbf
cis18.9.100.x to cis18.9.102.x (#10717)
This relates to #10365
2023-03-23 17:54:16 -03:00
RachelElysia
ee116d14ca
CIS - WIN10 - 19.7.4 to 19.7.8 (#10715)
## Issue 
Cerra #10369

## Description
- Lots of trial and error to get the wild card to work (only works with
single \ in the path)
- 6 of 7 tested and working
- Final policy is intended for Windows 11
2023-03-23 17:08:00 -03:00
RachelElysia
1256d1d4b6
CIS - WIN10 - 18.4.1 - 18.4.13 (#10707) 2023-03-23 11:34:48 -04:00
Martin Angers
2fb5aa629d
Normalize the naming of mdm settings, update docs and document missing ones (#10681)
#10408
2023-03-23 07:30:28 -03:00
Josh Brower
c83bc3dd68
CIS WIN10 - 18.5.4.1 - 18.2.11.4 (#10686) 2023-03-22 16:39:10 -04:00
RachelElysia
01e5742d60
CIS - WIN10 - 18.9.89 to 18.9.91 (#10641) 2023-03-21 14:23:00 -04:00
RachelElysia
45bc73be3c
CIS - WIN10 - 18.9.18 to 18.9.27 (#10633) 2023-03-21 11:25:24 -04:00
RachelElysia
c82026e930
CIS - WiN10 - 18.9.31 to 18.9.45 (#10632) 2023-03-21 09:51:26 -04:00
RachelElysia
f6741a43ec
CIS - WIN10 - 18.3.X policies (#10336) 2023-03-20 16:40:04 -04:00
Roberto Dip
61a8a80514
allow to rotate disk encryption key from My Device (#10592)
Related to https://github.com/fleetdm/fleet/issues/8961

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2023-03-20 16:14:07 -03:00
Sharon Katz
535ea715a4
Reformat MAC CIS 6.3.5 queries (#10560) 2023-03-20 11:50:35 -04:00
RachelElysia
95fb828a03
CIS - WIN10 - 18.8.17 - 18.8.27 (#10430) 2023-03-20 09:41:11 -04:00
Roberto Dip
f04ff27180
Prevent user action in profiles managed by Fleet (#10559)
related to https://github.com/fleetdm/fleet/issues/10547,
https://github.com/fleetdm/fleet/issues/10549,
https://github.com/fleetdm/fleet/issues/10550 and
https://github.com/fleetdm/fleet/issues/10552 this prevents user
interaction with fleet-managed profiles, including:

- batch actions
- individual POST/UPDATE/DELETE actions
- listing

# Checklist for submitter

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

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
2023-03-17 18:52:30 -03:00
RachelElysia
0614a8543f
CIS - WIN10 - 18.9.17.x (#10529) 2023-03-17 14:53:41 -04:00
RachelElysia
5af7aaf12a
CIS - WIN10 - 18.8.38+ (#10449) 2023-03-17 11:41:19 -04:00
Zach Wasserman
42b3e5602e
Fleetd for Chrome (#10281)
# 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] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-03-16 09:01:10 -03:00
Zach Wasserman
05d8f5dbbd
Fix indentation typo in CIS yaml (#10525)
Caused a failure in
b7ebddcd66/pkg/spec/spec_test.go (L64)
2023-03-15 17:05:31 -07:00
Sharon Katz
58b8d65b6f
MAC CIS 13 2.5.1 (#10168) 2023-03-15 16:40:54 -04:00
RachelElysia
b49c6c82c3
CIS - WIN10 - Move approved policies to correct file (#10509) 2023-03-15 11:33:30 -04:00
RachelElysia
3a170a8df0
CIS - WIN10 - 18.8.28 to 18.8.37 (#10452) 2023-03-15 09:28:54 -04:00
Lucas Manuel Rodriguez
d09252e1ea
Fix YAML and add item to error (#10503) 2023-03-15 08:50:13 -03:00
Martin Angers
276c767ab9
Update aggregated_stats to support "no team" in addition to "all teams" (#10466) 2023-03-14 17:01:16 -04:00
RachelElysia
7fe196304c
CIS - WIN10 - 18.9.12 to 18.9.16 (#10465) 2023-03-14 16:36:34 -04:00
Lucas Manuel Rodriguez
6d918d1366
Add enable_jit_role_sync config (#10478)
#8411

We decided to only update roles for existing accounts if enabled by a
new setting (disabled by default) `sso_settings.enable_jit_role_sync`.

- ~[ ] 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-03-14 17:17:08 -03:00
Sharon Katz
c4fa0393af
Audit Location Services Access (#10459)
Tested on my Mac
2023-03-14 12:53:32 -04:00
Marcos Oviedo
a8282864e3
CIS 18.9.4.x to cis 18.9.8.x (#10451)
This relates to #10347
2023-03-13 17:19:21 -03:00
Artemis Tosini
924206982b
Fix indentation issue in macOS 13 CIS (#10448) 2023-03-13 14:19:48 -04:00
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
Artemis Tosini
ec746374d3
Add macOS CIS 6.3.5 (Safari Hide IP Addresses) (#10316)
This adds two conflicting checks for macOS CIS 6.3.5. Proxying requests
to 3rd party trackers may protect private information but it may also be
against company policy as it routes data throught a 3rd party service.

There's no documentation about now to set this through a policy or
script, and in fact I can find no information about what this bitfield
means, except the incorrect and conflicting documentation in the CIS
pdf.

Co-authored-by: Sharon Katz <sharon@fleetdm.com>
2023-03-13 12:24:00 -04:00
Marcos Oviedo
9cb2ef14ff
CIS 5.23 to CIS 5.45 (#10410)
This relates to #9926
2023-03-13 10:49:33 -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
RachelElysia
f97b13d8c0
CIS - WIN10 - 18.8.1. - 18.8.16 (#10407) 2023-03-13 09:25:04 -04:00
Roberto Dip
bf776536ca
add PoC for puppet + fleet MDM (#10424) 2023-03-10 16:06:40 -06:00
RachelElysia
3ee113911c
CIS - WIN10 - 18.6.x and 18.7.x policies (#10344) 2023-03-10 14:29:26 -05:00
Artemis Tosini
af4c3f7061
Add macOS CIS 5.3.1 (#10397)
This adds a new check about whether all APFS volumes are encrypted. I
needed to add a new table, and I took that opportunity to add another so
that osquery has all information from `diskutil apfs list -plist`.

Note that it is somewhat unclear whether to use the `encryption` or
`filevault` field in the query. FileVault is about whether the volume is
encrypted with a password and Encryption is about whether it is
encrypted at all, since all modern macs have hardware-backed disk
encryption.
2023-03-10 12:29:14 -05:00
Sharon Katz
8c04711f60
add minimumMixedCaseCharacters (#10401) 2023-03-09 15:44:28 -05:00
Marcos Oviedo
469ce0f841
Fixing CIS testcases (#10296)
This relates to #9848
2023-03-09 11:33:20 -03:00
Sharon Katz
312ad09e6d
Separate YMLs (#10386) 2023-03-08 13:55:55 -05:00
Sharon Katz
eae7ca23fa
empty non-complited yml (#10389) 2023-03-08 13:46:23 -05:00
Martin Angers
765c8754b6
Add enabled/disabled disk encryption activities and trigger profiles generation (#10319) 2023-03-08 08:31:53 -05:00
Josh Brower
4316fe945f
Initial cut for CIS 9.1.x (#10307) 2023-03-07 17:30:12 -05:00
Martin Angers
50a2739609
Allow updating enable_disk_encryption via the Modify Team endpoint (#10208) 2023-03-06 09:54:51 -05:00
Artemis Tosini
07a045301b
Add macOS CIS 2.6.7 (Administrator password for preferences) (#10259)
This adds a test for if passwords are required are required to access
some system-wide preferences on macOS. It's marked as "Manual" in the
CIS pdf but I wasn't sure how to copy that into here.
2023-03-03 15:41:51 -05:00
Sharon Katz
cf18f1f79f
CIS_MAC13_5.2.5 (#10251) 2023-03-03 15:14:00 -05:00
Sharon Katz
2295575fdb
CIS_MAC13_2.8.1 (#10192) 2023-03-03 15:12:23 -05:00
Marcos Oviedo
a2e8a787c9
Pushing CIS policies check for 2.2.8 to 2.2.39 (#10283)
This relates to #9848
2023-03-03 17:05:07 -03:00
Marcos Oviedo
aafc59bd7e
CIS policies for 2.3.14.x-2.3.15.x (#10211)
This relates to #9923
2023-03-03 16:56:11 -03:00
Marcos Oviedo
83fb9d312c
CIS policies for 2.3.11.x (#10167)
This relates to #9851
2023-03-03 16:42:22 -03:00