Commit Graph

4289 Commits

Author SHA1 Message Date
09c55111cc Merge branch '2.3' into 2.4 2020-01-09 06:59:00 +02:00
6e8318f72f MXS-2829: Remove config file when deleting a filter 2020-01-08 15:30:15 +02:00
b555115fa2 Merge branch '2.3' into 2.4 2020-01-07 11:12:02 +02:00
36b0196c3e MXS-2825: Fix basic user privileges
All POST, PUT, DELETE and PATCH commands should be prevented regardless of
whether they define a request body.
2020-01-07 10:40:41 +02:00
6306519e5e MXS-2710: Move client_count handling inside Session
By incrementing the counters when the session is created, we know that the
counter will always be decremented correctly. This does cause the listener
session to be counted as an actual session but this is already present in
the statistics calculations and is something we have to live with in 2.3
This change also makes it possible to overshoot the connection count
limitation as the session creation is delayed until authentication
fails. Both of these problems are fixed in 2.4.
2020-01-07 10:40:40 +02:00
9428c31bc4 Merge branch '2.3' into 2.4 2020-01-02 11:22:52 +02:00
1092203779 Allow non-head use of gwbuf_copy_data
Non-head links in a buffer chain can now be used with gwbuf_copy_data
without triggering the debug assertion.
2019-12-31 07:26:17 +02:00
03d45c2ace Allow multiple fatal signals
As long as the same thread never handles more than one fatal signal,
multiple fatal signals can be processed. This should guarantee that the
stacktrace is printed into the log while guaranteeing that recursion never
takes place if the handling of a fatal signal causes a fatal signal to be
emitted.
2019-12-31 07:26:16 +02:00
ff78a8bca5 Fix api reseponse 2019-12-30 10:06:59 +02:00
5fe97808e3 Merge branch '2.3' into 2.4 2019-12-20 11:44:11 +02:00
e725ebb7d0 Add missing set of fake event flag
The FakeEventTask called the actual DCB handler with a fake task but it
didn't set the fake event flag. This caused KILL queries to be treated as
if they were network errors.
2019-12-19 11:31:51 +02:00
4ae22f9991 Merge branch '2.3' into 2.4.5 2019-12-19 10:03:35 +02:00
a73b183555 MXS-2813: Mask password values in output
The password values are now masked with asterisks. This tells whether a
password is set or not but it does not expose any information about the
password itself.
2019-12-19 09:56:00 +02:00
a9a2b753c0 Update 2.4.5 change date 2019-12-18 13:25:03 +02:00
f39ed6803e Merge branch '2.3' into 2.4 2019-12-17 14:04:47 +02:00
b0a1eddb6c Store ignored error information
The errors that are ignored by readwritesplit are now stored as the
current close reason in the Backend. This allows the information about the
error to be retained and it can be used later in the error handler to
display the true reason why the connection was closed.
2019-12-17 13:48:51 +02:00
ad323bb837 Merge branch '2.3' into 2.4 2019-12-13 11:24:42 +02:00
e057c751cd Improve handleError error messages
The hangup and error handlers now have unique messages. Although the
behavior in the handlers is practically the same in both cases, the cause
of the error is not the same.

If a socket error is present, it is added to the error message. If an
error is present, it should clearly show the reason why the TCP socket was
closed.

The is_fake_event boolean helps distinguish fake events from real
ones. This makes figuring out the real source of hangup events easier.
2019-12-13 10:50:04 +02:00
e909632e9e MXS-2802: Route COM_RESET_CONNECTION to all servers
The purpose of a COM_RESET_CONNECTION is to reset the connection
states. This means it should be routed to all servers, the same as all
session state modifying commands.
2019-12-13 10:49:36 +02:00
934b865b25 Add missing commands to STRPACKETTYPE
The MariaDB specific commands were missing.
2019-12-13 10:49:36 +02:00
90f7c69f9d Fix database renaming with no default database
If no default database was given, it was possible that the code would end
up in an endless loop.
2019-12-13 10:49:35 +02:00
d44aff6c3d Merge branch '2.3' into 2.4 2019-12-10 11:12:41 +02:00
7be6ee1616 MXS-2789: Make stale journal messages notifications
These events are of no actual consequence and can be safely ignored. It is
simply informational.
2019-12-10 11:11:05 +02:00
e36c7efa25 MXS-2785: Report PCRE2 errors
The substitution string could cause errors.
2019-12-09 17:53:59 +02:00
689a284892 MXS-2785: Make rewrite_src a regular expression
The use of a regular expression allows multiple rewrite rules to be
combined into one. This allows more versatile conversions but, given the
simple nature of regular expressions, also makes accidental changes more
likely.

