mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Fix missing valid properties in validation of FIM and YARA agent options (#8707)
This commit is contained in:
parent
928b4be2c2
commit
54bb5448a0
1
changes/issue-8699-fix-rejected-valid-agent-options
Normal file
1
changes/issue-8699-fix-rejected-valid-agent-options
Normal file
@ -0,0 +1 @@
|
||||
* Fixed validation of agent options where valid options were being rejected (such as `exclude_paths`).
|
@ -1323,6 +1323,23 @@ spec:
|
||||
`,
|
||||
wantErr: `422 Validation Failed: host_percentage must be > 0 to enable the host status webhook`,
|
||||
},
|
||||
{
|
||||
desc: "config with FIM values for agent options (#8699)",
|
||||
spec: `
|
||||
apiVersion: v1
|
||||
kind: config
|
||||
spec:
|
||||
agent_options:
|
||||
config:
|
||||
file_paths:
|
||||
ssh:
|
||||
- /home/%/.ssh/authorized_keys
|
||||
exclude_paths:
|
||||
ssh:
|
||||
- /home/ubuntu/.ssh/authorized_keys
|
||||
`,
|
||||
wantOutput: `[+] applied fleet config`,
|
||||
},
|
||||
}
|
||||
// NOTE: Integrations required fields are not tested (Jira/Zendesk) because
|
||||
// they require a complex setup to mock the client that would communicate
|
||||
|
@ -81,10 +81,17 @@ type osqueryAgentOptions struct {
|
||||
|
||||
FilePaths map[string][]string `json:"file_paths"`
|
||||
FileAccesses []string `json:"file_accesses"`
|
||||
// Documentation for the following 2 fields is "hidden" in osquery's FIM page:
|
||||
// https://osquery.readthedocs.io/en/stable/deployment/file-integrity-monitoring/
|
||||
FilePathsQuery map[string][]string `json:"file_paths_query"`
|
||||
ExcludePaths map[string][]string `json:"exclude_paths"`
|
||||
|
||||
YARA struct {
|
||||
Signatures map[string][]string `json:"signatures"`
|
||||
FilePaths map[string][]string `json:"file_paths"`
|
||||
// Documentation for signature_urls is "hidden" in osquery's YARA page:
|
||||
// https://osquery.readthedocs.io/en/stable/deployment/yara/#retrieving-yara-rules-at-runtime
|
||||
SignatureURLs []string `json:"signature_urls"`
|
||||
} `json:"yara"`
|
||||
|
||||
PrometheusTargets struct {
|
||||
|
Loading…
Reference in New Issue
Block a user