Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using TLS without configuration #1500

Merged
merged 21 commits into from
Jul 29, 2024
Merged

Using TLS without configuration #1500

merged 21 commits into from
Jul 29, 2024

Conversation

rusher
Copy link
Contributor

@rusher rusher commented Jul 26, 2024

Connector implementation of https://jira.mariadb.org/browse/MDEV-31855

Since MariaDB 11.4.1, TLS use has greatly been simplified.
Connector side doesn't require TLS configuration anymore, even with self-signed certificates.

Connectors can now validate ssl certificates using client password (using seed and server certificate SHA256 thumbprint).

limitations:

  • only possible when using mysql_native_password/client_ed25519 authentication
  • password is required

see https://mariadb.org/mission-impossible-zero-configuration-ssl/

rusher and others added 4 commits July 20, 2024 12:31
This is based on https://jira.mariadb.org/browse/MDEV-15935: first OK_Packet can contain variable `redirect_url` using "mariadb/mysql://[{user}[:{password}]@]{host}[:{port}]/[{db}[?{opt1}={value1}[&{opt2}={value2}]]]']" format.

Signed-off-by: rusher <[email protected]>
change redirection logging

Signed-off-by: rusher <[email protected]>
Connector implementation of https://jira.mariadb.org/browse/MDEV-31855

Since MariaDB 11.4.1, TLS use has greatly been simplified. Connector side doesn't require TLS configuration anymore, even with self-signed certificates.

connectors now validate ssl certificates using client password (using seed and server certificate SHA256 thumbprint).

limitations:
 * only possible when using mysql_native_password/client_ed25519 authentication
 * password is required

see https://mariadb.org/mission-impossible-zero-configuration-ssl/

Signed-off-by: rusher <[email protected]>
@rusher
Copy link
Contributor Author

rusher commented Jul 26, 2024

PR is based on #1499, because require OKPayload information, so depending on your review, it can change a lot :) (and this PR is clearly more important than PR redirection)

Conflicts:
	.ci/config/config.compression+ssl.json
	.ci/config/config.compression.json
	.ci/config/config.json
	.ci/config/config.ssl.json
	azure-pipelines.yml
	src/MySqlConnector/Core/ConnectionPool.cs
	src/MySqlConnector/Core/ServerSession.cs
	src/MySqlConnector/Logging/Log.cs
	src/MySqlConnector/MySqlConnection.cs
	src/MySqlConnector/Protocol/Payloads/OkPayload.cs
	tests/IntegrationTests/RedirectionTests.cs
	tests/IntegrationTests/ServerFeatures.cs

Signed-off-by: Bradley Grainger <[email protected]>
This can be executed concurrently by multithreaded tests.

Signed-off-by: Bradley Grainger <[email protected]>
Signed-off-by: Bradley Grainger <[email protected]>
This was a result of a bad merge.

Signed-off-by: Bradley Grainger <[email protected]>
Signed-off-by: Bradley Grainger <[email protected]>
Refactor duplicated code in Ed25519AuthenticationPlugin.

Signed-off-by: Bradley Grainger <[email protected]>
@bgrainger bgrainger merged commit 1e009ea into mysql-net:master Jul 29, 2024
22 checks passed
@bgrainger
Copy link
Member

Fixed in 2.4.0; thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants