Commit Graph

227 Commits

Author SHA1 Message Date
Zach Wasserman
cda88779c1
Add note about ee license in ee directory (#11252) 2023-04-21 14:55:38 -07:00
Roberto Dip
ddb5894709
remove unused logic specific to DEP+Okta+ROP (#11261)
In #10338 we introduced logic to gate DEP profiles behind Okta auth
using the ROP flow.

We're not going to use that, and instead we're going to gate profiles
behind SSO, which can be used from multiple providers and supports SSO
(the initial motivation behind the ROP flow was to create a local user
account.)

This removes some of the old code, which was never used in
production/documented for the public to use.

At the moment I'm leaving the `mdm_idp_accounts` table and related
methods untouched, as it's unclear yet if we're going to need a similar
auxiliar table, and I would rather deal with the migrations all at once.
2023-04-21 14:57:52 -03:00
RachelElysia
3d78751875
CIS - WIN10 18.9.11.2.x (#11254) 2023-04-20 15:54:53 -04:00
Sharon Katz
ab572553c6
CIS_WIN_19.1-6 (#10988) 2023-04-17 15:24:00 -04:00
RachelElysia
3bd1a77716
CIS - WIN10 - 18.9.47.13 - 18.9.48.x (#11170) 2023-04-17 15:07:33 -04:00
RachelElysia
627ae5bf23
CIS - WIN10 - 17.5.x (Unable to audit/query) (#11166) 2023-04-17 14:52:46 -04:00
Lucas Manuel Rodriguez
1ebfbb14eb
New gitops role (#10850)
#8593

This PR adds a new role `gitops` to Fleet.
MDM capabilities for the role coming on a separate PR. We need this
merged ASAP so that we can unblock the UI work for 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.
- [x] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [X] 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-04-12 16:11:04 -03:00
RachelElysia
3c177aa928
CIS - WIN10 - 18.9.10 to 18.9.11 (#11101) 2023-04-12 12:47:35 -04:00
Artemis Tosini
d1cf7e5a44
Add Windows 10 CIS 18.9.65.3.9-11 (#11067)
I've tested all queries on my system. I'm not quite sure if the cast is
necessary but it was common other queries so I used it. This adds the
queries referenced in #10360

- [x] Manual QA for all new/changed functionality
2023-04-11 16:39:29 -04:00
Zach Wasserman
8118bc77f1
Update fleetd chrome install instructions (#11150) 2023-04-11 12:34:36 -07:00
Artemis Tosini
62b4627f29
Add Windows 10 CIS 18.9.65.3.x (#11007)
This adds all queries referenced in #10359. Some are in the
non-completed since I couldn't test. The referenced UI path didn't exist
on the latest version if Wondows 10 and the ADMX is supposed to be built
in on recent version of Windows.

# Checklist for submitter
- [x] Manual QA for all new/changed functionality
2023-04-11 15:26:27 -04:00
Sharon Katz
e76adbecc8
CIS_WIN_18.5.9.2-BUG-FIX (#10955)
1. FIX for **18.5.9.2** - successfully tested for positive/negative
cases.

2. BUG in **18.5.11.3** and **18.5.11.4** - Registry keys do not appear.
Moved to **`NON-COMPLETED`**
2023-04-11 13:35:32 -04:00
Roberto Dip
a59b8a5096
various profile fixes (#11084)
### Related tickets

https://github.com/fleetdm/fleet/issues/10775
https://github.com/fleetdm/fleet/issues/10678
https://github.com/fleetdm/fleet/issues/11024
https://github.com/fleetdm/fleet/issues/11026

### What's happening

- Implemented the hashing mechanism defined by @mna in #10678, however
this mechanism is mainly relevant for batch profile updates via the CLI,
we can't leverage it when a host switches teams.
- Modified `BulkSetPendingMDMAppleHostProfiles` so when two profiles
with the same identifier are sheduled both for removal and update, the
function will now mark only the `install` as `pending` so it's picked by
the cron, and will `DELETE` the `remove` entry from the database so it's
not picked by the cron and never sent to the user.
- `GetHostMDMProfiles` and consequently the profiles returned in `GET
/api/_version_/fleet/hosts` return `host_mdm_apple_profiles.state =
NULL` as "Enforcing (pending", the distinction between `status =
'pending'` and `status IS NULL` is only useful for the cron, for users
both mean the same thing, and all our profile aggregations already
behave this way.
- Using the solution implemented by @gillespi314 in
https://github.com/fleetdm/fleet/pull/10998 we're now deleting the host
row from `host_disk_encryption_keys` if a host is moved from a team that
enforces disk encryption to a team that doesn't.


# Checklist for submitter

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

- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-04-08 23:23:36 -03:00
Roberto Dip
77e5c004f4
implement bootstrap packages during DEP enrollment (#11052)
#10213
2023-04-07 17:31:02 -03:00
Marcos Oviedo
a576668cad
Pushing CIS policies from 18.9.103.1 to 18.9.105.2.1 (#10759)
This relates to #10366
2023-04-06 17:53:16 -03:00
Marcos Oviedo
4419820707
Pushing CIS policies for bullets 18.9.108.x.x (#10742)
This relates to #10367
2023-04-06 17:27:20 -03:00
Marcos Oviedo
242716c905
Adding COLLATE NOCASE to address case insesitive registry behavior (#11011)
It relates to bugs found in #9922
2023-04-05 17:22:07 -03:00
Sharon Katz
cea358f53a
CIS WIN 18.2 (#10876)
18.2.1 - successfully Tested for negative and positive cases
18.2.2 - successfully Tested for negative and positive cases
18.2.3 - successfully Tested for negative and positive cases
18.2.4 - successfully Tested for negative and positive cases
18.2.5 - successfully Tested for negative and positive cases
18.2.6 - successfully Tested for negative and positive cases
2023-04-05 10:52:24 -04:00
Artemis Tosini
0b6313bd6b
CIS win10 18.9.46-47 (#10916)
Many of these queries reference registry keys that do not exist so I
moved them to the NON-COMPLETED file. However, all queries name in
#10355 are included in either the main or non completed file.

- [x] Manual QA for all new/changed functionality
2023-04-04 15:41:19 -04:00
Roberto Dip
77d63f12dd
fix TestGroupFromBytesWithWin10CISQueries (#10953)
Go tests are failing in main with:

```
=== RUN   TestGroupFromBytesWithWin10CISQueries
    spec_test.go:69:
        	Error Trace:	/Users/roperzh/fleet/pkg/spec/spec_test.go:69
        	Error:      	Received unexpected error:
        	            	failed to unmarshal spec item error converting YAML to JSON: yaml: line 20: mapping values are not allowed in this context:
        	            	apiVersion: v1
        	            	kind: policy
        	            	spec:
        	            	  name: CIS - Ensure 'Audit Other Object Access Events' is set to 'Success and Failure'
        	            	  platforms: win10
        	            	  platform: windows
        	            	  description: |
        	            	    This policy setting allows you to audit events generated by the management of task scheduler jobs or COM+ objects.
        	            	    For scheduler jobs, the following are audited:
        	            	      -  Job created.
        	            	      -  Job deleted.
        	            	      -  Job enabled.
        	            	      -  Job disabled.
        	            	      -  Job updated.
        	            	    For COM+ objects, the following are audited:
        	            	      -  Catalog object added.
        	            	      -  Catalog object updated.
        	            	      -  Catalog object deleted.
        	            	The recommended state for this setting is: Success and Failure.
        	            	  resolution: |
        	            	    Automatic method:
        	            	    Ask your system administrator to establish the recommended configuration via GP, set the following UI path to Success and Failure:
        	            	    'Computer Configuration\Policies\Windows Settings\Security Settings\Advanced Audit Policy Configuration\Audit Policies\Object Access\Audit Other Object Access Events'
        	            	  query: |
        	            	    SELECT 1 FROM mdm_bridge where mdm_command_input = "<SyncBody><Get><CmdID>1</CmdID><Item><Target><LocURI>./Device/Vendor/MSFT/Policy/Result/Audit/ObjectAccess_AuditOtherObjectAccessEvents</LocURI></Target></Item></Get></SyncBody>"
        	            	    AND mdm_command_output = 3;
        	            	  purpose: Informational
        	            	  tags: compliance, CIS, CIS_Level1, CIS_win10_enterprise_1.12.0, CIS_bullet_17.6.3
        	            	  contributors: sharon-fdm
        	Test:       	TestGroupFromBytesWithWin10CISQueries
--- FAIL: TestGroupFromBytesWithWin10CISQueries (0.31s)
```

This adds a missing indentation to make them pass.
2023-04-04 08:39:35 -03:00
gillespi314
750d64ccca
Add dontAllowFDEDisable to FileVault config profile template (#10941) 2023-04-03 14:22:41 -05:00
Sharon Katz
992a68c435
WIN CIS 17.6.1 (#10912) 2023-04-03 15:09:26 -04:00
Sharon Katz
ba290ffbb7
move-18.9.47.9.4-to-not-completed (#10938)
18.9.47.9.4 needs to be tested then moved back to the main .yml
2023-04-03 15:06:59 -04:00
Sharon Katz
f42ea50cff
18.9.57.1 (#10861) 2023-03-30 13:31:55 -04:00
Sharon Katz
5f42f39019
CIS_WIN_18.9.47.9.x (#10791) 2023-03-29 16:10:15 -04:00
RachelElysia
a21c96330b
CIS - WIN10 - 19.7.28 to 19.7.47 (#10781) 2023-03-29 12:53:55 -04:00
Lucas Manuel Rodriguez
22774243e2
Delete cis-policy-query-verify-iCloud-Keychain-disabled.yml (#10851)
We already have 2.1.1.1 with the `enable`/`disable` approach in the main
yaml.
2023-03-29 13:29:10 -03:00
Artemis Tosini
1e976f0d25
Add Windows 10 CIS 17.1-17.3 queries (#10522)
These 6 queries are extremely similar so I just put them in a single
commit. These issues are tracked in #10139.
2023-03-29 11:01:05 -04:00
Sharon Katz
d54e354022
CIS MAC 1.1 fix (#10619) 2023-03-29 09:24:33 -04:00
Juan Fernandez
aecc2fed75
Feature 9834: Add published date to vulnerability object (#10434)
This only applies to Premium users, we want to show the vulnerabilities' published date anywhere vulnerabilities are shown including API endpoints and third party integrations.
2023-03-28 16:11:31 -04:00
Lucas Manuel Rodriguez
40265d0e6f
Fix SMTP e-mail send when SMTP server has credentials (#10758)
#9609

This PR also fixes #10777.

The issue is: We were using `svc.AppConfig` instead of
`svc.ds.AppConfig` to retrieve the SMTP credentials.
`svc.AppConfig` obfuscates credentials, whereas `svc.ds.AppConfig` does
not.
To help prevent this from happening again I've renamed `svc.AppConfig`
to `svc.AppConfigObfuscated`.
I've also added a new test SMTP server
(https://github.com/axllent/mailpit) that supports Basic Authentication
and tests that make use of it to catch these kind of bugs (the tests are
executed when running `go test` with `MAIL_TEST=1`).

- [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-03-28 15:23:15 -03:00
Artemis Tosini
1d2ae58d5f
Add macOS CIS 5.3.2 (#10726)
Add 2 new tables: corestorage_logical_volumes and corestorage_logical_volume_families.
Add a query that uses these tables
2023-03-28 11:57:38 -04:00
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