You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/10/06 15:49:25 UTC

[GitHub] [nifi] thenatog commented on a diff in pull request #6479: NIFI-10586 Prioritize ssh-rsa algorithm in SFTP Processors

thenatog commented on code in PR #6479:
URL: https://github.com/apache/nifi/pull/6479#discussion_r989217723


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ssh/StandardSSHConfigProvider.java:
##########
@@ -67,6 +67,13 @@ public Config getConfig(final String identifier, final PropertyContext context)
         getOptionalProperty(context, KEY_EXCHANGE_ALGORITHMS_ALLOWED).ifPresent(property -> config.setKeyExchangeFactories(getFilteredValues(property, config.getKeyExchangeFactories())));
         getOptionalProperty(context, MESSAGE_AUTHENTICATION_CODES_ALLOWED).ifPresent(property -> config.setMACFactories(getFilteredValues(property, config.getMACFactories())));
 
+        final String keyAlgorithmsAllowed = context.getProperty(KEY_ALGORITHMS_ALLOWED).evaluateAttributeExpressions().getValue();
+        if (keyAlgorithmsAllowed == null) {
+            // Prioritize ssh-rsa when Key Algorithms Allowed is not specified
+            config.prioritizeSshRsaKeyAlgorithm();

Review Comment:
   Why does this need to happen when keyAlgorithmsAllowed == null and then again on line 76? Should it only be happening here and not below?



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org