Skip to content

fix: report TLS from active channel handlers - #1011

Open
dkropachev wants to merge 1 commit into
scylladb:scylla-4.xfrom
dkropachev:fix/report-tls-from-active-channel
Open

fix: report TLS from active channel handlers#1011
dkropachev wants to merge 1 commit into
scylladb:scylla-4.xfrom
dkropachev:fix/report-tls-from-active-channel

Conversation

@dkropachev

@dkropachev dkropachev commented Aug 19, 2026

Copy link
Copy Markdown

Moves active-channel TLS detection out of #999.

The configuration report now derives whether TLS is enabled from the control channel pipeline after NettyOptions.afterChannelInitialized, so custom hooks that add or remove an SslHandler are reflected accurately. Hostname-verification behavior is otherwise unchanged.

Compatibility note: this intentionally changes DriverConfigReporter, which belongs to the explicitly unstable internal API. Keeping the channel-less contract would preserve an entry point that cannot report effective per-connection TLS state; custom internal reporters must be recompiled.

Tests:

  • mvn -pl core -DskipITs -Dtest=DefaultDriverConfigReporterTest,ProtocolInitHandlerTest test

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: QUIET

Plan: Pro Plus

Run ID: 4a403a4a-a88e-4ec5-84ca-b4ecfa5888bc

📥 Commits

Reviewing files that changed from the base of the PR and between d8f6dd3 and 240148d.

📒 Files selected for processing (7)
  • core/src/main/java/com/datastax/oss/driver/internal/core/channel/ProtocolInitHandler.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/context/DefaultDriverConfigReporter.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/context/DriverConfigReporter.java
  • core/src/main/java/com/datastax/oss/driver/internal/core/context/NoopDriverConfigReporter.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/channel/ChannelFactoryTestBase.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/channel/ProtocolInitHandlerTest.java
  • core/src/test/java/com/datastax/oss/driver/internal/core/context/DefaultDriverConfigReporterTest.java
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • scylladb/scylladb (auto-detected)
  • scylladb/github-automation (auto-detected)

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The configuration reporter API now accepts the active control connection channel. ProtocolInitHandler passes the channel through report generation and startup-option population. TLS reporting checks the channel pipeline for SslHandler, while hostname validation remains limited to the JDK SSL handler factory. Tests use EmbeddedChannel fixtures and verify the updated TLS behavior.

Sequence Diagram(s)

sequenceDiagram
  participant ProtocolInitHandler
  participant DefaultDriverConfigReporter
  participant NettyChannel
  ProtocolInitHandler->>DefaultDriverConfigReporter: Pass startup options and control channel
  DefaultDriverConfigReporter->>NettyChannel: Inspect active pipeline
  NettyChannel-->>DefaultDriverConfigReporter: Return SslHandler state
  DefaultDriverConfigReporter-->>ProtocolInitHandler: Populate configuration report
Loading

Possibly related PRs

Suggested labels: area/Driver_-_java-driver-4.x, P3

Suggested reviewers: nikagra, sylwiaszunejko

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: reporting TLS from active channel handlers.
Description check ✅ Passed The description accurately explains active-channel TLS detection, compatibility impact, and tests.

Comment @coderabbitai help to get the list of available commands.

Derive TLS presence from the control channel pipeline after NettyOptions customization, so handlers added or removed by custom hooks are reported accurately.

Compatibility note: this intentionally changes DriverConfigReporter, which is part of the explicitly unstable internal API. Keeping the channel-less contract would preserve an entry point that cannot report effective per-connection TLS state; custom internal reporters must be recompiled.
@dkropachev
dkropachev force-pushed the fix/report-tls-from-active-channel branch from 4618c81 to 240148d Compare August 20, 2026 14:48
@dkropachev
dkropachev requested a review from nikagra August 20, 2026 16:21
@dkropachev dkropachev self-assigned this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant