Skip to content

CASSSIDECAR-496: Disable Netty wire logging on the HTTP server - #381

Open
rustyrazorblade wants to merge 1 commit into
apache:trunkfrom
rustyrazorblade:fix-http-log-activity-hex-dumps
Open

CASSSIDECAR-496: Disable Netty wire logging on the HTTP server#381
rustyrazorblade wants to merge 1 commit into
apache:trunkfrom
rustyrazorblade:fix-http-log-activity-hex-dumps

Conversation

@rustyrazorblade

@rustyrazorblade rustyrazorblade commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

CASSSIDECAR-496

HttpServerOptionsProvider hardcoded setLogActivity(true), installing Netty's LoggingHandler on every HTTP connection. It was the only hardcoded option in a method where every other value is read from SidecarConfiguration.

On a 3-node cluster running the ghcr.io/apache/cassandra-sidecar image this produced 8.6 million log lines in one hour, roughly 96% of all log volume, because ByteBufUtil.appendPrettyHexDump turns a single 95,504-byte response into about 6,000 lines. The dumps contain request and response bodies in cleartext; since schema endpoints return DDL, CQL statements are written to the logs as well:

|00016260| 66 61 63 74 6f 72 27 3a 20 27 31 27 20 7d 20 41 |factor': '1' } A|
|00016270| 4e 44 20 44 55 52 41 42 4c 45 5f 57 52 49 54 45 |ND DURABLE_WRITE|
|00016280| 53 20 3d 20 74 72 75 65 3b 5c 6e 5c 6e 43 52 45 |S = true;\n\nCRE|

It only fires when the process starts without logback.configurationFile, which is supplied solely by the Gradle-generated start scripts. A directly launched jar gets no logback configuration and falls back to logback's default of root DEBUG to ConsoleAppender — the common container path. The test suite could not catch it either: server/src/test/resources/logback-test.xml pins LoggingHandler to info.

@rustyrazorblade
rustyrazorblade force-pushed the fix-http-log-activity-hex-dumps branch from 59a0582 to 1cb54db Compare August 29, 2026 00:49
@rustyrazorblade rustyrazorblade changed the title CASSSIDECAR-496: Make Netty wire logging configurable and disabled by default CASSSIDECAR-496: Disable Netty wire logging on the HTTP server Aug 29, 2026
HttpServerOptionsProvider hardcoded setLogActivity(true), installing Netty's
LoggingHandler on every HTTP connection. It was the only hardcoded option in a
method where every other value is read from SidecarConfiguration.

On a 3-node cluster running the published sidecar image this produced 8.6
million log lines in one hour, roughly 96% of all log volume, because
ByteBufUtil.appendPrettyHexDump turns a single 95,504-byte response into about
6,000 lines. The dumps contain request and response bodies in cleartext; since
schema endpoints return DDL, CQL statements are written to the logs as well.

It only fires when the process starts without logback.configurationFile, which
is supplied solely by the Gradle-generated start scripts. A directly launched
jar gets no logback configuration and falls back to logback's default of root
DEBUG to ConsoleAppender, which is the common container path. The test suite
could not catch it either: logback-test.xml pins LoggingHandler to info.
@rustyrazorblade
rustyrazorblade force-pushed the fix-http-log-activity-hex-dumps branch from 1cb54db to 199e421 Compare August 29, 2026 00:51
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