-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pgsql/logger: open json object from logger fn - v3 #11008
Conversation
Before, the JsonBuilder object for the pgsql event was being created from the C-side function that actually called the Rust logger. This resulted that if another module - such as the Json Alert called the PGSQL logger, we wouldn't have the `pgsql` key present in the log output - only its inner fields. Bug OISF#6983
When createing a new PgsqlTransaction, we first increment PgsqlState's tx_id and then pass that onto the new tx tx_id. As it is not created they're first id 0, there's no need to adjust when freeing or searching. Bug OISF#7000
I don't understand the tx_id explanation, can you expand on it? What was happening before? What is the tx_id space? 0-N or 1-N? |
Pgsql's When Suricata does app-layer event logging, it uses When Suricata does alert event logging and adds app-layer metadata, the If, when creating Pgsql Events, I call I hope this all make sense. I could update the commit message for bug 7000 to be something like:
About that extra part - feels like something that should be documented. |
I'm initially curious why other protocols aren't having the same issue, or maybe they are. As this pattern used throughout. |
Observation. In master branch without this patch:
With this patch:
While I haven't yet, this should be looked at in another protocol as well to see if its a common pattern. |
Information: ERROR: QA failed on SURI_TLPW2_autofp_suri_time.
Pipeline 20450 |
I vaguely remember a discussion where something connected was mentioned - by you, I think? Where we'd see different results between IDS/IPS... The I will try to craft SV tests for other protocols, having versions with |
Maybe stateless parsers won't be affected by this? Wonder if the fact that we don't add the |
There are differences. Detection is run earlier that can lead to some differing results, such as packet logged, what transaction data might be available - but from adding some prints its clear the transaction is there, just the indexing is off. However, I don't think the app-layer should need to worry if we're in IDS or IPS mode, that should be done more inside the engine, and this is where things seem to be off here. |
Closing this as I'm still investigating. I want to submit the next PR once we have a deeper understanding of what's going on, and whether the fix should include other protocols - or follow a different approach, entirely. |
Previous PR: #10997
Changes from last PR:
template.rs
as per Jason's analysisLink to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/6983
https://redmine.openinfosecfoundation.org/issues/7000
Provide values to any of the below to override the defaults.
SV_BRANCH=OISF/suricata-verify#1810