Skip to content

MDEV-22991 Support SSL over named pipes - #5589

Open
vaintroub wants to merge 1 commit into
main-MDEV-22992from
main-MDEV-22991
Open

MDEV-22991 Support SSL over named pipes#5589
vaintroub wants to merge 1 commit into
main-MDEV-22992from
main-MDEV-22991

Conversation

@vaintroub

Copy link
Copy Markdown
Member

Update libmariadb, to remove named pipe SSL check. Update client.c to remove that check as well.

Add MTR test for named pipe + SSL:

  • for Connector/C client, new test named_pipe_ssl
  • for in-server clent, run mariabackup with user created as "IDENTIFIED WITH named_pipe REQUIRE SSL"

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements support for using SSL/TLS over Windows named-pipe connections by relaxing the historical “no SSL over named pipes” behavior and adding regression tests to validate both encrypted and unencrypted named-pipe connections.

Changes:

  • Gate disabling of CLIENT_SSL on named-pipe connections based on server capability/version rather than unconditionally disabling it.
  • Update the Windows mariabackup named-pipe auth-plugin test to require SSL and to run mariabackup with --ssl.
  • Add a new MTR test (named_pipe_ssl) covering named-pipe connections with and without SSL, including an account with REQUIRE SUBJECT.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sql-common/client.c Allows SSL over named pipes when connecting to servers that support it; otherwise disables SSL for named-pipe transport.
mysql-test/suite/mariabackup/auth_plugin_win.test Adjusts the named-pipe auth plugin test to require SSL and run mariabackup using SSL.
mysql-test/suite/mariabackup/auth_plugin_win.result Updates expected output for the changed user creation/grant statements.
mysql-test/suite/mariabackup/auth_plugin_win.opt Adds server startup option(s) for the test run.
mysql-test/main/named_pipe_ssl.test Adds a new Windows-only regression test for SSL over named pipes.
mysql-test/main/named_pipe_ssl.result Adds expected output for the new named-pipe SSL test.
mysql-test/main/named_pipe_ssl.opt Enables named-pipe transport for the new test.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread sql-common/client.c
Comment on lines +2040 to +2043
return mysql->server_version &&
(strstr(mysql->server_version, "MariaDB") ||
strstr(mysql->server_version, "-maria-")) &&
mysql_get_server_version(mysql) >= 130100;
CREATE USER pipe_ssl_user@localhost REQUIRE SUBJECT '/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client';

--echo # Client connection without SSL over a named pipe
--exec $MYSQL --protocol=pipe --user=root --skip-ssl -e "SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'" 2>&1
Update libmariadb, to remove named pipe SSL check.
Update client.c to remove that check as well.

Add MTR test for named pipe + SSL:
- for Connector/C client, new test named_pipe_ssl
- for in-server clent, run mariabackup with user created as
  "IDENTIFIED WITH named_pipe REQUIRE SSL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants