13461 Commits

Author SHA1 Message Date
Markus Mäkelä
52ef9afcc6
MXS-2483: Add missing deletion of defaulted functions 2019-05-24 15:33:18 +03:00
Markus Mäkelä
e5f0d3eb37
Only log one host blocking message
The message would be logged multiple times if multiple authentication
attemps failed at the same time.

Also renamed the RateLimit class method to the same as the Listener one.
2019-05-24 15:33:18 +03:00
Markus Mäkelä
c2975d33f8
MXS-2483: Fix dcb.hh includes
The header depended on ssl.hh to include the OpenSSL headers even though
it used OpenSSL types. By fixing these dependencies the ssl.h header can
now freely include the rworker_local type which removes the need for the
hidden implementation of SSLProvider.
2019-05-24 15:33:18 +03:00
Markus Mäkelä
d5ec357731
Fix binlogrouter SSL creation
The SSLContext could get invalid parameters as the router unconditionally
added all the parameters.
2019-05-24 15:33:17 +03:00
Markus Mäkelä
3af66f3309
MXS-2483: Take SSLProvider into use
Servers and listeners now have a SSLProvider member variable that is used
for all SSL related tasks.
2019-05-24 15:33:17 +03:00
Markus Mäkelä
cb72b2a5cc
MXS-2483: Move SSL functionality into SSLProvider
The class is intended to be inherited by objects that need an SSL context
and a configuration. In practice this will be servers and listeners.

The SSLContext is stored in a rworker_local shared_ptr that makes it
possible to update safely. As the copying is always done behind a lock the
cached local value always holds a valid SSLContext instance for the
duration of all function calls.

Using the pImpl idiom, the routingworker.hh header is not exposed in the
ssl.hh header. This allows the SSLProvider class to be inherited more
easily.
2019-05-24 15:33:17 +03:00
Markus Mäkelä
8a4b58d52c
MXS-2483: Move SSL configuration into SSLConfig
This way the configuration information can be accessed without the
SSLContext.
2019-05-24 15:33:17 +03:00
Markus Mäkelä
075ad1cfb3
Fix JSON representation of Listener parameters
The parameters were still hard-coded and not generated from the actual
parameters.
2019-05-24 15:33:17 +03:00
Markus Mäkelä
47ebcdcc02
Sort server relationships
As server relationships are unordered, sorting them guarantees a certain
order. This fixes the MaxCtrl cluster diff test failure.

