fix(plugin-oracle): make native network encryption opt-in, default off (#1746)#1770
Merged
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
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.
Root cause (confirmed from a TablePro packet capture)
The #1746 reporter (Oracle 11.2.0.4, no
sqlnet.ora, so the server defaults toENCRYPTION_SERVER = ACCEPTED) couldn't connect: the login handshake stalled and the server closed the socket after its 60-secondINBOUND_CONNECT_TIMEOUT.Decoding the capture: TablePro and the server complete the SNS/ANO security negotiation, then every later TTC payload is encrypted (high-entropy, where SQLcl against the same server stays clear text). oracle-nio negotiates AES, activates the cipher, and the encrypted handshake never completes against this server, so the client hangs.
oracle-nio's ANO request always advertised the encryption and data-integrity services (
AdvancedNegotiation.encodeRequest), with no opt-out. Against a server that merely accepts encryption, that forces it on. Oracle's own clients (SQLcl, JDBC thin, python-oracledb) default toENCRYPTION_CLIENT = ACCEPTED, which means "encrypt only if the server requires it", so they stay in clear text here.Fix
oracle-nio fork (re-pinned to
1140759):Configuration.nativeNetworkEncryption(defaultfalse). When off, the ANO request advertises only the supervisor and authentication services, so a server that accepts but doesn't require encryption negotiates none and the session stays in clear text. When on, behavior is unchanged, for servers configuredENCRYPTION_SERVER = REQUIRED.Plugin: a "Native network encryption" toggle on the Oracle connection form (off by default), threaded into the driver configuration.
This matches Oracle's default client behavior and unblocks 11g (and any server that only accepts encryption) without betting on an untestable in-handshake crypto fix.
Testing
AdvancedNegotiationTests.omitsSecurityServicesWhenDisabled: with security services off the ANO advertises 2 services (supervisor + auth) and is smaller than the 4-service request. Existing ANO tests updated for the new signature. Fullswift test --filter AdvancedNegotiationTestspasses.swiftlint --strictclean on changed files.Notes
plugin-oracle-v*release.https://claude.ai/code/session_01NVomHPErfCr8FWRVywmyVP