sv2000 commented on a change in pull request #2571: [GOBBLIN-701] Added the 
concept of secure job templates and job resolution callbacks.
URL: https://github.com/apache/incubator-gobblin/pull/2571#discussion_r322449668
 
 

 ##########
 File path: 
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/template/StaticJobTemplate.java
 ##########
 @@ -105,6 +114,17 @@ protected Config getLocalRawTemplate() {
 
   @Override
   protected Config getLocallyResolvedConfig(Config userConfig) {
-    return userConfig.withFallback(this.rawConfig);
+    Config filteredUserConfig = SecureJobTemplate.filterUserConfig(this, 
userConfig, log);
+    return filteredUserConfig.withFallback(this.rawConfig);
+  }
+
+  @Override
+  public boolean isSecure() {
+    return this.rawConfig.hasPath(IS_SECURE_KEY) && 
this.rawConfig.getBoolean(IS_SECURE_KEY);
+  }
+
+  @Override
+  public Collection<String> overridableProperties() {
+    return isSecure() ? 
SPLITTER.splitToList(this.rawConfig.getString(SECURE_OVERRIDABLE_PROPERTIES_KEYS))
 : Collections.emptyList();
 
 Review comment:
   ConfigUtils.splitToList()?

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


With regards,
Apache Git Services

Reply via email to