Skip to content

Agent configuration on-demand JSON arrays format #390

Open
@juankaromo

Description

@juankaromo

Hi team,

The JSON format of an agent's on-demand configuration responses is incorrect for arrays. For example, currently, the SCA configuration JSON is the following:

{
   "sca":{
      "enabled":"yes",
      "scan_on_start":"yes",
      "skip_nfs":"yes",
      "interval":43200,
      "policies":[
         "cis_rhel7_linux_rcl.yml",
         "system_audit_rcl.yml",
         "system_audit_ssh.yml",
         "system_audit_pw.yml"
      ]
   }
}

So when in the Wazuh app we use the JSON to XML parser to show it in the XML viewer we get this output:

image

This is incorrect because the policies are composed of an array of policies. This would be fixed by changing the answer so that JSON adopts this format:

{
   "sca":{
      "enabled":"yes",
      "scan_on_start":"yes",
      "skip_nfs":"yes",
      "interval":43200,
      "policies":{
         "policy":[
            "cis_rhel7_linux_rcl.yml",
            "system_audit_rcl.yml",
            "system_audit_ssh.yml",
            "system_audit_pw.yml"
         ]
      }
   }
}

image

This also happens in OpenSCAP Profiles, Labels, Syscheck Ignore, Syscheck directories.

Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions