Commit graph

1581 commits

Author SHA1 Message Date
Marko Mäkelä
31fc2eb4bc Merge 10.7 into 10.8 2022-06-07 09:07:48 +03:00
Marko Mäkelä
09dc322342 Merge 10.6 into 10.7 2022-06-07 08:44:20 +03:00
Monty
814c69ea30 Merge remote-tracking branch 'origin/10.5' into 10.6 2022-06-06 17:41:46 +03:00
Marko Mäkelä
57d4a242da Merge 10.7 into 10.8 2022-06-06 16:22:09 +03:00
Alexander Barkov
6d99fdce18 MDEV-28491 Uuid. "UPDATE/DELETE" not working "WHERE id IN (SELECT id FROM ..)"
This is a 10.5 version of the patch.
2022-06-03 23:14:25 +04:00
Alexander Barkov
477776bfed MDEV-28491 Uuid. "UPDATE/DELETE" not working "WHERE id IN (SELECT id FROM ..)"
This is a 10.7 version of the patch.
2022-06-03 20:14:41 +04:00
Michal Schorm
6ec17142dc Fix the FSF address to match the current one in: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt 2022-05-27 15:55:49 +10:00
Sergei Golubchik
bf2bdd1a1a Merge branch '10.8' into 10.9 2022-05-19 14:07:55 +02:00
Sergei Golubchik
443c2a715d Merge branch '10.7' into 10.8 2022-05-11 12:21:36 +02:00
Sergei Golubchik
fd132be117 Merge branch '10.6' into 10.7 2022-05-11 11:25:33 +02:00
Sergei Golubchik
3bc98a4ec4 Merge branch '10.5' into 10.6 2022-05-10 14:01:23 +02:00
Julius Goryavsky
404984980f MDEV-28500: Hashicorp: Debian packaging is broken
This commit fixes a documentation installation
issue (for debian packaging) and generally brings
the installation control files up to date (as for
the rest of the components).
2022-05-10 08:22:21 +02:00
Sergei Golubchik
ef781162ff Merge branch '10.4' into 10.5 2022-05-09 22:04:06 +02:00
Julius Goryavsky
2e14f2c889 MDEV-28279: Hashicorp: Cannot migrate hexadecimal keys from file key management
This commit fixes a bug in the algorithm for converting hexadecimal
strings to binary key values, which leads to incompatibility with other
plugins and reduces the effective information capacity of the keys.
The new key conversion algorithm is incompatible with tables which
alrady encrypted using a old plugin (plugin version less than or
equalt to the 1.05).
2022-05-09 07:55:41 +02:00
Julius Goryavsky
94841ba656 Hashicorp plugin: typo fixed 2022-05-09 07:55:41 +02:00
Julius Goryavsky
8ae5408cab MDEV-28442: Hashicorp: refactoring to wrap static variables into a class
This commit contains changes to refactor the the Hashicorp plugin code
which hides all variables previously declared as "static" and which are
not user-visible parameters into a special class that contains all the
plugin's dynamic data. This was done primarily to significantly simplify
the code of the initialization and deinitialization functions, which
previously contained a large number of gotos and complex branching
conditions to control memory deallocation.
2022-05-09 07:55:41 +02:00
Julius Goryavsky
e571174e80 MDEV-28291: Hashicorp: Cache variables claim to be dynamic but changes are ignored
This commit fixes an issue with no visible update in caching
option values after changing them dynamically while the server
is running. This issue was related to forgotten copy operations
of new values into dynamic variables. At the same time, internal
variables (responsible for caching) were always updated correctly.
The commit includes a test that checks that the update is now
reflected in the values of dynamic variables.
2022-05-09 07:55:41 +02:00
Julius Goryavsky
0902cfaec8 MDEV-28330: Hashicorp: Key caching doesn't appear to be working
Added test files for mtr that test failed configuration with
--loose-hashicorp-key-management-cache-version-timeout=180000
correctly set.
2022-05-09 07:55:41 +02:00
Julius Goryavsky
3d1f765066 MDEV-28276: Hashicorp: checking that kv storage is created with version 2+
For the plugin to work properly, we need support for key versioning,
and for this, the kv storage in Hashicorp Vault must be created with
version 2 or higher. This commit adds such a check performed during
plugin initialization.

Note: checking for kv storage version during plugin initialization
can be disabled via --hashicorp-key-management-check-kv-version=off
command-line option or via the corresponding option in the server
configuration files.
2022-05-09 07:55:41 +02:00
Julius Goryavsky
1c22a9d8ae MDEV-28277: Checking for mandatory "/v1/" prefix in the URL
According to the Hashicorp Vault API specifications,
the URL to access the keys must include the "/v1/" prefix
at the beginning of the path. This commit adds this parameter
check, as well as a check for the presence of at least one
letter in the hostname inside the URL and in the secret
store name (after "/v1/").
2022-05-09 07:55:41 +02:00
Julius Goryavsky
35989d9cc1 MDEV-28281: Hashicorp: Key ID is not indicated in the log record
This commit adds an indication of the ID of the not found key
(and, when appropriate, also an indication of the version number
of the key) in the log file, making it easier to find errors.
2022-05-09 07:55:41 +02:00
Julius Goryavsky
0c5d8b8730 MDEV-28275: Hashicorp: ASAN heap-use-after-free in get_version()
Passing a string as a parameter by value has been replaced by
passing by reference to avoid using memory after it has been freed.
2022-05-09 07:55:41 +02:00
Julius Goryavsky
1146b713b2 MDEV-19281: Plugin implementation for the Hashicorp Vault KMS
- Authentication is done using the Hashicorp Vault's token
  authentication method;
