Commit Graph

446 Commits

Author SHA1 Message Date
Roberto Dip
420dfe1cd0
batch set profiles as pending on profile-related actions (#15179)
final step of #14364
2023-11-20 11:16:02 -03:00
Roberto Dip
319b64f368
allow to set mdm.windows_settings.custom_settings in configs (#15145)
for #14361 this adds the bits related to saving a slice of strings with
paths to configuration profiles.

---------

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
Co-authored-by: Marko Lisica <83164494+marko-lisica@users.noreply.github.com>
2023-11-15 13:58:46 -03:00
Martin Angers
8c3b23a142
Add endpoint to upload an MDM custom profile for Windows and macOS (#15150) 2023-11-15 10:58:59 -05:00
Jahziel Villasana-Espinoza
70048f5f91
14753 windows ps1 api (#15113)
# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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] 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-11-14 09:23:51 -05:00
Martin Angers
c7d5e5e618
Update authorization for MDM profiles to be platform-independent (#15023) 2023-11-08 11:36:57 -05:00
dependabot[bot]
6e89486bab
Bump semver from 5.7.1 to 5.7.2 in /ee/fleetd-chrome (#12724) 2023-11-01 14:00:14 -05:00
dependabot[bot]
43c3721122
Bump @babel/traverse from 7.21.2 to 7.23.2 in /ee/fleetd-chrome (#14635) 2023-11-01 10:57:59 -05:00
Josh Brower
40fbdb0c06
Windows_CIS_2.0.0_Update-01 (#13289)
Details here:
https://docs.google.com/spreadsheets/d/1HZn7e4zpd5nfxY0MhSdX8MkGpdpxyLdSZjk0Auo1WaQ/edit#gid=610757841
2023-10-30 11:31:52 -04:00
dependabot[bot]
1e28290acc
Bump graphql from 16.6.0 to 16.8.1 in /ee/fleetd-chrome (#14053) 2023-10-27 15:09:39 -05:00
guangwu
33858d7301
chore: remove refs to deprecated io/ioutil (#14485)
# 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 (docs/Using
Fleet/manage-access.md)
- [ ] 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)).

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-10-27 15:28:54 -03:00
Roberto Dip
683c1dfe95
allow macOS hosts that turned on MDM via SSO to renew their enrollment (#14739)
for #14238
2023-10-27 12:42:30 -03:00
gillespi314
c10ee875f2
Fix validations for applying MDM config changes (#14517) 2023-10-26 15:48:32 -05:00
Roberto Dip
540f8b9657
Bring MDM hotfixes to main (#14494)
This brings the hotfixes in https://github.com/fleetdm/fleet/pull/14433
for https://github.com/fleetdm/confidential/issues/3922 and
https://github.com/fleetdm/confidential/issues/https://github.com/fleetdm/fleet/issues/3904

---------

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2023-10-13 08:49:11 -03:00
gillespi314
35cfde8b34
Always return empty host scripts details for unsupported platforms (#14451) 2023-10-12 13:25:05 -05:00
dependabot[bot]
493733c559
Bump postcss from 8.4.21 to 8.4.31 in /ee/fleetd-chrome (#14316) 2023-10-11 13:56:52 -05:00
Roberto Dip
9ffa11c25d
Feat: saved scripts (#14409)
For #9537
2023-10-10 19:00:45 -03:00
Marcos Oviedo
f0d77ab3db
Merging Bitlocker feature branch (#14350)
This relates to #12577

---------

Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: Roberto Dip <dip.jesusr@gmail.com>
2023-10-06 19:04:33 -03:00
Noah Talerman
9c7079f50c
Windows MDM docs: turn on Windows MDM (#13943)
- Add new "Windows setup" page to "Device Management" section of docs
- Rename "MDM setup"  page to "macOS setup." Update links and add redirect
- Rename existing "macOS setup" page to "macOS setup experience." Update links. Did not add redirect because of conflict with "macOS setup" page
- Remove "MDM" from all MDM doc page titles
2023-10-04 15:39:09 -04:00
Jacob Shandling
1993c02b3a
Move code for --local-wix-dir into ee directory (#14104) 2023-09-25 10:38:03 -07:00
Lucas Manuel Rodriguez
4bdef5dbe9
Add labels to the fleetd extensions feature (#14008)
#13287

- [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 (docs/Using
Fleet/manage-access.md)~
- ~[ ] 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-09-22 11:09:09 -03:00
Lucas Manuel Rodriguez
2daebb41b1
Fix extension delivery bug fix Windows extension paths to .ext.ext (#13986)
Found these bugs while testing the extensions feature for #13287.

- [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 (docs/Using
Fleet/manage-access.md)~
- ~[ ] 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.
- [x] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2023-09-22 05:17:27 -03:00
RachelElysia
9c5d7faa58
ChromeOS tables: Errors surfaced in Fleet UI (#12376) 2023-09-19 10:06:29 -04:00
Noah Talerman
c481d67abb
Add docs for Fleet's Puppet module (#13837)
- Add doc page to explain setup and usage of Fleet's Puppet module
2023-09-13 16:39:41 -04:00
Roberto Dip
541cc638e4
Add an activity log when an script execution is requested (#13655)
For #9553
2023-09-05 20:09:29 -03:00
Gabriel Hernandez
327f216edb
Feat api get script results (#13701)
relates to #13306

implements the GET `scripts/results/{id}` endpoint.

API docs @ https://github.com/fleetdm/fleet/pull/13720
2023-09-05 17:38:53 -03:00
gillespi314
37fb4b0dab
Add fleetctl run-script command (#13622) 2023-09-05 14:14:09 -05:00
gillespi314
72f2f7ac12
Adjust error messages for run scripts API (#13618) 2023-08-31 10:37:51 -05:00
Martin Angers
cbc3f32e9d
Adjust response payload, messages and validations for /scripts/run/* endpoints. (#13607) 2023-08-31 09:08:50 -05:00
Roberto Dip
183e2e56cf
automatically set DEP profile for teams created by Puppet (#13496)
for #13363
2023-08-28 11:36:00 -03:00
Sharon Katz
80df9e4c51
13461-missing-win10-CIS-9.3.9 (#13514) 2023-08-25 13:37:03 -04:00
Jacob Shandling
1e99abed19
Return all ChromeOS results as strings; Refactor system_state table to use callback-based API calls (#12669) 2023-08-25 09:20:17 -07:00
Roberto Dip
d5c7e7eb51
store email used for authentication during MDM SSO (#13480)
related to #13431, this stores the email during SSO auth. Still left to
figure out how to link this email to an specific host.
2023-08-23 18:23:26 -03:00
Martin Angers
4045116fac
Add orbit notification and API endpoints to send/receive scripts to hosts (part 2 of ticket) (#13447) 2023-08-23 16:47:47 -04:00
Tim Lee
74ccff8161
13433 host query optimization (#13451) 2023-08-23 10:34:55 -06:00
Lucas Manuel Rodriguez
77c817aa0b
Fix Windows CIS policies issues found by new fleetctl apply checks (#13460)
Found while working on #12696.

This was caught be a recent check added by @mostlikelee to `fleetctl
apply` (#13294).

Sample error:
```sh
$ fleetctl apply --context loadtest -f ee/cis/win-10/cis-policy-queries.yml
Error: applying policies: policy names must be globally unique. Please correct policy "CIS - Ensure 'Windows Firewall: Public: Firewall state' is set to 'On (recommended)'\n" and try again.
```
2023-08-23 07:42:41 -03:00
Martin Angers
de32faefdb
Add /scripts/run and scripts/run/sync API endpoints to run scripts (part 1) (#13417) 2023-08-21 14:47:19 -04:00
Lucas Manuel Rodriguez
6a91bc54cf
Add tooling for load testing Windows CIS policies and fix typos in policy queries (#13384)
#11939

- This PR fixes typos in three CIS Windows queries (the queries were
failing with `invalid SQL syntax`).
- Also adds tooling to perform similar testing that we ran for macOS
(using `fleetd_tables` as an extension).
2023-08-18 17:32:22 -03:00
Martin Angers
554e024f7b
Fix gitops access when using --dry-run with fleetctl apply (#13178) 2023-08-07 13:51:11 -04:00
gillespi314
5b27581fdc
Configure bootstrap package and end user auth for newly created teams in MDM pre-assignment flow (#13089) 2023-08-07 09:43:39 -05:00
Gabriel Hernandez
cb89b725ea
implement fleetctl apply new team with secret (#13062)
relates to #12907

implement adding an enroll secret when creating a new team with
`fleetctl apply` if none is provided.

- [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.
- [ ] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-08-02 17:42:01 +01:00
RachelElysia
9d105a4d12
ChromeOS Tables: Integration test for 3 tables (#12844) 2023-08-02 11:31:22 -04:00
Roberto Dip
442e03b276
Improve the error handling for MDM SSO during DEP enrollment (#12966)
For #12692
2023-07-26 14:20:36 -03:00
Roberto Dip
4940a5e186
try a new approach to read node config (#12977) 2023-07-26 14:16:53 -03:00
Roberto Dip
833c851706
fetch the correct hiera information based on the node env (#12944)
For https://github.com/fleetdm/fleet/issues/12897
2023-07-26 12:04:11 -03:00
Roberto Dip
02f70eb528
add instructions to develop and test the Puppet module (#12945) 2023-07-26 10:23:03 -03:00
Roberto Dip
e99f3aeab7
fixes for the puppet module (#12818)
- Don't cache requests to get profiles, they don't happen in order when
run agains a real Puppet server
- Report resource has changed if the profile was in the host but the new
resource type is absent
2023-07-18 14:53:43 -03:00
Roberto Dip
df0672be36
version bump for the puppet module (#12824) 2023-07-18 13:06:21 -03:00
Roberto Dip
e8070e0bd8
properly report changed profiles in the Puppet module (#12719)
For #12480
2023-07-14 12:53:03 -03:00
Gabriel Hernandez
9aa7c0c714
add dark and light background logo colors and show them on mdm migrat… (#12681) 2023-07-13 19:35:25 +01:00
Roberto Dip
eb75e303ec
change how team assignment works for the Puppet module (#12566)
For #12532, all details of how this works/why is done are in the issue
description.
2023-07-13 15:00:45 -03:00
Roberto Dip
666ae8d787
ensure ds.TeamByName returns a 4xx response if no team is found (#12620)
this helps consumer of the datastore method handle the not found
scenario better and ensures we always return a 4xx code by default if we
can't find a matching team.

seems like calls to this method were special-cased everywhere except in
the apply user roles endpoint, where we returned a `500` status code if
we couldn't find a team.
2023-07-13 11:55:05 -03:00
Roberto Dip
53f0e281bf
set DeferForceAtUserLoginMaxBypassAttempts in FV profile (#12729)
Related to #12608, this automatically sets the
`DeferForceAtUserLoginMaxBypassAttempts` property to `1` on the
FileVault profile that's generated by Fleet.

This changeset also includes a migration to modify old FileVault
profiles that already exist in the database, and by virtue of that a
`InstallProfile` command will be issued to hosts that already have FV
enabled. During testing we found:

1. This doesn't affect users with FV already installed, they silently
get the profile updated without any changes.
2. Since the profile needs to be re-delivered, it'll go through the full
"pending" -> "verifying" -> "verified" cycle.
2023-07-13 11:54:05 -03:00
Lucas Manuel Rodriguez
810eb58b95
macOS CIS: Use find command (exposed as fleetd table) instead of relying on the osquery core file table (#12560)
#10292, #12554

When scanning tens of thousands of files for permissions, using the
`find` command exposed as a fleetd table is more performant than trying
to use the `file` table. This change caused the watchdog to *stop*
killing osquery because of exceeding memory or CPU limit.

- [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:
- [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-06-29 16:22:41 -03:00
Martin Angers
1db2f7646a
Implement Windows MDM programmatic unenrollment (notification + orbit trigger) (#12505) 2023-06-28 09:13:37 -04:00
Kenny Botelho
31dfcc1e1a
Add Puppet function for sending custom MDM commands (#12534) 2023-06-27 13:17:37 -03:00
Lucas Manuel Rodriguez
feb4e65be6
Optimize macOS CIS query 5.1.5 (#12506)
#10292

The query was processing *every* file under `/Applications/`, which
makes it super expensive both in CPU usage and Memory footprint. This
query was the main culprit of triggering worker process kills by the
watchdog.

On some runs it triggered CPU usage alerts:
```
7716:W0623 15:38:05.402959 221732864 watcher.cpp:415] osqueryd worker (72976) stopping:
Maximum sustainable CPU utilization limit 1200ms exceeded for 12 seconds
```
And on other runs it triggered memory usage alerts:
```
4431 W0626 07:28:50.868021 147312640 watcher.cpp:424] osqueryd worker (21453) stopping:
Memory limits exceeded: 214020096 bytes (limit is 200MB)
```

For the above logs I used a custom osqueryd branch to be able to print
more information: https://github.com/osquery/osquery/pull/8070

The metrics for the old query were CPU usage: ~4521 ms
```
435:level=warn ts=2023-06-26T09:58:29.665712Z query=fleet_policy_query_1233 queryTime=4521 memory=12226560 msg="distributed query performance is excessive" hostID=308 platform=darwin
```
With the new query, CPU usage: ~210 ms.
```
23893:level=debug ts=2023-06-26T18:06:08.242456Z query=fleet_policy_query_1233 queryTime=210 msg=stats memory=0 hostID=308 platform=darwin
```
Basically a ~20x improvement.

- [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-06-27 11:06:26 -03:00
Sharon Katz
519982990c
Add disk_info table to chromeos (#12344) 2023-06-26 15:40:37 -04:00
RachelElysia
044935b02f
ChromeOS support: ChromeOS tables (add chromeos to existing table: screenlock, new table: system_state) (#12358) 2023-06-26 11:18:12 -07:00
Jacob Shandling
2855bc8f7f
ChromeOS privacy_preferences table (#12441)
## Addresses #11037 

### Implement the `privacy_preferences` table for the Fleetd Chrome
extension. Columns correspond to the available properties of
[`chrome.privacy`](https://developer.chrome.com/docs/extensions/reference/privacy/).

Chrome on mac:
<img width="816" alt="Screenshot 2023-06-23 at 11 55 21 AM"
src="https://github.com/fleetdm/fleet/assets/61553566/a4700749-6325-442e-acf2-c14b1c9adf8f">

Chromebook with enterprise access (actual use case):
![Image from
iOS](https://github.com/fleetdm/fleet/assets/61553566/93f2243d-357a-4d85-bd20-0aebd178388c)

* Chromebook w/o enterprise access: as you can see, sometimes certain
APIs are not available - this error occurs because the expected API
object that would have a `get` method is actually `undefined` TODO – How
to handle this case given that we want to let errors bubble up to the
level at which Fleet can catch them? Maybe it would be nice to catch
such errors and send them up to the Fleet layer, and still allow the
loop to continue to populate the columns whose APIs _are_ available.
_Decision: catch API errors here to preserve functionality of the
remaining columns_

![IMG_9407](https://github.com/fleetdm/fleet/assets/61553566/7fb26eb4-44e8-43f8-90c0-8b3d718c5ace)

- [x] Changes file
- [x] Manual QA

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-06-23 14:52:16 -07:00
dependabot[bot]
bd5071058e
Bump semver from 7.3.8 to 7.5.3 in /ee/tools/license (#12470)
Bumps [semver](https://github.com/npm/node-semver) from 7.3.8 to 7.5.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/npm/node-semver/releases">semver's
releases</a>.</em></p>
<blockquote>
<h2>v7.5.3</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.2...v7.5.3">7.5.3</a>
(2023-06-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="abdd93d554"><code>abdd93d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/571">#571</a>
set max lengths in regex for numeric and build identifiers (<a
href="https://redirect.github.com/npm/node-semver/issues/571">#571</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><a
href="bf53dd8da1"><code>bf53dd8</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/569">#569</a>
add example for <code>&gt;</code> comparator (<a
href="https://redirect.github.com/npm/node-semver/issues/569">#569</a>)
(<a href="https://github.com/mbtools"><code>@​mbtools</code></a>)</li>
</ul>
<h2>v7.5.2</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.1...v7.5.2">7.5.2</a>
(2023-06-15)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="58c791f40b"><code>58c791f</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/566">#566</a>
diff when detecting major change from prerelease (<a
href="https://redirect.github.com/npm/node-semver/issues/566">#566</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="5c8efbcb3c"><code>5c8efbc</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/565">#565</a>
preserve build in raw after inc (<a
href="https://redirect.github.com/npm/node-semver/issues/565">#565</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="717534ee35"><code>717534e</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/564">#564</a>
better handling of whitespace (<a
href="https://redirect.github.com/npm/node-semver/issues/564">#564</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h2>v7.5.1</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.0...v7.5.1">7.5.1</a>
(2023-05-12)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="d30d25a5c1"><code>d30d25a</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/559">#559</a>
show type on invalid semver error (<a
href="https://redirect.github.com/npm/node-semver/issues/559">#559</a>)
(<a
href="https://github.com/tjenkinson"><code>@​tjenkinson</code></a>)</li>
</ul>
<h2>v7.5.0</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.4.0...v7.5.0">7.5.0</a>
(2023-04-17)</h2>
<h3>Features</h3>
<ul>
<li><a
href="503a4e52fe"><code>503a4e5</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/548">#548</a>
allow identifierBase to be false (<a
href="https://redirect.github.com/npm/node-semver/issues/548">#548</a>)
(<a href="https://github.com/lsvalina"><code>@​lsvalina</code></a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="e219bb4540"><code>e219bb4</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/552">#552</a>
throw on bad version with correct error message (<a
href="https://redirect.github.com/npm/node-semver/issues/552">#552</a>)
(<a
href="https://github.com/wraithgar"><code>@​wraithgar</code></a>)</li>
<li><a
href="fc2f3df0b5"><code>fc2f3df</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/546">#546</a>
incorrect results from diff sometimes with prerelease versions (<a
href="https://redirect.github.com/npm/node-semver/issues/546">#546</a>)
(<a
href="https://github.com/tjenkinson"><code>@​tjenkinson</code></a>)</li>
<li><a
href="2781767779"><code>2781767</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/547">#547</a>
avoid re-instantiating SemVer during diff compare (<a
href="https://redirect.github.com/npm/node-semver/issues/547">#547</a>)
(<a href="https://github.com/macno"><code>@​macno</code></a>)</li>
</ul>
<h2>v7.4.0</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.3.8...v7.4.0">7.4.0</a>
(2023-04-10)</h2>
<h3>Features</h3>
<ul>
<li><a
href="113f51312a"><code>113f513</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/532">#532</a>
identifierBase parameter for .inc (<a
href="https://redirect.github.com/npm/node-semver/issues/532">#532</a>)
(<a href="https://github.com/wraithgar"><code>@​wraithgar</code></a>, <a
href="https://github.com/b-bly"><code>@​b-bly</code></a>)</li>
<li><a
href="48d8f8fa63"><code>48d8f8f</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/530">#530</a>
export new RELEASE_TYPES constant (<a
href="https://github.com/hcharley"><code>@​hcharley</code></a>)</li>
</ul>
<h3>Bug Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/npm/node-semver/blob/main/CHANGELOG.md">semver's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.2...v7.5.3">7.5.3</a>
(2023-06-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="abdd93d554"><code>abdd93d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/571">#571</a>
set max lengths in regex for numeric and build identifiers (<a
href="https://redirect.github.com/npm/node-semver/issues/571">#571</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><a
href="bf53dd8da1"><code>bf53dd8</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/569">#569</a>
add example for <code>&gt;</code> comparator (<a
href="https://redirect.github.com/npm/node-semver/issues/569">#569</a>)
(<a href="https://github.com/mbtools"><code>@​mbtools</code></a>)</li>
</ul>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.1...v7.5.2">7.5.2</a>
(2023-06-15)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="58c791f40b"><code>58c791f</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/566">#566</a>
diff when detecting major change from prerelease (<a
href="https://redirect.github.com/npm/node-semver/issues/566">#566</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="5c8efbcb3c"><code>5c8efbc</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/565">#565</a>
preserve build in raw after inc (<a
href="https://redirect.github.com/npm/node-semver/issues/565">#565</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="717534ee35"><code>717534e</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/564">#564</a>
better handling of whitespace (<a
href="https://redirect.github.com/npm/node-semver/issues/564">#564</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.0...v7.5.1">7.5.1</a>
(2023-05-12)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="d30d25a5c1"><code>d30d25a</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/559">#559</a>
show type on invalid semver error (<a
href="https://redirect.github.com/npm/node-semver/issues/559">#559</a>)
(<a
href="https://github.com/tjenkinson"><code>@​tjenkinson</code></a>)</li>
</ul>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.4.0...v7.5.0">7.5.0</a>
(2023-04-17)</h2>
<h3>Features</h3>
<ul>
<li><a
href="503a4e52fe"><code>503a4e5</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/548">#548</a>
allow identifierBase to be false (<a
href="https://redirect.github.com/npm/node-semver/issues/548">#548</a>)
(<a href="https://github.com/lsvalina"><code>@​lsvalina</code></a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="e219bb4540"><code>e219bb4</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/552">#552</a>
throw on bad version with correct error message (<a
href="https://redirect.github.com/npm/node-semver/issues/552">#552</a>)
(<a
href="https://github.com/wraithgar"><code>@​wraithgar</code></a>)</li>
<li><a
href="fc2f3df0b5"><code>fc2f3df</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/546">#546</a>
incorrect results from diff sometimes with prerelease versions (<a
href="https://redirect.github.com/npm/node-semver/issues/546">#546</a>)
(<a
href="https://github.com/tjenkinson"><code>@​tjenkinson</code></a>)</li>
<li><a
href="2781767779"><code>2781767</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/547">#547</a>
avoid re-instantiating SemVer during diff compare (<a
href="https://redirect.github.com/npm/node-semver/issues/547">#547</a>)
(<a href="https://github.com/macno"><code>@​macno</code></a>)</li>
</ul>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.3.8...v7.4.0">7.4.0</a>
(2023-04-10)</h2>
<h3>Features</h3>
<ul>
<li><a
href="113f51312a"><code>113f513</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/532">#532</a>
identifierBase parameter for .inc (<a
href="https://redirect.github.com/npm/node-semver/issues/532">#532</a>)
(<a href="https://github.com/wraithgar"><code>@​wraithgar</code></a>, <a
href="https://github.com/b-bly"><code>@​b-bly</code></a>)</li>
<li><a
href="48d8f8fa63"><code>48d8f8f</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/530">#530</a>
export new RELEASE_TYPES constant (<a
href="https://github.com/hcharley"><code>@​hcharley</code></a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="940723d22b"><code>940723d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/538">#538</a>
intersects with v0.0.0 and v0.0.0-0 (<a
href="https://redirect.github.com/npm/node-semver/issues/538">#538</a>)
(<a
href="https://github.com/wraithgar"><code>@​wraithgar</code></a>)</li>
<li><a
href="aa516b50b3"><code>aa516b5</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/535">#535</a>
faster parse options (<a
href="https://redirect.github.com/npm/node-semver/issues/535">#535</a>)
(<a href="https://github.com/H4ad"><code>@​H4ad</code></a>)</li>
<li><a
href="61e6ea1e9b"><code>61e6ea1</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/536">#536</a>
faster cache key factory for range (<a
href="https://redirect.github.com/npm/node-semver/issues/536">#536</a>)
(<a href="https://github.com/H4ad"><code>@​H4ad</code></a>)</li>
<li><a
href="f8b8b619e7"><code>f8b8b61</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/541">#541</a>
optimistic parse (<a
href="https://redirect.github.com/npm/node-semver/issues/541">#541</a>)
(<a href="https://github.com/H4ad"><code>@​H4ad</code></a>)</li>
<li><a
href="796cbe29b0"><code>796cbe2</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/533">#533</a>
semver.diff prerelease to release recognition (<a
href="https://redirect.github.com/npm/node-semver/issues/533">#533</a>)
(<a href="https://github.com/wraithgar"><code>@​wraithgar</code></a>, <a
href="https://github.com/dominique-blockchain"><code>@​dominique-blockchain</code></a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7fdf1ef223"><code>7fdf1ef</code></a>
chore: release 7.5.3</li>
<li><a
href="bf53dd8da1"><code>bf53dd8</code></a>
docs: add example for <code>&gt;</code> comparator (<a
href="https://redirect.github.com/npm/node-semver/issues/569">#569</a>)</li>
<li><a
href="abdd93d554"><code>abdd93d</code></a>
fix: set max lengths in regex for numeric and build identifiers (<a
href="https://redirect.github.com/npm/node-semver/issues/571">#571</a>)</li>
<li><a
href="e7b78de06e"><code>e7b78de</code></a>
chore: release 7.5.2</li>
<li><a
href="58c791f40b"><code>58c791f</code></a>
fix: diff when detecting major change from prerelease (<a
href="https://redirect.github.com/npm/node-semver/issues/566">#566</a>)</li>
<li><a
href="5c8efbcb3c"><code>5c8efbc</code></a>
fix: preserve build in raw after inc (<a
href="https://redirect.github.com/npm/node-semver/issues/565">#565</a>)</li>
<li><a
href="717534ee35"><code>717534e</code></a>
fix: better handling of whitespace (<a
href="https://redirect.github.com/npm/node-semver/issues/564">#564</a>)</li>
<li><a
href="2f738e9a70"><code>2f738e9</code></a>
chore: bump <code>@​npmcli/template-oss</code> from 4.14.1 to 4.15.1 (<a
href="https://redirect.github.com/npm/node-semver/issues/558">#558</a>)</li>
<li><a
href="aa016a6716"><code>aa016a6</code></a>
chore: release 7.5.1</li>
<li><a
href="d30d25a5c1"><code>d30d25a</code></a>
fix: show type on invalid semver error (<a
href="https://redirect.github.com/npm/node-semver/issues/559">#559</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/npm/node-semver/compare/v7.3.8...v7.5.3">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~npm-cli-ops">npm-cli-ops</a>, a new
releaser for semver since your current version.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=semver&package-manager=npm_and_yarn&previous-version=7.3.8&new-version=7.5.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/fleetdm/fleet/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-23 12:27:36 -07:00
Sharon Katz
b754cb096c
Add "username=''" to managed_policies queries (#10710)
https://github.com/fleetdm/fleet/issues/10602


@xpkoala this PR will require testing of all modified items.
Preferably, we should perform the tests before merging to master. Can we
use the dev branch for that? -- Items were tested locally.
2023-06-21 13:00:25 -05:00
Roberto Dip
835491d029
update puppet metadata.json file for publishing (#12418) 2023-06-20 19:08:46 -03:00
Roberto Dip
32acf4230c
improve matching resiliency of puppet endpoints (#12402)
this PR modifies the `external_host_identifier` parameter that's used to
match hosts to Puppet runs to use an identifier that's *unique per run*
(instead of an identifier that's *unique per host*)

this has the adventage to:

1. allow for concurrent Puppet runs that don't interfere with each
other.
2. allow for failed/orphaned Puppet runs to not interfere with new runs
(the keys will eventually get expired)

all the existent behavior should be preserved.

> Note: I have verified that the value that the reporter gets is the one
  associated with the right puppet run, even if multiple runs happen
  simultaneously.
2023-06-20 18:24:54 -03:00
Martin Angers
1c249b60da
Add support to configure and enable Windows MDM, notify elegible hosts (#12340) 2023-06-20 14:06:45 -04:00
Martin Angers
96aec85a0a
Add mechanism to force read from primary DB, use it for puppet matching (#12396) 2023-06-19 13:55:15 -04:00
Roberto Dip
6d789d6e19
improve logging and error reporting in the puppet module (#12369)
For #12355
2023-06-16 12:40:50 -03:00
Roberto Dip
5f30add863
remove puppet PoC (#12317)
The puppet module lives in
https://github.com/fleetdm/fleet/tree/main/ee/tools/puppet/fleetdm, I'm
removing this PoC to avoid any confusion
2023-06-15 10:28:35 -03:00
Lucas Manuel Rodriguez
23eed2c872
Add the extra step to install extension manually (#12299) 2023-06-14 09:36:18 -03:00
Roberto Dip
82be92add9
properly encode release device command (#12275)
for #12272
2023-06-09 18:17:49 -03:00
Mo Zhu
50746c6b48
Chrome docs (#11747) 2023-06-09 10:03:01 -07:00
Juan Fernandez
98d9f1b068
If user is a global/team observer/observer+, 'teams' endpoints should not include secrets (#12216)
Fixed auth. issue with Obs/Obs+
2023-06-08 17:30:34 -04:00
Roberto Dip
1ad80fa251
bugfixes + adjustments for the puppet module (#12221)
A few minor things going on:

1. Adjusted the Puppet module to send the profiles base64 encoded
2. Enabled FileVault by default on teams created using the `/match`
endpoint.
3. Remove profiles when a team is removed. We can't do a foreign key
because the global team.id is NULL. I also included a migration to
cleanup orphaned profiles.
2023-06-08 18:05:44 -03:00
Marcos Oviedo
05c24caa95
Addressing system test findings (#12210)
This relates to #11245
2023-06-08 10:47:04 -03:00
Marcos Oviedo
ebac8705ac
Addressing issues found during system test (#12205)
This relates to #11312 

`18.9.17.6`: Fixing the issue with policy pointing to a different GPO
and Registry value
`18.9.47.4.2`: Adding COLLATE NOCASE to avoid case sensitive issue with
SpynetReporting value
2023-06-08 10:45:43 -03:00
Lucas Manuel Rodriguez
2a532ede94
Do not return empty SSO and SMTP settings for non-global-admins (#12180)
#11266

PS: I first attempted a serialization trick by introducing a new
`appConfigResponse` and implementing `json.Marshal` to exclude these
fields but it was too hacky and hard to maintain moving forward, so I'm
bitting the bullet now. Happy to hear other ideas.

- [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-06-07 16:06:36 -03:00
Martin Angers
68ddaafac0
Fix bug preventing gitops role from fleetctl applying macos setup assistant (and bootstrap package) (#12193) 2023-06-07 13:29:36 -04:00
Martin Angers
f27fcddd55
Prevent clearing macos updates settings when applying/modifying a team without those settings (#12160) 2023-06-06 14:31:33 -04:00
Sharon Katz
dc46116d44
Address not installed issue (#12165) 2023-06-06 13:37:43 -04:00
Marcos Oviedo
c6338af0a3
Adding cast to 18.9.108.4.2 (#12131)
This relates to #11668 

This change fixes a CAST issue on 18.9.108.4.2. More details
[here](https://fleetdm.slack.com/archives/C019WG4GH0A/p1685565728281039).
2023-06-06 10:37:21 -03:00
Martin Angers
9f064acd2e
Match pre-assigned profiles to a team (or create one) and assign host to team (#12127) 2023-06-05 15:08:21 -04:00
Roberto Dip
c7488663f2
add a puppet module to manage MDM features (#12032)
Related to #11185 this adds a Puppet module that provides:

1. A custom type named `fleetdm::profile` that can be used to define
profiles to a device
2. A function named `fleetdm::release_device` that can be used to
release a device from await device configuration.

Instructions/usage can be found in the `README.md` file.

---------

Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2023-05-31 17:26:12 -03:00
Martin Angers
4322a28f5a
Implement preassign endpoint as first step to match profiles and hosts to teams (#12046) 2023-05-31 09:24:22 -04:00
Juan Fernandez
43ab81ee11
Feature 11829: Tailor host table response to ChromeOS (#12002)
Updated ingestion logic and fixed ChromeOS virtual tables to accommodate the requested UI changes.
2023-05-30 22:13:42 -04:00
Lucas Manuel Rodriguez
33d61044b5
Change role of existing users only if SSO attributes are present in the SAMLResponse (#11966)
#10784

The removal of the now deprecated `sso_settings.enable_jit_role_sync`
config will be tackled in: #10688.

- [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-05-30 17:49:59 -03:00
Martin Angers
4a077793f5
Return 400 instead of 500 on Apple BM auth error (#11899) 2023-05-29 11:52:42 -04:00
Mo Zhu
e1a0021e7a
remove address column from network_interfaces chromeos table (#11787)
Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2023-05-26 16:47:19 -05:00
Juan Fernandez
de7377e54f
ChromeOS support for Fleet dashboard (#11953)
- Added built-in label for ChromeOS
- Ingest os_version info from ChromeOS hosts.
2023-05-26 14:32:01 -04:00
gillespi314
259d4fa1ac
Track host DEP assignments in new table (#11875) 2023-05-23 13:01:04 -05:00
Roberto Dip
dcc22f436b
allow to set await_device_configured in DEP profile (#11789)
#10744
2023-05-19 07:08:35 -03:00
Roberto Dip
8829b84a63
add migration support to FD and orbit (#11741)
https://github.com/fleetdm/fleet/issues/11534
2023-05-18 14:21:54 -03:00
Roberto Dip
8e532a5e76
pre-populate username/fullname during account creation (#11557)
Related to #10744, this pre-populates and disables the username/fullname
fields.

https://user-images.githubusercontent.com/4419992/236854781-ac67ee28-c19c-4130-a5e6-2872220501b5.mov


# 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)
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-05-18 12:50:00 -03:00
Juan Fernandez
009a87d33e
Feature 10196: Add filepath to end-points and third party integrations (#11285)
Adds the software installed path property to the proper end-points and third party integrations (webhook, Zendesk and Jira).
2023-05-17 16:53:15 -04:00
Martin Angers
3f9eccc7f8
Refetch host mdm enrollment status until unenrolled (#11740) 2023-05-17 15:52:45 -04:00
Lucas Manuel Rodriguez
47de991ea6
Use hostIDs in team deletion when setting status to pending (#11734)
Found this while working on #11531.

Team deletion for an empty team is taking ~30 seconds with 2632 hosts
that belong to no team.
This change attempts to fix that issue.

- ~[ ] 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
- [ ] 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-05-17 16:49:02 -03:00
gillespi314
a7f02355fd
Add device-authenticated endpoint to trigger MDM migration webhook request (#11724) 2023-05-17 09:16:26 -05:00
Martin Angers
e3a4e5fa0c
Add support for profile UUIDs per team/no-team for the default profile (#11717) 2023-05-17 09:06:14 -04:00
Roberto Dip
4dd127d577
base logic to show/hide the new Migrate to Fleet FD menu (#11679)
Related to #11670
2023-05-15 17:00:52 -03:00
Martin Angers
7b1b392627
Implement worker jobs that update/re-assign setup assistants on changes (#11630) 2023-05-15 14:06:09 -04:00
RachelElysia
9e8698c779
CIS - WIN10 - Fix 3 policies with false positive bugs (#11668) 2023-05-12 10:57:09 -04:00
Marcos Oviedo
e46d748bd2
Adding CIS non completed items that requires cis_audit table (#11380)
This relates to #11245
2023-05-12 11:55:46 -03:00
Marcos Oviedo
424baf431b
Pusing pending CIS items (#11511)
This relates to #11312 

This completes the last 20 pending CIS policies [here
](https://docs.google.com/spreadsheets/d/1HZn7e4zpd5nfxY0MhSdX8MkGpdpxyLdSZjk0Auo1WaQ/edit#gid=1819959040)
2023-05-12 11:38:17 -03:00
RachelElysia
2523ae39aa
CIS - Windows - Fix CIS_bullet_18.9.85.1.1 (#11650) 2023-05-12 09:41:40 -04:00
gillespi314
a9584dc32f
Allow end user authentication during automatic MDM enrollment to be enabled on a per-team basis (#11566) 2023-05-10 15:22:08 -05:00
Martin Angers
70f18dda4a
Apply custom setup assistants (if present) when ingesting new devices (#11563) 2023-05-09 13:00:18 -04:00
Roberto Dip
33d788caed
add support for displaying EULA during ADE/DEP (#11532)
Related to #11350 and the sub-tasks for stuff that happens in setup
assistant: #11477 and #11479

This adds back-end and UI logic to show an EULA during DEP enrollment if
one was uploaded via the UI, if an EULA wasn't uploaded, we just proceed
to enroll the device right after authentication.


https://user-images.githubusercontent.com/4419992/236316655-282ee74a-5f79-4095-a950-82b77b80a5c0.mov
2023-05-05 14:36:13 -03:00
Sharon Katz
c3d960a036
start (#11503) 2023-05-05 12:19:20 -04:00
RachelElysia
bb3b788ce0
CIS - WIN10 - 18.9.81 to 18.9.83 (#11523) 2023-05-04 11:52:32 -04:00
Sharon Katz
a819a16fc4
17.8.1 (#11347)
Tested for Positive and Negative cases on my Win 10 Pro.
2023-05-04 10:44:26 -04:00
Martin Angers
b3993ebda4
Allow "not_before" timestamp for worker jobs, schedule more quickly (#11512) 2023-05-03 16:25:36 -04:00
RachelElysia
8389531e3b
CIS - WIN10 - 18.9.72 to 18.9.75 (#11510) 2023-05-03 14:45:20 -04:00
Roberto Dip
11356b2f15
add CRUD for EULA (#11274)
https://github.com/fleetdm/fleet/issues/10741
2023-05-02 10:09:33 -03:00
Roberto Dip
a23d208b1d
gate DEP enrollment behind SSO when configured (#11309)
#10739

Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
2023-04-27 09:43:20 -03:00
gillespi314
003e208e4d
Update CLI flow to manage adding and deleting MDM bootstrap packages by applying config and team specs (#11349) 2023-04-26 16:09:21 -05:00
gillespi314
8df5f26bea
Add user activity logs for MDM bootstrap package endpoints (#11302) 2023-04-26 13:40:14 -05:00
Martin Angers
77855a5e1d
Add activities for macOS setup assistant. (#11310) 2023-04-26 10:37:03 -04:00
Artemis Tosini
eb8de78a62
Add Windows 10 CIS 18.9.66-67 (#11143)
This is all 6 queries referenced in #10361. I've tested all queries on
Windows 10 Pro.

- [x] Manual QA for all new/changed functionality
2023-04-25 13:04:38 -04:00
Martin Angers
582e85c876
Add support for the mdm.macos_setup.macos_setup_assistant key in fleetctl, API (#11296) 2023-04-25 09:36:01 -04:00
RachelElysia
1fb9eeec64
CIS - WIN10 18.9.11.3.x (#11289) 2023-04-25 08:53:22 -04:00
Roberto Dip
5c487890ca
add an endpoint to get an aggregate summary of bootstrap packages (#11156)
Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2023-04-22 10:23:38 -05:00
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