[MXS-1280] dbfwfilter: Query could not be tokenized and will hence be rejected Created: 2017-06-07 Updated: 2020-01-20 Resolved: 2020-01-20 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | dbfwfilter |
| Affects Version/s: | 2.0.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | ssauravy | Assignee: | Johan Wikman |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Environment: |
OS : CentOS 6.8 |
||
| Description |
|
I set dbfwfilter in Maxscale as follows.
~ [MasterRoute] [root@session1 maxscale]# cat rules.goods.txt The following error occurs on the maxscale log. order by a.notice_yn desc, a.rt desc failed. Access denied for user 'user3'@'192.168.0.198' to database 'svcdb': dbfwfilter: Query could not be tokenized and will hence be rejected.<br> It seems that dbfwfilter-related errors are occurring, and the query does not execute. |
| Comments |
| Comment by markus makela [ 2017-06-07 ] |
|
Can you try and see if this is fixed in 2.1.3? |
| Comment by ssauravy [ 2017-06-07 ] |
|
Maxscale The result of doing the following in 2.1.3. CREATE TABLE `t3` ( CREATE TABLE `t4` ( Case1) (SELECT id 오류 코드: 1141 Case2) SELECT s.* 1 queries executed, 1 success, 0 errors, 0 warnings |
| Comment by Johan Wikman [ 2017-06-08 ] |
|
The query is too complex for the sqlite based parser that we use. And currently, the firewall filter works so that if a statement cannot be completely parsed, it is rejected. Do you use the firewall filter to protect the database against malicious attacks or as a safeguard against stupid mistakes? If the latter, then it would make sense to provide a "relaxed" mode that would cause the firewall filter not to reject all statements that cannot be parsed. |
| Comment by ssauravy [ 2017-06-08 ] |
|
Thank you for answer. |
| Comment by Johan Wikman [ 2017-06-08 ] |
|
The aim is that the parser in MaxScale should be capable of parsing everything that the server accepts. But exactly in what timeframe the parser will be improved I can't say at the moment. |
| Comment by Johan Wikman [ 2017-06-09 ] |
|
Just noticed that you are using a regex rule. In that case the database firewall filter actually shouldn't do any parsing, since the parse result is not used at all. That can be considered to be a bug and I've created a Jira item to that effect: https://jira.mariadb.org/browse/MXS-1284 |
| Comment by Johan Wikman [ 2020-01-20 ] |
|
MaxScale 2.0. 2.1 and 2.2 are no longer supported. Please reopen or recreate if this is still an issue in 2.3 and 2.4. |