-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIFI-10919 Correct SCRAM SASL Mechanism for Kafka Components #6743
Conversation
No need to check for Java 8 since it is deprecated for 1.19?
|
@Kagee NiFi version 1 releases continue to support Java 8, although support is deprecated in 1.19.0. NiFi 2.0 will remove support for Java 8, but it remains supported for now. |
final Class<?> propertyClass = propertyClassFound.get(); | ||
final Set<String> classPropertyNames = getStaticStringPropertyNames(propertyClass); | ||
propertyNames.addAll(classPropertyNames); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should there be an else clause here to flag the bad value (logger::warn)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a best effort approach, based on Kafka classes available at runtime. This influences the custom property validation, so any issues would be flagged as validation problems. For that reason, adding logging here seems unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Did some testing against a vanilla Kafka docker image. I can see the updated NiFi configuration settings being passed through to Kafka via the NiFi app log. As this was an enum constant issue, this seems sufficient to verify.
|
This closes #6743 Signed-off-by: Paul Grey <greyp@apache.org>
This closes apache#6743 Signed-off-by: Paul Grey <greyp@apache.org>
Summary
NIFI-10919 Corrects Kafka component handling of
SCRAM-SHA-256
andSCRAM-SHA-512
SASL Mechanism property handling as a result of changes introduced in NIFI-10819.The changes replace the use of
SaslMechanism.valueOf()
withSaslMechanism.getSaslMechanism()
to find the matching property value instead of the enumeration name, which does not match property values. Additional changes include new unit tests to validate property handling in referencing classes.Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation