--- /dev/null
+requires:
+ min-version: 8.0
+args:
+- -k none
+
+checks:
+- filter:
+ count: 1
+ match:
+ event_type: alert
+ direction: to_server
+ alert.signature: Query keyword check - listen
+ alert.signature_id: 2
+ app_proto: pgsql
+ pcap_cnt: 18
+ pgsql.request.simple_query: LISTEN rules;
+ pgsql.response.command_completed: LISTEN
+- filter:
+ count: 1
+ match:
+ event_type: alert
+ direction: to_server
+ alert.signature: Query keyword check - SELECT
+ alert.signature_id: 1
+ app_proto: pgsql
+ pcap_cnt: 24
+ pgsql.request.simple_query: SELECT 1;
+ pgsql.response.command_completed: SELECT 1
+ pgsql.response.data_rows: 1
+ pgsql.response.data_size: 1
+ pgsql.response.field_count: 1
+ pgsql.tx_id: 5
--- /dev/null
+requires:
+ min-version: 8.0
+args:
+- -k none
+
+pcap: ../pgsql-simple-query-rollback/input.pcap
+
+checks:
+- filter:
+ count: 1
+ match:
+ event_type: alert
+ app_proto: pgsql
+ direction: to_server
+ alert.signature: Query keyword check - delete
+ alert.signature_id: 2
+ pcap_cnt: 21
+ pgsql.request.simple_query: DELETE FROM new_table WHERE NAME='Remus';
+ pgsql.response.command_completed: DELETE 1
+ pgsql.tx_id: 6
+- filter:
+ count: 1
+ match:
+ event_type: alert
+ direction: to_server
+ alert.signature: Query keyword check - delete
+ alert.signature_id: 2
+ app_proto: pgsql
+ pcap_cnt: 24
+ pgsql.request.simple_query: DELETE FROM new_table WHERE NAME='Londubat';
+ pgsql.response.command_completed: DELETE 1
+ pgsql.tx_id: 7
+- filter:
+ count: 1
+ match:
+ event_type: alert
+ alert.signature: Query keyword check - delete
+ alert.signature_id: 2
+ app_proto: pgsql
+ direction: to_server
+ pcap_cnt: 26
+ pgsql.request.simple_query: DELETE FROM new_table WHERE NAME='Hermione';
+ pgsql.response.command_completed: DELETE 1
+ pgsql.tx_id: 8
+- filter:
+ count: 1
+ match:
+ event_type: alert
+ direction: to_server
+ alert.action: allowed
+ alert.signature: Query keyword check - delete
+ alert.signature_id: 2
+ app_proto: pgsql
+ pcap_cnt: 28
+ pgsql.request.simple_query: DELETE FROM new_table WHERE NAME='Maugre';
+ pgsql.response.command_completed: DELETE 1
+ pgsql.tx_id: 9
+- filter:
+ count: 1
+ match:
+ event_type: alert
+ direction: to_server
+ alert.signature: Query keyword check - select
+ alert.signature_id: 1
+ app_proto: pgsql
+ pcap_cnt: 57
+ pgsql.request.simple_query: SELECT * FROM new_table;
+ pgsql.response.code: 25P02
+ pgsql.response.file: "d:\\pginstaller_13.auto\\postgres.windows-x64\\src\\backend\\tcop\\postgres.c"
+ pgsql.response.line: '1105'
+ pgsql.response.message: "current transaction is aborted, commands ignored until
+ end of transaction block"
+ pgsql.response.routine: exec_simple_query
+ pgsql.response.severity_localizable: ERROR
+ pgsql.response.severity_non_localizable: ERROR
+ pgsql.tx_id: 17
+- filter:
+ count: 1
+ match:
+ event_type: alert
+ alert.signature: Query keyword check - select
+ alert.signature_id: 1
+ app_proto: pgsql
+ direction: to_server
+ pcap_cnt: 84
+ pgsql.request.simple_query: SELECT * FROM new_table;
+ pgsql.response.command_completed: SELECT 8
+ pgsql.response.data_rows: 8
+ pgsql.response.data_size: 236
+ pgsql.response.field_count: 2
+ pgsql.tx_id: 26