mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 13:37:30 +00:00
* Amend policy creation (proprietary query), add update APIs * Fix Datastore.SavePolicy bug (and add tests) * Add integration tests for new policy APIs * Add author email * Add activities * Push breaking changes for return policy fields * WIP * Add integration test for host policies * Make more improvements to policy representation * Improve upgrade code (from PR review comments) * PR changes * Revert activities for policies * Use *uint instead of uint for queryID, use fleet.PolicyPayload * Filter out other schemas * New policy flow (#2922) * created new policy flow -- no API connection * added api props * fixed prop name * lint fixes * removed unused modal; fixed style * name, desc icons; created global components * lint fixes * ignoring certain files and lines for prettier * Update frontend/pages/policies/PolicyPage/PolicyPage.tsx * Make policy names unique across deployment * Amend upgrade script * Fix migration for unique names * Do not deduplicate but instead rename policies Co-authored-by: Martavis Parker <47053705+martavis@users.noreply.github.com>
86 lines
No EOL
2.1 KiB
JSON
86 lines
No EOL
2.1 KiB
JSON
{
|
|
"kind":"host",
|
|
"apiVersion":"v1",
|
|
"spec":{
|
|
"created_at":"0001-01-01T00:00:00Z",
|
|
"updated_at":"0001-01-01T00:00:00Z",
|
|
"id":0,
|
|
"detail_updated_at":"0001-01-01T00:00:00Z",
|
|
"label_updated_at":"0001-01-01T00:00:00Z",
|
|
"policy_updated_at":"0001-01-01T00:00:00Z",
|
|
"last_enrolled_at":"0001-01-01T00:00:00Z",
|
|
"seen_time":"0001-01-01T00:00:00Z",
|
|
"refetch_requested":false,
|
|
"hostname":"test_host",
|
|
"uuid":"",
|
|
"platform":"",
|
|
"osquery_version":"",
|
|
"os_version":"",
|
|
"build":"",
|
|
"platform_like":"",
|
|
"code_name":"",
|
|
"uptime":0,
|
|
"memory":0,
|
|
"cpu_type":"",
|
|
"cpu_subtype":"",
|
|
"cpu_brand":"",
|
|
"cpu_physical_cores":0,
|
|
"cpu_logical_cores":0,
|
|
"hardware_vendor":"",
|
|
"hardware_model":"",
|
|
"hardware_version":"",
|
|
"hardware_serial":"",
|
|
"computer_name":"test_host",
|
|
"primary_ip":"",
|
|
"primary_mac":"",
|
|
"distributed_interval":0,
|
|
"config_tls_refresh":0,
|
|
"logger_tls_period":0,
|
|
"team_id":null,
|
|
"pack_stats":null,
|
|
"team_name":null,
|
|
"gigs_disk_space_available":0,
|
|
"percent_disk_space_available":0,
|
|
"issues":{
|
|
"total_issues_count":0,
|
|
"failing_policies_count":0
|
|
},
|
|
"labels":[
|
|
|
|
],
|
|
"packs":[
|
|
|
|
],
|
|
"policies":[
|
|
{
|
|
"id":1,
|
|
"query":"select 1 from osquery_info where start_time > 1;",
|
|
"name":"query1",
|
|
"description":"Some description",
|
|
"author_email":"alice@example.com",
|
|
"author_id":1,
|
|
"author_name":"Alice",
|
|
"response":"passes",
|
|
"resolution":"Some resolution",
|
|
"team_id": 1,
|
|
"updated_at":"0001-01-01T00:00:00Z",
|
|
"created_at":"0001-01-01T00:00:00Z"
|
|
},
|
|
{
|
|
"id":2,
|
|
"query":"select 1 from osquery_info where start_time > 1;",
|
|
"name":"query2",
|
|
"description":"",
|
|
"author_email":"alice@example.com",
|
|
"author_id":1,
|
|
"author_name":"Alice",
|
|
"response":"fails",
|
|
"team_id":null,
|
|
"updated_at":"0001-01-01T00:00:00Z",
|
|
"created_at":"0001-01-01T00:00:00Z"
|
|
}
|
|
],
|
|
"status":"mia",
|
|
"display_text":"test_host"
|
|
}
|
|
} |