fix(plugins): honor SSL config in Oracle and Cassandra, real 2-pass prefer for MySQL/MariaDB#1310
Merged
Conversation
…refer for MySQL/MariaDB
…; centralize error formatting
…arrow Oracle classifier to true SSL errors
b755fac to
ed5c8a1
Compare
… SSLHandshakeError
…acle warning, throw on Cassandra cert load fail, tighten classifier patterns)
397e777 to
e593ed4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
3 driver fixes that close silent SSL gaps and finish the SSL story started in #1309:
OraclePluginDrivernever passedsslConfigintoOracleNIO.OracleConnection.Configuration, so every Oracle connection was plain TCP regardless of what the user picked. Wired through NIOSSL withTLSConfiguration.makeClientConfiguration(), mapping Required → no verify, Verify CA → CA only, Verify Identity → full verification.additionalFields["sslMode"], but that field was never declared inadditionalConnectionFieldsand never written by the form. Result: every Cassandra connection was plain TCP regardless of SSL pane. Switched to readingconfig.ssldirectly. Removed the orphansslCaCertPathcustom field (standard SSL pane now handles it). Migration: existingadditionalFields["sslCaCertPath"]is copied intosslConfig.caCertificatePathon load..preferredwas cosmetic in PR fix(connection-form): default SSL mode to preferred for libpq and FreeTDS engines (#1298) #1309 because bundled libmariadb has onlyMYSQL_OPT_SSL_ENFORCE(binary) —.disabledand.preferredmapped identically. Implemented 2-pass connect: tryENFORCE=1first, on SSL-only error codes{CR_SSL_CONNECTION_ERROR=2026, CR_SERVER_HANDSHAKE_ERR=2012, ER_HANDSHAKE_ERROR=1043}retry withENFORCE=0. Re-enabled MySQL/MariaDBdefaultSSLMode = .preferredin metadata so Cloud SQL / Azure MySQL works out of the box.Out of scope (separate follow-up)
SSLMappingProtocol,SSLHandshakeError, conform Mongo/Redis/ClickHouse to unified pattern) — architectural debt, separate PR with PluginKit ABI surface.verifyCarequires CA path, etc.) — UX polishClickHouse
.verifyIdentitywas investigated and confirmed NOT a bug: returns nil delegate intentionally, URLSession default HTTPS trust evaluation already validates cert chain + hostname.Architecture notes
buildTLS()helper inOracleConnectionWrapper. Logs warning for.preferredsince OracleNIO has no opportunistic TLS (only.disableor.require(NIOSSLContext)). Default stays.disabledfor Oracle.sslCaCertPathinConnectionStorage.toConnection()— copies tosslConfig.caCertificatePathif empty. Drops on next save (form no longer writes that key).attemptConnect(enforceSSL:)extracted fromconnect(). 2-pass only fires for.preferred;.required/.verifyCa/.verifyIdentitykeep single-pass with strict enforce. SSL-only retry codes are conservative (excludes timeouts, auth fails, network errors).Test plan
sslCaCertPathvia the custom field — CA path should appear in standard SSL pane after upgradexcodebuild test -only-testing:TableProTests/DatabaseTypeTests— MySQL/MariaDB tests now expect.preferred