17 Commits

Author SHA1 Message Date
Johan Wikman
5648f708af Update license to BSL 1.1 2017-02-14 21:42:28 +02:00
Esa Korhonen
1f9b18e3bc Split secrets.h to public and core + miscellaneous cleanup
Also, changed some function names to this_style from thisStyle. More of
this in later commits.
2017-01-27 15:33:52 +02:00
Esa Korhonen
641896872e Rename GW_AUTHENTICATOR and GW_BITMASK + cleanup 2017-01-24 10:03:36 +02:00
Esa Korhonen
6e38276a20 Rename files, removing "gw"-prefix
Also gwdirs.h.in -> paths.h.in
2017-01-20 12:55:52 +02:00
Markus Mäkelä
4869fd98eb Format authenticator modules
Formatted authenticator modules with Astyle.
2017-01-17 14:47:50 +02:00
Markus Mäkelä
2cabcea211 Add definitions of MXS_MODULE_NAME to all modules
All modules now declare a name for the module. This is name is added as a
prefix to all messages logged by a module. The prefix should help
determine which part of the system logs a message.
2017-01-16 11:28:34 +02:00
Johan Wikman
a2a38f952a Add [process|thread] [init|finish] functions to modules
The MXS_MODULDE object now contains optinal pointers for functions
to be called att process and thread startup and shutdown. Since the
functions were added to the end, strictly speaking, all structures
would not have needed to have been modified, but better to be
explicit. In a subsequent change, these will be called.

C++ does not support flexible arrays, so for the time being C++
modules are restricted to 10 parameters. Better approach is to
factor out the parameters to a separate array and then just store
a pointer to that array in MXS_MODULE.
2017-01-05 14:44:02 +02:00
Markus Mäkelä
c96bd64aa8 Rename MODULE_INFO to MXS_MODULE
The MODULE_INFO is now the main object which is used by modules to convey
information to the MaxScale core. The MXS_MODULE name is more apt as it
now contains the actual module definition.

The old MODULES structure was moved into load_utils.c as an internal
implementation and was renamed so that it is not confused with the new
MODULE structure.
2017-01-03 18:01:14 +02:00
Markus Mäkelä
b00e0328d5 Create a macro for module declarations
The modules are now declared with a common macro. This allows future
additions to the module loading process while also making the loaded
symbol name a constant.
2017-01-03 18:01:13 +02:00
Markus Mäkelä
ae0577c695 Move module object inside MODULE_INFO
This allows modules to only expose one entry point with a consistent
signature. In the future, this could be used to implement declarations of
module parameters.
2017-01-03 18:01:13 +02:00
Markus Mäkelä
6c53999c97 Combine ModuleInit and GetModuleObject
The two functions can be combined into one as both are called only
once. This removes the need for the explicit ModuleInit function.
2017-01-03 18:01:13 +02:00
Markus Mäkelä
7df29aa1ec Move version entry point into MODULE_INFO
The MODULE_INFO can easily hold the version information of the
module. This removes the need for a explicit version entry point.
2017-01-03 18:01:13 +02:00
Markus Makela
b2e11d41d5 MXS-536: Add option to MySQLAuth that skips authentication
Disabling authentication in MaxScale allows creation of users which act
like wildcard users but require that the connection is made through
MaxScale.
2016-12-02 14:28:58 +02:00
Markus Makela
0a9662c528 Log authentication failures on warning instead of info level
Logging authentication failures on warning level seems more appropriate
and makes them easier to spot.
2016-10-21 18:33:35 +03:00
Markus Makela
aa20385347 Log cached credentials path
Logging the path to the cached credentials should help to the user if
stale cache files are used.
2016-10-21 18:33:35 +03:00
Markus Makela
8f55cfbc16 Fix cache_dir path handling in MySQLAuth
The path that was given as the option for the cache directory wasn't
properly checked for terminating forward slashes. Due to this, the cache
file was created with the wrong name.
2016-10-21 18:33:35 +03:00
Markus Makela
4e07c3313c Move dbusers.c out of the core
The dbusers.c was a MySQL protocol specific file which was used directly
by some of the modules.

Added a new return value for the loadusers authenticator entry point which
allows fatal failures to occur when users are loaded. Currently this is
only taken into notice when the service is first started. If a listener
later returns a fatal error, it is only logged but the service stays in
operation.

Moved the MySQLAuth authenticator sources and the tests that relate to
this module into a subdirectory in the authenticator
directory. Eventually, all authenticators could have a subdirectory of
their own.
2016-10-21 18:33:35 +03:00