Github user apsaltis commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1581#discussion_r159500278
--- Diff:
nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java
---
@@ -295,7 +320,11 @@ HdfsResources resetHDFSResources(String
configResources, ProcessContext context)
} else {
config.set("ipc.client.fallback-to-simple-auth-allowed",
"true");
config.set("hadoop.security.authentication", "simple");
- ugi = SecurityUtil.loginSimple(config);
+ if (context.getProperty(REMOTE_USER).isSet()) {
+ ugi =
UserGroupInformation.createRemoteUser(context.getProperty(REMOTE_USER).evaluateAttributeExpressions().getValue());
--- End diff --
I will move the code to the SecurityUtil class. Also, will fix the JIRA --
creating a remote user, not impersonating is the desired effect.
---