]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Adds test about http authentication with bearer
authorPhilippe Antoine <pantoine@oisf.net>
Tue, 20 Jun 2023 11:35:41 +0000 (13:35 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 12 Jul 2023 07:22:48 +0000 (09:22 +0200)
tests/http-auth-bearer/README.md [new file with mode: 0644]
tests/http-auth-bearer/input.pcap [new file with mode: 0644]
tests/http-auth-bearer/test.rules [new file with mode: 0644]
tests/http-auth-bearer/test.yaml [new file with mode: 0644]

diff --git a/tests/http-auth-bearer/README.md b/tests/http-auth-bearer/README.md
new file mode 100644 (file)
index 0000000..3362997
--- /dev/null
@@ -0,0 +1,8 @@
+# Description
+
+Test http auth bearer recognition
+https://redmine.openinfosecfoundation.org/issues/6162
+
+# PCAP
+
+The pcap comes from running htptopcap on data from libhtp test
diff --git a/tests/http-auth-bearer/input.pcap b/tests/http-auth-bearer/input.pcap
new file mode 100644 (file)
index 0000000..64c7cb9
Binary files /dev/null and b/tests/http-auth-bearer/input.pcap differ
diff --git a/tests/http-auth-bearer/test.rules b/tests/http-auth-bearer/test.rules
new file mode 100644 (file)
index 0000000..087e4af
--- /dev/null
@@ -0,0 +1 @@
+alert http any any -> any any (msg:"SURICATA HTTP Request unrecognized authorization method"; flow:established,to_server; app-layer-event:http.request_auth_unrecognized; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:1; rev:1;)
diff --git a/tests/http-auth-bearer/test.yaml b/tests/http-auth-bearer/test.yaml
new file mode 100644 (file)
index 0000000..8cff079
--- /dev/null
@@ -0,0 +1,9 @@
+args:
+  - -k none
+
+checks:
+  - filter:
+      count: 0
+      match:
+        event_type: alert
+        alert.signature_id: 1