[MXS-1346] Function blocking per column Created: 2017-08-07 Updated: 2017-09-08 Resolved: 2017-09-05 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | dbfwfilter |
| Affects Version/s: | 2.1.5 |
| Fix Version/s: | 2.2.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Dipti Joshi (Inactive) | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 2017-40 | ||||||||||||||||
| Description |
|
Allow blocking all or specific function for all or a specific column |
| Comments |
| Comment by Johan Wikman [ 2017-08-08 ] | ||||||||||||||||||||||||||||||||
|
Blacklisting specific functions for specific columns can already be done
| ||||||||||||||||||||||||||||||||
| Comment by Dipti Joshi (Inactive) [ 2017-08-08 ] | ||||||||||||||||||||||||||||||||
|
According to comment on i.e. above rule will block "select upper(ssn), name from person" as well as "select upper(name), ssn from person". This current Jira is requesting database firewall filter to say that I want to block a specific or all the functions on column xyz only. e.g. if I have a rule to block function upper on column ssn, then the function upper could be used on column name and query will be allowed. Hence the reason to open this Jira. | ||||||||||||||||||||||||||||||||
| Comment by Johan Wikman [ 2017-08-08 ] | ||||||||||||||||||||||||||||||||
|
This is not possible currently. From the query classifier the firewall filter can get the information what functions are used in a statement, but not what columns were used as arguments to those functions. Thus, it is possible to white-list or black-list a function, but not in on conjunction with a particular column. If the query classifier were to expose that information, then the firewall filter configuration needs to be extended. | ||||||||||||||||||||||||||||||||
| Comment by Dipti Joshi (Inactive) [ 2017-08-09 ] | ||||||||||||||||||||||||||||||||
|
johan.wikmanCan you please provide estimate for doing this ? | ||||||||||||||||||||||||||||||||
| Comment by Johan Wikman [ 2017-08-09 ] | ||||||||||||||||||||||||||||||||
|
This is somewhat complex from many perspectives. Consider e.g. this:
There, ancestors.name, m.name, f.name all refer to the actual column folks.name. All that needs to be tracked and be possible to express in the query classifier interface. Further, any of the queries used to produce a intermediate resultset with a name, say father could use some function for generating those columns, instead of just picking some real columns. It's not self-evident how that should be expressed in the query classifier API. | ||||||||||||||||||||||||||||||||
| Comment by Dipti Joshi (Inactive) [ 2017-08-09 ] | ||||||||||||||||||||||||||||||||
|
As a first step - let us get function masking per column captured for simple queries. For complex queries such as above in your last comment, stored procedure can be used by DBA, and then subsequently not allow those users with masking rules to have permission to create stored procedures. | ||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2017-09-05 ] | ||||||||||||||||||||||||||||||||
|
Added support for the following syntax:
The rule matches if one the columns uses one of the functions. |