Skip to content

KAFKA-20419 : docker - Adding sasl_plain docker compose examples#22023

Open
muralibasani wants to merge 1 commit intoapache:trunkfrom
muralibasani:KAFKA-20419
Open

KAFKA-20419 : docker - Adding sasl_plain docker compose examples#22023
muralibasani wants to merge 1 commit intoapache:trunkfrom
muralibasani:KAFKA-20419

Conversation

@muralibasani
Copy link
Copy Markdown
Contributor

Ref : https://issues.apache.org/jira/browse/KAFKA-20419

Note : these examples work only with jvm image and not with native image. (Open issue https://issues.apache.org/jira/browse/KAFKA-19584)

Changes :

  • Adding sasl_plain docker compose examples
  • Updated readme
  • Added sasl_flow tests (only combined and isolated modes)

@github-actions github-actions bot added the triage PRs from the community label Apr 10, 2026
@muralibasani muralibasani changed the title Adding sasl_plain docker compose examples KAFKA-20419 : Adding sasl_plain docker compose examples Apr 10, 2026
@github-actions github-actions bot added the docker Official Docker image label Apr 10, 2026
@muralibasani muralibasani changed the title KAFKA-20419 : Adding sasl_plain docker compose examples KAFKA-20419 : docker - Adding sasl_plain docker compose examples Apr 10, 2026
@muralibasani
Copy link
Copy Markdown
Contributor Author

@FrankYang0529 may I request your review pls ?

- `KAFKA_OPTS` is set to point to the JAAS config file.
- Similar to the plaintext example, two listeners are configured: one for inter-broker communication and one for client-to-broker communication. Both use the `SASL_PLAINTEXT` security protocol.
- Two users are configured in the JAAS file: `admin` (for inter-broker) and `alice` (for clients).
- Note: SASL is currently not supported with the GraalVM based native image (`apache/kafka-native`) due to missing reflection configuration for `java.security.AccessController`. See [KAFKA-19584](https://issues.apache.org/jira/browse/KAFKA-19584) for details.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is an open issue.

print(constants.FILE_INPUT_ERROR_PREFIX, str(e))
total_errors.append(str(e))
# SASL is not supported on native image due to missing reflection config (KAFKA-19584)
if self.MODE == "jvm":
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

since this sasl config doesn't work on native image, adding this condition to run only on jvm based image

@github-actions github-actions bot removed the triage PRs from the community label Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Official Docker image

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant