Skip to content

fix: add SSL mode support to MySQL/MariaDB connections (#36505) - #1534

Open
hidekoji wants to merge 3 commits into
masterfrom
fix/issue-36505
Open

fix: add SSL mode support to MySQL/MariaDB connections (#36505)#1534
hidekoji wants to merge 3 commits into
masterfrom
fix/issue-36505

Conversation

@hidekoji

@hidekoji hidekoji commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds MySQL/MariaDB SSL mode handling for Exploratory issue #36505.

Changes

  • Threads sslMode through queryMySQL, executeGenericQuery, getDBConnection, clearDBConnection, and the column-listing error path.
  • Uses RMariaDB-supported client.flag values instead of the unsupported ssl.mode argument:
    • disable: no SSL client flag and no CA argument
    • allow / prefer: default client behavior with the configured CA
    • require / verify-ca: CLIENT_SSL with the configured CA
    • verify-full: CLIENT_SSL + CLIENT_SSL_VERIFY_SERVER_CERT with the configured CA
  • Centralizes Linux RDS CA-path normalization and MySQL/MariaDB pool-key creation so connection creation and eviction address the same connection.
  • Keeps SSL mode and CA path in the pool key to prevent security-mode collisions.

RMariaDB does not expose a separate CA-only client flag, so verify-ca uses the supported CLIENT_SSL + ssl.ca combination.

Tests

  • Added unit coverage for all SSL modes, RMariaDB argument construction, Linux CA normalization, pool-key consistency, and mode separation.
  • Verified R parsing, package installation, targeted testthat cases, and git diff --check.

@hidekoji hidekoji self-assigned this Jul 2, 2026
Comment thread DESCRIPTION Outdated
@hidekoji
hidekoji requested a review from kei51e July 2, 2026 06:36
@hidekoji
hidekoji marked this pull request as ready for review July 2, 2026 06:42
- Add sslMode param to queryMySQL (default "")
- Wire sslMode through executeGenericQuery → queryMySQL
- Add sslMode to getDBConnection/clearDBConnection cache key for mysql/aurora
- Map PostgreSQL-style SSL mode strings to RMariaDB constants (SSL_MODE_*)
- Refactor mysql/aurora connection creation to do.call for clean conditional args
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants