Skip to content

docs(security): Document Kafka topic access control and stalled-partition recovery - #1157

Merged
jkowall merged 6 commits into
jaegertracing:mainfrom
jkowall:docs/kafka-topic-security
Nov 7, 2026
Merged

jkowall merged 6 commits into
jaegertracing:mainfrom
jkowall:docs/kafka-topic-security

Conversation

@jkowall

@jkowall jkowall commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Which problem is this PR solving?

The Kafka storage page explains how to wire collectors and ingesters through a topic, but not that the topic is a trust boundary. The ingester writes whatever it reads into storage, so a client that can produce to the topic can write arbitrary spans into trace storage. Operators need to know to lock the topic down.

The page also does not say what happens when one partition stops advancing. With message_marking.after: true (the at-least-once configuration this page recommends), a record that fails permanently is never committed, so the partition stays at it across restarts.

Description of the changes

Applied to _dev and 2.23.

  • Securing Jaeger page: the Kafka row of "Collector/Ingester/Query to Storage" gains a note that access to the topic is access to trace storage, with the Jaeger-specific ACL shape: a broker authorizer, a produce-only principal for the collector, a consume-only principal for the ingester on the topic and its consumer group (otel-collector unless group_id is set), and no other producers on the topic. Broker configuration and ACL commands are left to Kafka's own documentation, which is linked.
  • Kafka storage page: a one-sentence pointer to that Security section under "Topic & partitions", and a paragraph at the end of "At-least-once delivery" on the stalled partition: the cause, why restarting does not help, that the receiver stops reporting otelcol_kafka_receiver_offset_lag for a paused partition, and that recovery is a consumer-group offset reset with Kafka's kafka-consumer-groups.sh tool, linked.

How was this change tested?

npm run build, check:spelling, check:links:internal, check:format and check:dev-links pass. The option names, the receiver's default group otel-collector, its fetch-error handling and the metric's reporting behavior were checked against opentelemetry-collector-contrib main.

🤖 Generated with Claude Code

…ecovery

The Kafka storage page does not say that the span topic is a trust
boundary: whoever can produce to it can write spans into storage and send
batches that decompress far beyond the receiver's fetch limits. Add a
section on authentication, TLS and least-privilege ACLs for the collector
and ingester principals.

In _dev, also add a runbook for a partition that stops advancing, either at
a record that fails permanently under message_marking.after or at a batch
the Kafka client refuses to decompress, including how to find it and how to
move the consumer group's offset past it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonah Kowall <jkowall@kowall.net>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The security guidance omits broker authorization, and recovery documents behavior unavailable in Jaeger’s current Kafka client.

Review effort: Balanced
Findings: 2 High severity · 1 Medium severity

Open (3)
What changed in this PR

Adds Kafka security guidance and stalled-partition recovery procedures.

Changes:

  • Documents topic authentication, TLS, and ACLs.
  • Adds partition diagnosis and offset-reset instructions.
File Description
content/​docs/​v2/​2.21/​storage/​kafka.md Adds topic security guidance.
content/​docs/​v2/​_dev/​storage/​kafka.md Adds security and partition-recovery guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread content/docs/v2/2.21/storage/kafka.md Resolved
Comment thread content/docs/v2/_dev/storage/kafka.md Resolved
Comment thread content/docs/v2/_dev/storage/kafka.md Resolved
… stall cause

ACLs are only enforced when the brokers run an authorizer, so the topic
security section now says to enable one (StandardAuthorizer on KRaft,
AclAuthorizer on ZooKeeper), keep allow.everyone.if.no.acl.found at false,
and list the broker principals in super.users.

The stalled-partition section no longer lists a batch that exceeds the Kafka
client's decompression limit, since the client version Jaeger ships today
does not enforce that limit. The permanent-error cause and the skip commands
stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonah Kowall <jkowall@kowall.net>
Copilot AI balanced review requested due to automatic review settings October 8, 2026 19:05
@jkowall
jkowall enabled auto-merge (squash) October 8, 2026 19:08
@jkowall
jkowall requested a review from yurishkuro October 8, 2026 19:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The Kafka administration commands lack the client security configuration required for the secured clusters they target.

0 open findings

3 resolved since last review
Previously missed (4)

In code that hasn't changed since last review

Medium severity Add AdminClient SASL/TLS configuration to commands

content/​docs/​v2/​2.21/​storage/​kafka.md:73

These commands omit AdminClient security settings, so after enabling authenticated TLS as instructed above they default to an unauthenticated client and fail against a secured-only listener. Pass --command-config with the ACL administrator's SASL/TLS properties.

