fleet/cmd/fleetctl
Lucas Manuel Rodriguez 407d05eab9
Workaround to set policy specs on a team (#9978)
For the CIS benchmark feature, we need a way to import a group of
policies (spec yml) into a team.
This PR adds a flag to `apply -f` to allow setting a team name to a
group of policies.

Sample:
```sh
fleetctl apply --context dogfood --policies-team "📊 CIS Benchmarks" -f ee/cis/macos-13/cis-policy-queries.yml
```

- [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-02-22 13:14:53 -03:00
..
testdata add API endpoint to see disk encryption key (#9713) 2023-02-08 20:20:23 -03:00
api.go Flag when the Apple BM terms have expired (#9091) 2023-01-06 17:44:20 -03:00
apple_mdm.go Add endpoint to trigger CSR request for APNs on fleetdm.com (#9494) 2023-01-25 14:44:29 -05:00
apple_mdm_test.go return 422 status code if fleetdm.com returns any 4xx status for CSR (#9610) 2023-02-01 12:50:22 -03:00
apply.go Workaround to set policy specs on a team (#9978) 2023-02-22 13:14:53 -03:00
apply_test.go add mdm root key and macos_updates to app and team configs (#9442) 2023-01-24 13:20:02 -03:00
config.go Add support for custom headers in fleetctl (#6118) 2022-06-07 16:00:09 -04:00
config_test.go Enable errcheck linter for golangci-lint (#8899) 2022-12-05 16:50:49 -06:00
convert.go Move specs parsing functionality to a new pkg/spec package (#7050) 2022-08-05 19:07:32 -03:00
convert_test.go Add team targets to pack spec (#4272) 2022-02-21 09:18:58 -07:00
debug.go fix fleetctl debug commands on Windows (#6186) 2022-06-10 21:59:44 -03:00
debug_test.go Fleet server and tooling to use NETWORK_TEST_GITHUB_TOKEN when environment variable is set. (#9143) 2023-01-03 14:56:11 -03:00
delete.go Move specs parsing functionality to a new pkg/spec package (#7050) 2022-08-05 19:07:32 -03:00
delete_test.go Make activities typed and auto-generate docs for each type (#9069) 2022-12-23 13:05:16 -03:00
flags.go improve messaging of fleetctl debug errors and archive commands (#5590) 2022-05-10 10:44:06 -03:00
fleetctl.go Add fleetctl generate mdm-apple (#8812) 2022-12-07 18:24:42 +01:00
get.go Make fleetctl get teams --yaml output compatible with fleetctl apply -f (#9626) 2023-02-02 14:46:50 -03:00
get_test.go Add macos custom profiles support via fleetctl apply (#9824) 2023-02-15 13:01:44 -05:00
goquery.go Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
hosts.go Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
hosts_test.go Refactor integration tests (#1821) 2021-09-15 16:27:53 -03:00
kill_process.go Download and launch orbit for the current device when starting preview (#2437) 2021-10-15 18:23:06 -03:00
kill_process_windows.go Download and launch orbit for the current device when starting preview (#2437) 2021-10-15 18:23:06 -03:00
login.go Tweak output for fleetctl login --help (#4776) 2022-03-23 16:40:16 -04:00
logout.go Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
logout_test.go Simplify fleetctl implementation and improve testing (#3830) 2022-01-24 16:40:51 -03:00
package.go Enable errcheck linter for golangci-lint (#8899) 2022-12-05 16:50:49 -06:00
package_test.go Add display_name to more results (#8204) 2022-10-14 11:14:18 -03:00
preview.go Add macos custom profiles support via fleetctl apply (#9824) 2023-02-15 13:01:44 -05:00
preview_test.go Enable errcheck linter for golangci-lint (#8899) 2022-12-05 16:50:49 -06:00
query.go fleetctl query improve error message (#5141) 2022-04-20 11:35:46 -06:00
query_output.go add host_display_name to live query rows (#8251) 2022-10-17 15:52:25 +02:00
query_test.go Make activities typed and auto-generate docs for each type (#9069) 2022-12-23 13:05:16 -03:00
session_test.go Print version warning when using fleetctl (#4139) 2022-02-14 09:43:34 -07:00
setup.go Fleet Premium: de-anonymize usage stats (#7013) 2022-08-03 14:44:34 -04:00
testing_utils.go Deep-clone the appconfig when getting from cache (#8194) 2022-10-17 15:03:49 -04:00
trigger.go Add fleetctl trigger command (#8877) 2022-12-06 09:56:54 -06:00
trigger_test.go Add fleetctl trigger command (#8877) 2022-12-06 09:56:54 -06:00
user.go Create Bulk Users from CSV (#3372) 2022-06-22 13:34:58 -03:00
users_test.go Make activities typed and auto-generate docs for each type (#9069) 2022-12-23 13:05:16 -03:00
vulnerability_data_stream.go Fleet server and tooling to use NETWORK_TEST_GITHUB_TOKEN when environment variable is set. (#9143) 2023-01-03 14:56:11 -03:00
vulnerability_data_stream_test.go Feature 7494: Use the MSRC security bulletin artifacts for detecting Win OS vulnerabilities (#7889) 2022-10-28 11:12:21 -04:00