FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.24k stars 212 forks source link

Write firebird.log entry for unauthorized / failed database attachment attemps #7580

Open pcisar opened 1 year ago

pcisar commented 1 year ago

In Firebird 2.5, it was possible to detect unauthorized db attachment attempts via trace. However, this does not work anymore since v3, as unauthorized attachments are handled before engine code that handles appropriate trace event. As this feature could be used to detect attempts to hack the database from outside, it would be good to at least write a firebird.log entry.

As it's very small change, I hope it would be added to all versions since v3.

AlexPeshkoff commented 1 year ago

The downside of this suggestion is that it can make FB server less resistant to the kind of DoS attack when it receives a lot of wrong connect attempts. It will be definitely easier to overload system when each such attempt is logged.

May be we should think about ability to use trace plugin in remote server?

dyemanov commented 1 year ago

Tracing of failed connect attempts is already implemented by RedSoft. We'll prepare PR for Alex's or Vlad's review.

Noremos commented 1 year ago

The PR is here: https://github.com/FirebirdSQL/firebird/pull/7620