turcsanyip commented on code in PR #6846:
URL: https://github.com/apache/nifi/pull/6846#discussion_r1082928336
##########
nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-6-nar/src/main/resources/META-INF/NOTICE:
##########
@@ -81,3 +81,8 @@ The following binary components are provided under the Apache
Software License v
in some artifacts (usually source distributions); but is always available
from the source code management (SCM) system project uses.
+ (ASLv2) aws-msk-iam-auth
+ The following NOTICE information applies:
+ aws-msk-iam-auth
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Review Comment:
`aws-msk-iam-auth` pulls in a couple of other dependencies transitively
(e.g. further aws libraries, netty).
The `NOTICE` file needs to be updated with those as well.
##########
nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-shared/src/main/java/org/apache/nifi/kafka/shared/validation/KafkaClientCustomValidationFunction.java:
##########
@@ -233,6 +235,21 @@ private void validateUsernamePassword(final
ValidationContext validationContext,
}
}
+ private void validateAWSIAMMechanism(final ValidationContext
validationContext, final Collection<ValidationResult> results) {
Review Comment:
Minor:
```suggestion
private void validateAwsMskIamMechanism(final ValidationContext
validationContext, final Collection<ValidationResult> results) {
```
##########
nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-shared/src/main/java/org/apache/nifi/kafka/shared/validation/KafkaClientCustomValidationFunction.java:
##########
@@ -233,6 +235,21 @@ private void validateUsernamePassword(final
ValidationContext validationContext,
}
}
+ private void validateAWSIAMMechanism(final ValidationContext
validationContext, final Collection<ValidationResult> results) {
+ final String saslMechanism =
validationContext.getProperty(SASL_MECHANISM).getValue();
+
+ if (SaslMechanism.AWS_MSK_IAM.getValue().equals(saslMechanism) &&
!StandardKafkaPropertyProvider.isAwsMskIamCallbackHandlerFound()) {
Review Comment:
Minor: `SaslMechanism.getSaslMechanism()` could be used instead of the
String comparison.
```suggestion
final SaslMechanism saslMechanism =
SaslMechanism.getSaslMechanism(validationContext.getProperty(SASL_MECHANISM).getValue());
if (SaslMechanism.AWS_MSK_IAM == saslMechanism &&
!StandardKafkaPropertyProvider.isAwsMskIamCallbackHandlerFound()) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]