Medium severity Add AdminClient SASL/TLS configuration to commands

content/​docs/​v2/​_dev/​storage/​kafka.md:73

These commands omit AdminClient security settings, so after enabling authenticated TLS as instructed above they default to an unauthenticated client and fail against a secured-only listener. Pass --command-config with the ACL administrator's SASL/TLS properties.

Medium severity Add authenticated client configuration to diagnostic command

content/​docs/​v2/​_dev/​storage/​kafka.md:129

This diagnostic command also defaults to an unauthenticated AdminClient, so it cannot describe the group on the secured-only cluster recommended above. Include --command-config for an authorized operator's SASL/TLS client properties.

Medium severity Add SASL/TLS configuration to offset-reset commands

content/​docs/​v2/​_dev/​storage/​kafka.md:141

The offset-reset examples likewise omit the authentication and TLS properties needed to reach the secured cluster. Add the same --command-config option here; otherwise the documented recovery procedure fails before changing the offset.

🧠 Review effort: Balanced

yurishkuro and others added 4 commits November 7, 2026 10:35
Signed-off-by: Yuri Shkuro <github@ysh.us>
…nd fold stall recovery into at-least-once delivery

The Security page already lists the Kafka connection, so the topic ACL
guidance belongs there, reduced to the Jaeger-specific part: separate
produce-only and consume-only principals and the receiver's default
consumer group. Generic broker administration is left to Kafka's own
documentation. The stalled-partition note becomes a short paragraph under
the at-least-once section whose configuration causes it. The 2.21 copy is
dropped and the change is applied to 2.23 instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Copilot AI balanced review requested due to automatic review settings November 7, 2026 15:43
@yurishkuro yurishkuro changed the title docs(storage): Add Kafka topic access control and stalled-partition recovery docs(security): Document Kafka topic access control and stalled-partition recovery Nov 7, 2026
@yurishkuro

Copy link
Copy Markdown
Member

@jkowall I pushed two commits on top of yours (plus a merge of main) that rework the change rather than iterate on it in review, and updated the PR description to match:

  • The access-control guidance moved to the Securing Jaeger page, which already lists the Kafka connection, and is reduced to the Jaeger-specific part (produce-only and consume-only principals, the default consumer group). Authorizer classes, allow.everyone.if.no.acl.found, and kafka-acls.sh invocations are Kafka administration and are now a link to Kafka's docs.
  • The stalled-partition section became one paragraph under "At-least-once delivery", since that configuration is what causes the stall and the preceding paragraph already says how to avoid it. The offset-reset commands are likewise a link to Kafka's tooling.
  • The decompression rationale is gone, following your franz-go finding.
  • The 2.21 copy is reverted; the change is applied to _dev and 2.23, the current release.

Please take a look.

@jkowall
jkowall merged commit 3c5f712 into jaegertracing:main Nov 7, 2026
9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Kafka guidance does not distinguish exporter-held retries from errors returned to the receiver, leaving misleading monitoring and recovery advice when retries can stall shared partitions without the expected pause log.

1 open issue

Review effort: Balanced

The storage must return an error when a write fails. Cassandra and ClickHouse always do; Elasticsearch and OpenSearch need [`write_mode: sync`](../elasticsearch/#write-modes), and should run with `poison_pill_handling: drop` or the [dead-letter pipeline](../../deployment/delivery-guarantees/#dead-letter-pipeline-for-rejected-spans) so that a document the backend rejects on every attempt cannot hold the offset forever.
The storage must return an error when a write fails. Cassandra and ClickHouse always do; Elasticsearch and OpenSearch need [`write_mode: sync`](../elasticsearch/#write-modes), and should run with `poison_pill_handling: drop` or the [dead-letter pipeline](../../deployment/delivery-guarantees/#dead-letter-pipeline-for-rejected-spans) so that a document the backend rejects on every attempt cannot block the offset forever.

When a record does block the offset, its partition stops advancing while the others keep draining, and restarting the ingester does not help, because it resumes from the committed offset. The receiver stops reporting `otelcol_kafka_receiver_offset_lag` for a paused partition, so watch consumer-group lag on the broker side. The ingester's error log names the topic, partition and offset; to skip the record, stop every ingester in the group and move the group's offset for that partition with Kafka's [`kafka-consumer-groups.sh --reset-offsets`](https://kafka.apache.org/documentation/#basic_ops_consumer_group) tool. The skipped spans are not written to storage.
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.

3 participants