Commit Graph

129 Commits

Author SHA1 Message Date
Tim Lee
27073720c5
15254 oval scan err (#15499) 2023-12-14 10:39:28 -07:00
Roberto Dip
fbaa479d01
pre-calculate host counts for software titles (#15601)
found during the load test, this addresses a performance issue with
software titles.

# 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] 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-12-13 12:48:57 -03:00
Tim Lee
e981b7be84
hotfix: fix return codes on enterprise tests (#15578) 2023-12-12 07:58:47 -07:00
Jahziel Villasana-Espinoza
66939494f2
fix: validate agent platform options (#15482)
# 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] Added/updated tests
- [x] Manual QA for all new/changed functionality
2023-12-08 10:20:31 -05:00
Roberto Dip
aada28c1c1
Add list/detail endpoints for software titles (#15464)
related to #15228
2023-12-06 15:28:31 -03:00
Sarah Gillespie
f19dc8abe0
Add GET software/versions and GET software/versions/:id endpoints (#15450) 2023-12-06 08:30:49 -06:00
Sarah Gillespie
976eeba61d
Add validations to disallow custom MDM profiles that contain names reserved by Fleet (#15373) 2023-11-30 17:19:18 -06:00
Roberto Dip
b07fbdc1d7
implement profile verification for windows (#15348)
for #14426.

In order to prevent import cycles and be able to use some type
definitions/constants I followed the same pattern we did for macOS by
creating a new package named `syncml`. This makes the changelog look
bigger than it actually is, so I split it into two commits to make it
easier to review:

-
[d7c233d](d7c233d54c)
moves the relevant bits to this new package
-
[7531a07](7531a0742b)
implements profile verification
2023-11-30 09:17:07 -03:00
Martin Angers
2f927df4f0
Implement Windows OS Updates (feature branch). (#15359) 2023-11-29 11:07:24 -05:00
Roberto Dip
f439432fae
feature: windows profiles (#15349) 2023-11-29 09:32:42 -05:00
Roberto Dip
9c7b740b03
disable windows profiles feature in the back-end (#15278)
per discussion in slack, reverting relevant user-facing changes for
#13281
2023-11-27 16:08:52 -03:00
Martin Angers
4f45942f38
Add endpoint to list macOS and Windows profiles combined, paginated (#15165) 2023-11-15 15:36:20 -05: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
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
Victor Lyuboslavsky
f38524a8b7
Fixes to /fleet/queries/run endpoint (#14909)
Fixes to /fleet/queries/run endpoint:
- now returns 403 for an unauthorized user
- now returns 400 when query_ids or host_ids are not specified

#11446 and #11901

# Checklist for submitter

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

API clarifications are in a separate PR
https://github.com/fleetdm/fleet/pull/14956

- [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-11-06 11:03:42 -06:00
Victor Lyuboslavsky
1e0fa92428
13998 host options validation (#14539)
#13998 

Cleaned up REST API input validation for hosts, carves, users endpoints.

rest-api.md changes explained:
https://www.loom.com/share/9cd82653bacb4528bdaac117ec85a976

For the following endpoints:
/api/v1/fleet/hosts
/api/v1/fleet/hosts/count
/api/v1/fleet/hosts/report
  - converted validation errors from 500 to 400 HTTP status code
- added validation that policy_id must be present when policy_response
is specified
  - added validation that policy_response must be `passing` or `failing`
  - added validation that `os_name` must be specified with `os_version`

For the following endpoint:
/api/v1/fleet/users
  - converted team_id validation error from 500 to 400 HTTP status code

For the following endpoint:
/api/v1/fleet/carves
- added rest-api.md documentation for `page`, `per_page`, `order_key`,
`order_direction`, and `expired`
- converted `expired` validation error from 500 to 400 HTTP status code

# 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

---------

Co-authored-by: Rachael Shaw <r@rachael.wtf>
2023-10-27 15:13:20 -05:00
Lucas Manuel Rodriguez
e58e72fb77
Prevent empty logging_type when creating and editing queries (#14575)
#14551

- ~[ ] 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-10-16 19:33:39 -03:00
gillespi314
35cfde8b34
Always return empty host scripts details for unsupported platforms (#14451) 2023-10-12 13:25:05 -05:00
Jacob Shandling
70e0182e4d Merge branch 'main' into 7766-main-merge 2023-10-11 12:56:52 -07:00
Lucas Manuel Rodriguez
9facf144dc
Schedule queries on hosts even if automations off (given we now store results) (#14411)
This is ready to go.

---------

Co-authored-by: Tim Lee <timlee@fleetdm.com>
2023-10-11 15:20:06 -03:00
Roberto Dip
9ffa11c25d
Feat: saved scripts (#14409)
For #9537
2023-10-10 19:00:45 -03:00
Jacob Shandling
fb494ca3cb Merge branch '7766-frontend' into 7766-backend-frontend 2023-10-10 13:21:19 -07:00
Tim Lee
fa55d72118
Save Query Results to DB (#14335)
# Checklist for submitter

#13486 

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)
- [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

---------

Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
Co-authored-by: Eric <eashaw@sailsjs.com>
Co-authored-by: Sampfluger88 <108141731+Sampfluger88@users.noreply.github.com>
Co-authored-by: Mike Thomas <78363703+mike-j-thomas@users.noreply.github.com>
Co-authored-by: Roberto Dip <me@roperzh.com>
Co-authored-by: Tyler Diderich <15862572+tdiderich@users.noreply.github.com>
Co-authored-by: Dave Herder <27025660+dherder@users.noreply.github.com>
Co-authored-by: Rachael Shaw <r@rachael.wtf>
Co-authored-by: Lucas Manuel Rodriguez <lucas@fleetdm.com>
Co-authored-by: Sharon Katz <121527325+sharon-fdm@users.noreply.github.com>
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
Co-authored-by: Nathanael Holliday <100959072+hollidayn@users.noreply.github.com>
Co-authored-by: Katheryn Satterlee <me@ksatter.com>
Co-authored-by: Mo Zhu <mo@fleetdm.com>
Co-authored-by: Mo Zhu <mozhu888@gmail.com>
Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
Co-authored-by: Robert Fairburn <8029478+rfairburn@users.noreply.github.com>
Co-authored-by: Sabrina Coy <13890648+sabrinabuckets@users.noreply.github.com>
Co-authored-by: Isabell Reedy <113355639+ireedy@users.noreply.github.com>
Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
Co-authored-by: Alex Mitchell <105945793+alexmitchelliii@users.noreply.github.com>
2023-10-10 09:44:03 -03:00
Jacob Shandling
eb327faabf
maintenance merge of main into feature branch (#14393)
maintenance merge of `main` into feature branch
2023-10-09 14:28:35 -07: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
Tim Lee
ccd6746633
7766 backmerge main (#14324) 2023-10-05 11:39:48 -06:00
Jacob Shandling
ab50f0f59d
Maintenance merge of main into feature branch (#14308) 2023-10-04 15:59:36 -07:00
Roberto Dip
a31e433776
prevent live queries to stall if a detail query override was set for a team (#14296)
alternative approach for #14286
2023-10-04 17:02:55 -03: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
Tim Lee
338c64d78b
Add version_resolved_in to software API (#13939) 2023-09-18 16:53:32 -06:00
Tim Lee
5bc6d30aa8
Add Description text to CVE Metadata (#13856) 2023-09-15 11:24:10 -06:00
Martin Angers
a0c950acf6
Fix auto-removal of integrations when an unrelated setting is saved (#13743) 2023-09-06 14:31:40 -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
Noah Talerman
b7868831c2
Scripts: update host timeout error message (#13626)
- Update copy for erorr message we display when we haven't heard back
from the host in over 1 minute.
2023-08-31 18:01:14 -04: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
Martin Angers
090b142c49
Implement script execution on the fleetd agent (disabled by default) (#13569) 2023-08-30 14:02:44 -04: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
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
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
Lucas Manuel Rodriguez
2afbd24021
Combine Schedules and Queries: API changes (#12778)
Combining schedules and queries API changes.
2023-07-24 20:17:20 -04:00
Juan Fernandez
bfe6a5c3ad
Invalid policies should be ignored in the desktop endpoint (#12523)
Updated the `/desktop` endpoint to ignore invalid policies
2023-07-13 14:13:36 -04:00
Roberto Dip
4b139245cb
only show Nudge to hosts with MDM features turned on (#12588)
For #12582
2023-06-30 12:29:27 -03:00
Martin Angers
1db2f7646a
Implement Windows MDM programmatic unenrollment (notification + orbit trigger) (#12505) 2023-06-28 09:13:37 -04:00
Marcos Oviedo
821f6b064f
Adding support for GetPolicies message (#12477)
This relates to #12262 

- [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-06-27 12:59:33 -03:00
Marcos Oviedo
22bb16bf2e
Pushing initial support for MS-MDE2 Discovery message (#12387)
This PR requires the Windows MDM configuration changes - This will be
updated next week

- [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
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
2023-06-22 17:31:17 -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
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