fleet/changes
Lucas Manuel Rodriguez 0f436d26db
Run authorization check before processing policy spec (#9270)
I was getting a cryptic error and no logs in fleet when trying to apply
an invalid spec file:
```sh
fleetctl apply -f ./some-queries.yml
Error: applying policies: POST /api/latest/fleet/spec/policies received status 500 forbidden: forbidden
```

With the changes in this PR now I get a more descriptive error (bad
request):

```sh
fleetctl apply -f ./some-queries.yml
Error: applying policies: POST /api/latest/fleet/spec/policies received status 400 Bad request: policy spec payload verification: policy query cannot be empty
```

- [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-01-18 12:26:32 -03:00
..
.keep Issue 1009 calculate diff software (#1305) 2021-07-08 13:57:43 -03:00
6799-update-empty-states Fleet UI: Consistent software empty states and host details empty states (#9247) 2023-01-17 11:23:46 -05:00
8872-add-MDM-settings-modals UI: Edit team modal (#9248) 2023-01-17 09:12:24 -08:00
8995-activity-feed-mdm-enrollment Fleet UI: Add MDM enrollment/unenrollment activity to activity feed (#9186) 2023-01-16 09:09:27 -05:00
9141-host-details-backlink-bug Frontend: Add hostdetails BackLink fallback path (#9262) 2023-01-16 12:10:01 -08:00
9218-fix-team-policies-stale-time Fleet UI: Remove team policy stale time, remove team policy automation statetime (#9226) 2023-01-10 11:53:11 -05:00
9219-host-mdm-details Add mdm status and server url to host endpoint responses (#9320) 2023-01-16 17:08:24 -06:00
cros-platform Add CrOS as valid host platform (#9308) 2023-01-13 14:10:38 -08:00
fix-useless-error-on-policy-spec Run authorization check before processing policy spec (#9270) 2023-01-18 12:26:32 -03:00
issue-8928-add-meta-attribute-to-get-activities add attribute to GET /activities endpoint with pagination metadata (#9279) 2023-01-18 12:57:11 +00:00
issue-8997-download-manual-enrollment-profile Implement API endpoint for MDM manual enrollment profile download (#9232) 2023-01-16 10:22:12 -05:00
issue-9277-notify-orbit-to-renew-enroll-profile Notify orbit via the GET config endpoint that the DEP profile needs to be renewed (#9373) 2023-01-17 13:19:48 -05:00