]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
pgsql: remove unused "password_message" code
authorJuliana Fajardini <jufajardini@oisf.net>
Thu, 1 May 2025 23:24:00 +0000 (20:24 -0300)
committerVictor Julien <victor@inliniac.net>
Sat, 10 May 2025 23:09:37 +0000 (01:09 +0200)
``Password message`` is actually logged just as ``Password``.
Remove related dead code.

doc/userguide/output/eve/eve-json-format.rst
etc/schema.json
rust/src/pgsql/logger.rs
rust/src/pgsql/parser.rs

index 99f1b3f3a9f7e12cb372801267ac2e01a53c1781..b5a2bf4641dc5c85eb75a393c867e2c453f5ccf1 100644 (file)
@@ -2526,7 +2526,7 @@ Requests are sent by the frontend (client), which would be the source of a pgsql
 flow. Some of the possible request messages are:
 
 * "startup_message": message sent to start a new PostgreSQL connection
-* "password_message": if password output for PGSQL is enabled in suricata.yaml,
+* "password": if password output for PGSQL is enabled in suricata.yaml,
   carries the password sent during Authentication phase
 * "password_redacted": set to true in case there is a password message, but its
   logging is disabled
index 58252008f3ec81aae997ee93ac1907c0465bf76f..791186da6448532a9cb9f594d1fdb9c986cdc609 100644 (file)
                         "password": {
                             "type": "string"
                         },
-                        "password_message": {
-                            "type": "string"
-                        },
                         "password_redacted": {
                             "type": "boolean",
                             "description": "indicates if a password message was received but not logged due to Suricata settings"
index 7bb5b4d8b3f652de5e0151e92dc40213c6a3d11b..fab077edfddbfd52e6a5bac420ffbbbea5173a71 100644 (file)
@@ -80,7 +80,7 @@ fn log_request(req: &PgsqlFEMessage, flags: u32) -> Result<JsonBuilder, JsonErro
             payload,
         }) => {
             if flags & PGSQL_LOG_PASSWORDS != 0 {
-                js.set_string_from_bytes("password", payload)?;
+                js.set_string_from_bytes(req.to_str(), payload)?;
             } else {
                 js.set_bool("password_redacted", true)?;
             }
index 2bddbb11387498054696e1430f7256cab09373bc..b031be332b458c67e541d15c55fbecf6ef79fd00 100644 (file)
@@ -393,7 +393,7 @@ impl PgsqlFEMessage {
         match self {
             PgsqlFEMessage::StartupMessage(_) => "startup_message",
             PgsqlFEMessage::SSLRequest(_) => "ssl_request",
-            PgsqlFEMessage::PasswordMessage(_) => "password_message",
+            PgsqlFEMessage::PasswordMessage(_) => "password",
             PgsqlFEMessage::SASLInitialResponse(_) => "sasl_initial_response",
             PgsqlFEMessage::SASLResponse(_) => "sasl_response",
             PgsqlFEMessage::SimpleQuery(_) => "simple_query",