Also formatted monitor.cc sources: the indentation seems to be off.
2019-05-24 15:33:17 +03:00
Esa Korhonen
bed28db3fd Merge branch '2.3' into develop 2019-05-24 13:55:47 +03:00
Esa Korhonen
a1697e2aa6 MXS-2479 PAMBackendAuth is more tolerant of extra messages.
The authenticator can now receive additional questions from the server even
after the original password-query.
2019-05-24 11:31:55 +03:00
Markus Mäkelä
4e2d350838
MXS-2483: Return std::unique_ptr from SSLContext::create
Smart pointers are far nicer than raw pointers.
2019-05-24 10:05:43 +03:00
Markus Mäkelä
5b55864b06
MXS-2483: Store listener SSLContext in unique_ptr
Also removed some unnecessary checks for session->listener: The Session
constructor takes the listener as an argument.
2019-05-24 10:05:43 +03:00
Markus Mäkelä
bc500d2565
MXS-2483: Store server SSLContext in unique_ptr 2019-05-24 10:05:42 +03:00
Markus Mäkelä
9c6ec5e6c9
MXS-2483: Re-configuring SSL for servers is an error
Since listeners cannot be reconfigured, we can accept this limitation and
impose it on the servers as well. This keeps the behavior consistent and
removes the need to resolve the deletion issue (for the time being).
2019-05-24 10:05:42 +03:00
Markus Mäkelä
3b8e28392e
MXS-2483: Make server SSL private
The old server_ssl member is now renamed and private. The ssl_context and
set_ssl_context methods provide access to it.
2019-05-24 10:05:42 +03:00
Markus Mäkelä
f79e8b108c
Log end of bug601 verbosely
The test appears to fail to connect to MaxScale due to unavailability of
connections. Theoretically, the improvement in accept speed due to
SO_REUSEPORT additions could explain the faster exhaustion of available
sockets.
2019-05-24 10:05:16 +03:00
Markus Mäkelä
e72abe3643
Fix object names in mxs2450_change_user_crash 2019-05-24 10:05:16 +03:00
Markus Mäkelä
9d80b42dc6
Fix mxs2300_history_pruning config
Names with whitespace are no longer supported.
2019-05-24 10:05:16 +03:00
Markus Mäkelä
c57764a84f
Fix no_password
The test used freed memory.
2019-05-24 10:05:16 +03:00
Markus Mäkelä
7eff7f8e9e
Remove unused function in mysql_common.cc 2019-05-24 10:05:15 +03:00
Markus Mäkelä
397fc97d07
Only count actual failures as auth failures
If the authentication process fails due to an inability to start a
session, it should not be counted towards the number of failed
authentication attempts.
2019-05-24 10:05:15 +03:00
Markus Mäkelä
add488366b
Log message on when a host is blocked
To make it easier to detect when a host was blocked due to too many
authentication failures, a log message is now logged.
2019-05-24 10:05:15 +03:00
Markus Mäkelä
cb1e7b14b4
Remove debugcli from test configurations
The module has been removed in 2.4.
2019-05-24 10:05:15 +03:00
Esa Korhonen
bd8aa64547 MXS-2479 Accept additional messages in PAM authenticator
Plugins may send additional messages during authentication. These messages
often contain notifications such as password expiration dates. Both the client
and backend side authenticators now handle such messages. The messages are not
sent to the user, only the log. The requirement that only "Password: " is queried
still stands.
2019-05-23 14:14:25 +03:00
Timofey Turenko
e0c5791a6e Merge branch 'develop' of github.com:mariadb-corporation/MaxScale into develop 2019-05-23 11:29:32 +03:00
Markus Mäkelä
f8688a7285
Merge branch '2.3' into develop 2019-05-22 15:57:46 +03:00
Timofey Turenko
64935573b2 Add virtual functions check_replication() and start_replication() for Clustrix
Implementations of check_replication() and start_replication() for Clustrix allows to use fix_replication()
also for Clustrix nodes without checking it.
Also several attempts to check nodes after restart are added - to wait for nodes if they are not running
right after server daemon restart
2019-05-22 15:39:25 +03:00
Markus Mäkelä
b6b0a69440
Fix parameter option overlap
All duration parameters behaved as if they were deprecated due to the bits
overlapping.
2019-05-22 12:25:06 +03:00
Markus Mäkelä
17fa1ce616
Fix galeramon regression
The comparisons were done wrong: strcasecmp returns 0 for equal strings.
2019-05-22 10:02:48 +03:00
Markus Mäkelä
85a0cdf46c
Fix runtime listener creation
The "default" special keywords weren't removed.
2019-05-22 10:02:48 +03:00
Markus Mäkelä
e545e2ac5c
Merge branch '2.3' into develop 2019-05-22 10:02:27 +03:00
Markus Mäkelä
8317fec745
MXS-2496: Check for ALL PRIVILEGES grant
If a user has ALL PRIVILEGES as a global privilege, it overshadows the
SHOW DATABASES grant.
2019-05-22 09:56:35 +03:00
Markus Mäkelä
365efb9d3a
Ignore SIGHUP termination in ssh_node
Sometimes the command appears to complete and terminate with a SIGHUP
instead of the proper return value.
2019-05-22 09:56:35 +03:00
Marko
af92fef510 MXS-2477 Update schemarouter documentation 2019-05-21 13:57:32 +03:00
Marko
7893c120a9 MXS-2477 Change schemarouter ignore_databases parameters to ignore_tables
With the table level sharding parameter is used to ignore tables not
databases.
2019-05-21 13:48:17 +03:00
Markus Mäkelä
b294acf276
MXS-2496: Fix SHOW DATABASES grant check
The code expected that the grant was given to the actual user, not a role.
2019-05-21 13:43:51 +03:00
Markus Mäkelä
b04415d8da
Fix use of gwbuf_length in mxs::Buffer
Backend should use empty() instead of length() to see if the buffer is
empty. The length of a buffer should always be valid to call, even on
empty buffers.
2019-05-21 13:15:20 +03:00
Markus Mäkelä
0c19d1ea03
Fix debug assertion in mysql_backend
The backend read function used a NULL GWBUF with gwbuf_length.
2019-05-21 13:15:20 +03:00
Markus Mäkelä
c4fff21909
Fix gwbuf_apped assertion on writeq drain
The DCB writeq would be the tail pointer and it would be NULL.
2019-05-21 13:15:20 +03:00
Markus Mäkelä
6667dbed18
Add missing HEAVY label to big tests 2019-05-21 13:15:20 +03:00
Johan Wikman
d0153f6ce3 clustrixmonitor: Add missing include 2019-05-21 12:50:10 +03:00
Esa Korhonen
0af1f6e690 Merge branch '2.3' into develop 2019-05-21 11:18:40 +03:00
Esa Korhonen
cf46004bd8 Make the servers-array in Monitor private
This prevents derived classes from modifying the array directly,
which would be unsafe.
2019-05-21 10:58:24 +03:00
Johan Wikman
6317a86c69 MXS-2495 No nulls for GWBUF_IS_CONTIGUOUS()
The macro GWBUF_IS_CONTIGOUS() and the actual implementation
gwbuf_is_contiguous() can only be called with a non-NULL pointer.
2019-05-21 10:52:34 +03:00
Markus Mäkelä
68ad51bc52
MXS-2483: Address review comments 2019-05-20 15:46:53 +03:00
Markus Mäkelä
08bb5d009d
MXS-2483: Make some SSLContext methods const
The serialization and opening of a new SSL session can be const.
2019-05-20 15:46:53 +03:00
Markus Mäkelä
76399200f4
Fix assertion on client SSL read
When SSL is enabled, the protocol seems to get zero byte reads which
result in a null GWBUF being passed to gwbuf_length.
2019-05-20 15:46:52 +03:00
Markus Mäkelä
e5a49a2f7b
MXS-2483: Take SSLContext into use in binlogrouter 2019-05-20 15:45:19 +03:00
Markus Mäkelä
c78e907da0
MXS-2483: Minor SSL usage cleanup
Changed getter function return values to std::string, converted
MXS_CONFIG_PARAMETER::set_from_list to take std::strings instead of const
char pointers.
2019-05-20 15:45:19 +03:00