]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
eve/schema: map mdns properties that have keywords
authorJason Ish <jason.ish@oisf.net>
Fri, 20 Jun 2025 18:07:11 +0000 (12:07 -0600)
committerVictor Julien <victor@inliniac.net>
Sat, 21 Jun 2025 19:32:53 +0000 (21:32 +0200)
Also add descriptions for the EVE index.

etc/schema.json

index 5149a7dd4c5daefa2a102feeae79e65709ee96b9..d90b4ea4b522e1496b9993724b851721281db76b 100644 (file)
                 "additionals": {
                     "description": "mDNS additional records",
                     "type": "array",
-                    "minItems": 1
+                    "minItems": 1,
+                    "items": {
+                        "type": "object",
+                        "additionalProperties": false,
+                        "properties": {
+                            "ptr": {
+                                "type": "string",
+                                "description": "Value of the requested PTR record",
+                                "suricata": {
+                                    "keywords": [
+                                        "mdns.response.rrname"
+                                    ]
+                                }
+                            },
+                            "rrname": {
+                                "type": "string",
+                                "description": "Resource name of the record being returned",
+                                "suricata": {
+                                    "keywords": [
+                                        "mdns.additionals.rrname",
+                                        "mdns.response.rrname"
+                                    ]
+                                }
+                            },
+                            "rrname_truncated": {
+                                "description": "Name was truncated by Suricata due to length",
+                                "type": "boolean",
+                                "$comment": "keyword: app-layer-event:mdns.name_too_long (https://redmine.openinfosecfoundation.org/issues/7784)"
+                            },
+                            "txt": {
+                                "type": "array",
+                                "description": "Value of the requested TXT record",
+                                "minItems": 1,
+                                "items": {
+                                    "type": "string"
+                                }
+                            }
+                        }
+                    }
                 },
                 "answers": {
                     "description": "mDNS answer records",
                         "additionalProperties": false,
                         "properties": {
                             "ptr": {
-                                "type": "string"
+                                "type": "string",
+                                "description": "Value of the requested PTR record",
+                                "suricata": {
+                                    "$comment": "No specific ptr keywords exists",
+                                    "keywords": [
+                                        "mdns.response.rrname"
+                                    ]
+                                }
                             },
                             "rrname": {
-                                "type": "string"
+                                "type": "string",
+                                "description": "Resource name of the record being returned",
+                                "suricata": {
+                                    "keywords": [
+                                        "mdns.answers.rrname",
+                                        "mdns.response.rrname"
+                                    ]
+                                }
+                            },
+                            "rrname_truncated": {
+                                "description": "Name was truncated by Suricata due to length",
+                                "type": "boolean",
+                                "$comment": "keyword: app-layer-event:mdns.name_too_long (https://redmine.openinfosecfoundation.org/issues/7784)"
                             },
                             "txt": {
                                 "type": "array",
-                                "minItems": 1
+                                "description": "Value of the requested TXT record",
+                                "minItems": 1,
+                                "items": {
+                                    "type": "string"
+                                }
                             }
                         }
                     }
                 "authorities": {
                     "description": "mDNS authority records",
                     "type": "array",
-                    "minItems": 1
+                    "minItems": 1,
+                    "items": {
+                        "type": "object",
+                        "additionalProperties": false,
+                        "properties": {
+                            "rrname": {
+                                "type": "string",
+                                "description": "Resource name of the record being returned",
+                                "suricata": {
+                                    "keywords": [
+                                        "mdns.authorities.rrname",
+                                        "mdns.response.rrname"
+                                    ]
+                                }
+                            },
+                            "rrname_truncated": {
+                                "description": "Name was truncated by Suricata due to length",
+                                "type": "boolean",
+                                "$comment": "keyword: app-layer-event:mdns.name_too_long (https://redmine.openinfosecfoundation.org/issues/7784)"
+                            }
+                        }
+                    }
                 },
                 "flags": {
                     "description": "mDNS message flags",
                         "type": "object",
                         "properties": {
                             "rrname": {
-                                "type": "string"
+                                "description": "Resource name being requested",
+                                "type": "string",
+                                "suricata": {
+                                    "keywords": [
+                                        "mdns.queries.rrname"
+                                    ]
+                                }
+                            },
+                            "rrname_truncated": {
+                                "description": "Name was truncated by Suricata due to length",
+                                "type": "boolean",
+                                "$comment": "keyword: app-layer-event:mdns.name_too_long (https://redmine.openinfosecfoundation.org/issues/7784)"
                             },
                             "rrtype": {
-                                "type": "string"
+                                "type": "string", 
+                                "description": "Type of resource being requested"
                             }
                         }
                     }