Add some props to the log4j kafka appender to control security configs#6216
Add some props to the log4j kafka appender to control security configs#6216rodesai wants to merge 3 commits intoapache:trunkfrom
Conversation
This patch adds 2 props to the log4j kafka appender that get put directly
into the sasl properties passed to the broker:
- ClientJaasConf: This property sets sasl.jaas.config
- SaslMechanim: This property sets sasl.mechanism
|
Hi Rohan. To link your PR to the Jira issue, you should make the PR title to like: 'KAFKA-7896: Add some Log4J Kafka Properties for Producing to Secured Brokers' Please update the PR title. For this time, I linked the PR by manual. Also, I left a message on your discussion thread about how to open a KIP and make some discussions. Thanks again for your proposal! Let's continue on the discussion on mailing thread! 😃 |
| System.setProperty("java.security.krb5.conf", kerb5ConfPath); | ||
| } | ||
| } | ||
| if (saslMechanism != null) { |
There was a problem hiding this comment.
looks like we need to consolidate with existing above code. What if user wants to set kerb5ConfPath and clientJaasConf?
There was a problem hiding this comment.
Then the user could set both. The block above isn't touching the sasl.jaas.config property. It lets you configure kerberos through system properties. I'm not sure why its so defensive but that seems orthogonal to this change.
There was a problem hiding this comment.
clientJaasConf can be used to configure Kerberos. In that case, users may want to configure kerb5ConfPath. We may want to pull the below code to outside the if block..
if (kerb5ConfPath != null) {
System.setProperty("java.security.krb5.conf", kerb5ConfPath);
}
omkreddy
left a comment
There was a problem hiding this comment.
Thanks for the PR. LGTM.
|
Test failures are not related. merging to trunk. |
…fka appender
This patch adds 2 props to the log4j kafka appender that get put directly
into the sasl properties passed to the producer:
- ClientJaasConf: This property sets sasl.jaas.config
- SaslMechanim: This property sets sasl.mechanism
Author: Rohan Desai <desai.p.rohan@gmail.com>
Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
Closes apache#6216 from rodesai/add-kafka-appender-security-props
This patch adds 2 props to the log4j kafka appender that get put directly
into the sasl properties passed to the producer:
- ClientJaasConf: This property sets sasl.jaas.config
- SaslMechanim: This property sets sasl.mechanism
Committer Checklist (excluded from commit message)