Github user bbende commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1581#discussion_r105669563
--- Diff:
nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java
---
@@ -292,7 +304,11 @@ HdfsResources resetHDFSResources(String
configResources, ProcessContext context)
ugi = SecurityUtil.loginKerberos(config, principal,
keyTab);
fs = getFileSystemAsUser(config, ugi);
lastKerberosReloginTime = System.currentTimeMillis() /
1000;
- } else {
+ } else if (context.getProperty(REMOTE_USER).isSet()){
--- End diff --
This might be more of a stylistic thing, but we could probably fold these
together....
```
else {
config.set("ipc.client.fallback-to-simple-auth-allowed", "true");
config.set("hadoop.security.authentication", "simple");
if (context.getProperty(REMOTE_USER).isSet()) {
ugi =
UserGroupInformation.createRemoteUser(context.getProperty(REMOTE_USER).evaluateAttributeExpressions().getValue());
} else {
ugi = SecurityUtil.loginSimple(config);
}
fs = getFileSystemAsUser(config, ugi);
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---