[MXS-66] MaxScale should refuse to load modules if unexpected configuration options are found. Created: 2015-03-27 Updated: 2017-12-01 Resolved: 2016-05-17 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | 1.1.0 |
| Fix Version/s: | 2.0.0 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Kolbe Kegel (Inactive) | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | dynamic_configuration | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 2016-10 | ||||||||||||||||
| Description |
|
This request was originally made in http://bugs.mariadb.com/show_bug.cgi?id=154 in August 2013, but I ran into it again while testing filters. If you add an option to MaxScale.cnf that doesn't exist for a module, the module writes an error to the error log, but continues loading. For example:
The correct option is "filters", not "filter". But in this case, the router loads anyway, without the filters defined. This may mean that a user is allowed to execute queries that should be blocked. In other cases, it could have other harmful effects. I think that the module should refuse to load if there are unexpected/unused configuration options. That is the behavior of MySQL server and it can be very dangerous to have queries going places you don't expect, or have queries allowed to execute in the first place, because you've mis-spelled a configuration variable or option or think you're setting some option that doesn't exist. |
| Comments |
| Comment by markus makela [ 2015-05-02 ] |
|
The core of the problem is that each individual module needs its own special subset of parameters. This means that either each module must check all given parameters and if it finds an unexpected one, refuse to load, or that a generic way to retrieve module parameters must be created. The first solution would fix the problem for existing modules but the amount of code that needs to be updated and checked grows significantly with each added module. The second solution would simplify the module configuration process and common code could be used for all modules. This solution will require modification of all module interfaces. |
| Comment by markus makela [ 2016-05-17 ] |
|
MaxScale will refuse to start if a bad parameter is given. Router options and filter parameters are not checked so the modules themselves should check them. |