Addd mxs::pcre2_substitute that is a more C++-friendly version of
mxs_pcre2_substitute to make. This makes string replacement a lot easier
to do when the source and destination are not C strings.
2019-12-09 17:53:59 +02:00
babce13ec6 Add GWBUF pretty-printing
The gwbuf_hexdump_pretty displays the hex contents of the buffer alongside
the human-readable version of it. The text version helps identify parts of
the buffer that contain text which makes protocol data decoding easier.
2019-12-09 17:53:58 +02:00
5351d43065 Merge branch '2.3' into 2.4 2019-12-03 10:40:57 +02:00
9e9abbe8be MXS-2786: Require certificates when verifying peers
When peer verification is enabled, clients must present a certificate.
2019-12-03 10:34:00 +02:00
7a5e50f980 Merge branch '2.3' into 2.4 2019-11-29 16:41:07 +02:00
521c75505b Properly detect SSL initialization failures
The return value was not checked in the function that created it.
2019-11-29 16:31:07 +02:00
ab8393939b MXS-2773: Make host blocking an optional feature
In cases where servers are known to be down on startup, this feature does
more harm than good. Disabling it in these cases would be preferable but
due to how the parameter is used, it is not possible.
2019-11-29 16:31:07 +02:00
cd9b82ba09 Print OpenSSL errors on CA cert errors
This helps figure out why the certificate is not OK.
2019-11-29 16:16:35 +02:00
fb23f3eb3e OpenSSL 1.1 supports TLSv1.1 and TLSv1.2
TLSv1.0 is the only version that newer OpenSSL versions do not support.
2019-11-29 16:16:35 +02:00
d45ea8d489 Merge branch '2.3' into 2.4 2019-11-29 13:59:16 +02:00
d41975dde8 MXS-2782 Return nullptr if non-existing worker is asked for
Earlier assert in debug mode and garbage in release mode.
2019-11-28 14:33:00 +02:00
c5ce940b12 Merge branch '2.3' into 2.4 2019-11-28 08:05:44 +02:00
774e9bc3f0 MXS-2762: Add ssl_version=TLSv13
Added new ssl_version value for TLSv1.3. This allows the list of accepted
protocol versions to be limited to all supported protocols. Previously
TLSv1.3 was only available with ssl_version=MAX.

Also fixed the enum value serialization to use a lowercase v. This causes
them to have the same value as the one used in the enum.
2019-11-28 07:48:01 +02:00
f7f865d4c3 MXS-2763: Log correct error for unsupported TLS versions
Previously when ssl_version was used with a value that is not supported on
the system, an unknown parameter error was returned. This could be
confusing and logging a proper error message should make it clear.
2019-11-28 07:48:01 +02:00
f6731a898d Update change date 2019-11-13 08:37:17 +02:00
3f05059afa Merge branch '2.3' into 2.4 2019-11-11 09:09:10 +02:00
638d1bf354 MXS-2760: Fix ssl_version conversion
The value is now correctly converted to the enum values.
2019-11-11 09:05:46 +02:00
fdfbf3e133 Update 2.4.3 change date 2019-11-05 12:21:00 +02:00
03e8e85a22 Enable SO_KEEPALIVE
This hopefully prevents unnecessary TCP timeouts.
2019-11-05 11:02:32 +02:00
861e27eb00 Merge branch '2.3' into 2.4 2019-10-29 14:04:31 +02:00
df6c56e7ca Update 2.3.13 Change Date 2019-10-29 12:51:31 +02:00
e82be12be9 Cache password hash results
Since the user authentication stores a SHA2-512 hash of the password on
disk, caching the hash results in memory speeds up the authentication
process significantly. Storing the password on disk in plain-text form
would also speed it up but this would be quite insecure.
2019-10-29 11:34:09 +02:00
9b75ea17ac Fix merge bug
Unhandled conflict
2019-10-29 11:08:52 +02:00
722d269123 Merge branch '2.3' into 2.4 2019-10-29 11:02:37 +02:00
446a3fac15 MXS-2720: Fix service session count
The number of sessions wasn't always incremented but it was always
decremented. This happened primarily when authentication failed. By making
the management of the counters a part of the object lifecycle, this
problem goes away.
2019-10-29 09:26:41 +02:00
26a56f48b2 MXS-2720: Assert that client count is non-negative 2019-10-29 09:26:41 +02:00