alopresto commented on a change in pull request #4427:
URL: https://github.com/apache/nifi/pull/4427#discussion_r460294858
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/encrypt/StringEncryptor.java
##########
@@ -267,6 +296,16 @@ private boolean paramsAreValid() {
return algorithmAndProviderValid && secretIsValid;
}
+ private boolean customSecretIsValid(PBEKeySpec password, SecretKeySpec
key, String algorithm) {
+ // Currently, the only custom algorithms use AES-G/CM with a password
via Argon2
+ String rawPassword = new String(password.getPassword());
+ final boolean secretIsValid = StringUtils.isNotBlank(rawPassword) &&
rawPassword.trim().length() >= 12;
+ if (!secretIsValid) {
+ logger.error("The nifi.sensitive.props.key password provided is
invalid for algorithm {}; must be >= 12 characters", algorithm);
Review comment:
Great point Bryan. Fixed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]