]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
dns-eve-log-https-only: v2 and v3 tests
authorJason Ish <jason.ish@oisf.net>
Thu, 4 Jul 2024 20:30:54 +0000 (14:30 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 9 Jul 2024 10:15:24 +0000 (12:15 +0200)
tests/dns/dns-eve-log-https-only/README.md [moved from tests/dns-eve-log-https-only/README.md with 100% similarity]
tests/dns/dns-eve-log-https-only/suricata.yaml [moved from tests/dns-eve-log-https-only/suricata.yaml with 100% similarity]
tests/dns/dns-eve-log-https-only/test.pcap [moved from tests/dns-eve-log-https-only/test.pcap with 100% similarity]
tests/dns/dns-eve-log-https-only/test.yaml [new file with mode: 0644]
tests/dns/v2/dns-eve-log-https-only/README.md [new file with mode: 0644]
tests/dns/v2/dns-eve-log-https-only/suricata.yaml [new file with mode: 0644]
tests/dns/v2/dns-eve-log-https-only/test.pcap [new file with mode: 0644]
tests/dns/v2/dns-eve-log-https-only/test.yaml [moved from tests/dns-eve-log-https-only/test.yaml with 100% similarity]

diff --git a/tests/dns/dns-eve-log-https-only/test.yaml b/tests/dns/dns-eve-log-https-only/test.yaml
new file mode 100644 (file)
index 0000000..4617f0f
--- /dev/null
@@ -0,0 +1,10 @@
+requires:
+  min-version: 8
+
+checks:
+  # Check that we only have requests and responses for HTTPS records.
+- filter:
+    count: 1
+    match:
+      event_type: "dns"
+      dns.queries[0].rrtype: "HTTPS"
diff --git a/tests/dns/v2/dns-eve-log-https-only/README.md b/tests/dns/v2/dns-eve-log-https-only/README.md
new file mode 100644 (file)
index 0000000..1f329b0
--- /dev/null
@@ -0,0 +1,11 @@
+Description
+===========
+Test custom eve DNS logging by configuring it to log only HTTPS records, and verifying that only HTTPS records are logged.
+
+PCAP
+====
+PCAP comes from the redmine ticket [4751](https://redmine.openinfosecfoundation.org/issues/4751)
+
+Redmine ticket
+==============
+https://redmine.openinfosecfoundation.org/issues/4751
diff --git a/tests/dns/v2/dns-eve-log-https-only/suricata.yaml b/tests/dns/v2/dns-eve-log-https-only/suricata.yaml
new file mode 100644 (file)
index 0000000..1091afa
--- /dev/null
@@ -0,0 +1,12 @@
+%YAML 1.1
+---
+
+outputs:
+  - eve-log:
+      enabled: yes
+      filetype: regular
+      filename: eve.json
+      types:
+        - dns:
+            version: 2
+            types: [https]
diff --git a/tests/dns/v2/dns-eve-log-https-only/test.pcap b/tests/dns/v2/dns-eve-log-https-only/test.pcap
new file mode 100644 (file)
index 0000000..2090848
Binary files /dev/null and b/tests/dns/v2/dns-eve-log-https-only/test.pcap differ