Github user skrewz commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1302#discussion_r97520897
--- Diff:
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java ---
@@ -1027,19 +1028,24 @@ public boolean accept(final File dir, final String
filename) {
cmd.add("-Dorg.apache.nifi.bootstrap.config.log.dir=" +
nifiLogDir);
cmd.add("org.apache.nifi.NiFi");
if (props.containsKey(NIFI_BOOTSTRAP_SENSITIVE_KEY) &&
!StringUtils.isBlank(props.get(NIFI_BOOTSTRAP_SENSITIVE_KEY))) {
- cmd.add("-k " + props.get(NIFI_BOOTSTRAP_SENSITIVE_KEY));
+ File password_file = new File(confDir, "sensitive.key");
+
+ // Restrict permissions:
+ password_file.setReadable(false,false);
--- End diff --
Both of `RunNifi` and `Nifi` are run as the `run.as` user, referring to
`nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/bin/nifi.sh`.
`setOwner` is therefore implicitly already the `run.as` user---we can make it
explicit, no trouble, but what do we gain from it?
---
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.
---