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 2021/06/18 21:01:46 UTC

[GitHub] [nifi] ChrisSamo632 commented on a change in pull request #5147: NIFI-8683 support Expression Language for the Truststore/Keystore pro…

ChrisSamo632 commented on a change in pull request #5147:
URL: https://github.com/apache/nifi/pull/5147#discussion_r654612219



##########
File path: nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java
##########
@@ -185,14 +191,24 @@ public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, S
             }
         }
 
-        results.addAll(validateStore(validationContext.getProperties(), KeystoreValidationGroup.KEYSTORE));
-        results.addAll(validateStore(validationContext.getProperties(), KeystoreValidationGroup.TRUSTSTORE));
+        final Map<PropertyDescriptor, String> properties = evaluateProperties(validationContext.getProperties(), validationContext);
+        results.addAll(validateStore(properties, KeystoreValidationGroup.KEYSTORE));
+        results.addAll(validateStore(properties, KeystoreValidationGroup.TRUSTSTORE));
 
         isValidated = results.isEmpty();
 
         return results;
     }
 
+    private Map<PropertyDescriptor, String> evaluateProperties(final Map<PropertyDescriptor, String> properties, final PropertyContext context) {
+        for (final PropertyDescriptor pd : properties.keySet()) {
+            if (pd.isExpressionLanguageSupported() && context.getProperty(pd).isSet()) {
+                properties.put(pd, context.getProperty(pd).evaluateAttributeExpressions().getValue());

Review comment:
       @markobean I figured it would be something like that. Have been on holiday this past week, will hopefully get to look at this sometime soon once back




-- 
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:
users@infra.apache.org