- If additional client authentication is required, then the
  path to the CA authentication bundle file may be passed
  as a plugin parameter;
- The creation of the keys and their management is carried
  out using the Hashicorp Vault KMS and their tools;
- Key values stored as hexadecimal strings;
- Key values caching is supported.
- Implemented a time-invalidated cache for key values and
  for key version numbers received from the Hashicorp Valult
  server;
- The plugin uses libcurl (https) as an interface to
  the HashiCorp Vault server;
- JSON parsing is performed through the JSON service
  (through the include/mysql/service_json.h);
- HashiCorp Vault 1.2.4 was used for development and testing.
2022-05-09 07:55:41 +02:00
Sergei Golubchik
a70a1cf3f4 Merge branch '10.3' into 10.4 2022-05-08 23:03:08 +02:00
Alexey Botchkov
7215b00354 MDEV-28431 auth_pam tool left zombie processes.
The faulure in username packet reading can lead to the
auth_plugin_tool zombie. So check and close the application.
2022-04-28 15:40:08 +04:00
Alexey Botchkov
add5137d84 MDEV-28429 audit plugin report OOOOO.
Few initializations to the connection_info structure added.
I think they can be removed if we are sure the bug was fixed.
2022-04-28 11:28:49 +04:00
Sergei Golubchik
e6bbc83d5e MDEV-26212 PAM authentication fails with ENOMEM
use posix_spawn(), not fork() - it's better for systems that don't
overcommit memory
2022-04-26 11:21:04 +02:00
Marko Mäkelä
6cb6ba8b7b Merge 10.8 into 10.9 2022-04-06 13:33:33 +03:00
Marko Mäkelä
b2baeba415 Merge 10.7 into 10.8 2022-04-06 13:28:25 +03:00
Marko Mäkelä
2d8e38bc94 Merge 10.6 into 10.7 2022-04-06 13:00:09 +03:00
Marko Mäkelä
9d94c60f2b Merge 10.5 into 10.6 2022-04-06 12:08:30 +03:00
Marko Mäkelä
cacb61b6be Merge 10.4 into 10.5 2022-04-06 10:06:39 +03:00
Marko Mäkelä
d6d66c6e90 Merge 10.3 into 10.4 2022-04-06 08:59:09 +03:00
Daniel Black
7ae46ced37 Merge branch 10.8 into 10.9
Closes #2084
2022-04-06 14:33:27 +10:00
Daniel Black
7b06bc9a94 Merge branch 10.7 into 10.8
Closes #2083
2022-04-06 14:23:20 +10:00
Alexander Barkov
0ffaf19c53 Adding a "const" qualifier to arguments of create_func(), create_native() etc
The "const" qualifier was obviously forgotten.

This change will also simpily fixing of MDEV-27744.
2022-04-04 09:50:32 +04:00
Sergei Golubchik
d48774e0e0 MDEV-27354 Change maturity of plugins 2022-04-02 17:19:43 +02:00
Rucha Deodhar
3eb1e11d8a MDEV-23479: Add a THD* argument to Item_func_or_sum::fix_length_and_dec()
Fix: Added THD *thd argument in Item_func_or_sum::fix_length_and_dec() and in
fix_length_and_dec() for all derived classes of Item_func_or_sum.
2022-03-30 17:00:17 +05:30
Marko Mäkelä
5c69e93630 Merge 10.7 into 10.8 2022-03-30 09:34:07 +03:00
Marko Mäkelä
a4d753758f Merge 10.6 into 10.7 2022-03-30 08:52:05 +03:00
Marko Mäkelä
b242c3141f Merge 10.5 into 10.6 2022-03-29 16:16:21 +03:00
Marko Mäkelä
d62b0368ca Merge 10.4 into 10.5 2022-03-29 12:59:18 +03:00
Marko Mäkelä
ae6e214fd8 Merge 10.3 into 10.4 2022-03-29 11:13:18 +03:00
Marko Mäkelä
020e7d89eb Merge 10.2 into 10.3 2022-03-29 09:53:15 +03:00
hongdongjian
7af133cc11 MDEV-28177: server_audit; Update the offset of dbName on the aarch64 platform.
On the aarch64 platform, MySQL 5.7.33 cannot install this version of the audit
plugin, but X86_64 can run well。
2022-03-28 13:42:16 +11:00
Marko Mäkelä
9f5a3e5689 Merge 10.7 into 10.8 2022-03-15 18:18:07 +02:00
Marko Mäkelä
de4ec44b4f Fix clang -Wtypedef-redefinition
Include my_global.h before mysql.h so that the latter will not
redefine my_socket and my_ulonglong.

Fixup for commit 77c184df7c
2022-03-15 12:57:39 +02:00
Marko Mäkelä
e8a2a70cf8 Merge 10.7 into 10.8 2022-03-08 10:03:45 +02:00
Marko Mäkelä
af87186c1d Merge 10.6 into 10.7 2022-03-08 09:51:31 +02:00
Vlad Lesin
202316a38f Merge 10.5 into 10.6 2022-03-07 18:42:47 +03:00