[
https://issues.apache.org/jira/browse/NIFI-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16801007#comment-16801007
]
Ryan Withers commented on NIFI-1693:
------------------------------------
Today I put up a draft PR that can be reviewed here:
https://github.com/apache/nifi/pull/3388
I still have some work that will be required to call this done. I think the
scope of the work remaining includes changes required to the modules and
associated unit tests shown below. Some of these will or will not require
changes based on review. They are in the list to be reviewed based on the
presence of "FILE" in the name of the property descriptor. As specified in the
find command in the comment above.
SFTPUtils.java:83: public static final PropertyDescriptor
SFTP_HOSTKEY_FILENAME = new PropertyDescriptor.Builder()
SFTPTransfer.java:79: public static final PropertyDescriptor HOST_KEY_FILE =
new PropertyDescriptor.Builder()
FileTransfer.java:240: public static final PropertyDescriptor TEMP_FILENAME
= new PropertyDescriptor.Builder()
ValidateXml.java:73: public static final PropertyDescriptor SCHEMA_FILE =
new PropertyDescriptor.Builder()
ReplaceTextWithMapping.java:94: public static final PropertyDescriptor
MAPPING_FILE = new PropertyDescriptor.Builder()
TransformXml.java:96: public static final PropertyDescriptor XSLT_FILE_NAME
= new PropertyDescriptor.Builder()
CompressContent.java:120: public static final PropertyDescriptor
UPDATE_FILENAME = new PropertyDescriptor.Builder()
FetchFile.java:86: static final PropertyDescriptor FILENAME = new
PropertyDescriptor.Builder()
ScanAttribute.java:84: public static final PropertyDescriptor
DICTIONARY_FILE = new PropertyDescriptor.Builder()
GetHTTP.java:173: public static final PropertyDescriptor FILENAME = new
PropertyDescriptor.Builder()
AbstractKiteProcessor.java:53: protected static final PropertyDescriptor
CONF_XML_FILES
GrokReader.java:89: static final PropertyDescriptor PATTERN_FILE = new
PropertyDescriptor.Builder()
HBase_1_1_2_ClientService.java:105: static final PropertyDescriptor
HADOOP_CONF_FILES = new PropertyDescriptor.Builder()
HBase_2_ClientService.java:105: static final PropertyDescriptor
HADOOP_CONF_FILES = new PropertyDescriptor.Builder()
SimpleCsvFileLookupService.java:65: public static final PropertyDescriptor
CSV_FILE =
IPLookupService.java:85: static final PropertyDescriptor GEO_DATABASE_FILE =
new PropertyDescriptor.Builder()
CommonsConfigurationLookupService.java:62: public static final
PropertyDescriptor CONFIGURATION_FILE =
CSVRecordLookupService.java:73: public static final PropertyDescriptor
CSV_FILE =
ScriptingComponentUtils.java:42: public static final PropertyDescriptor
SCRIPT_FILE = new PropertyDescriptor.Builder()
JettyWebSocketServer.java:154: public static final PropertyDescriptor
USERS_PROPERTIES_FILE = new PropertyDescriptor.Builder()
ExecuteGroovyScript.java:92: public static final PropertyDescriptor
SCRIPT_FILE = new PropertyDescriptor.Builder()
AWSCredentialsProviderControllerServiceTest.java:223:
runner.setProperty(serviceImpl, CredentialPropertyDescriptors.CREDENTIALS_FILE,
AWSCredentialsProviderControllerServiceTest.java:242:
runner.setProperty(serviceImpl, CredentialPropertyDescriptors.CREDENTIALS_FILE,
./nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/credentials/provider/service/AWSCredentialsProviderControllerServiceTest.java:253:
runner.setProperty(serviceImpl,
CredentialPropertyDescriptors.CREDENTIALS_FILE,
AWSCredentialsProviderControllerServiceTest.java:266:
runner.setProperty(serviceImpl, CredentialPropertyDescriptors.CREDENTIALS_FILE,
AWSCredentialsProviderControllerServiceTest.java:278:
runner.setProperty(serviceImpl, CredentialPropertyDescriptors.CREDENTIALS_FILE,
MockAWSProcessor.java:34:import static
org.apache.nifi.processors.aws.credentials.provider.factory.CredentialPropertyDescriptors.PROFILE_NAME;
./nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/credentials/provider/factory/TestCredentialsProviderFactory.java:112:
runner.setProperty(CredentialPropertyDescriptors.CREDENTIALS_FILE,
"src/test/resources/mock-aws-credentials.properties");
TestCredentialsProviderFactory.java:126:
runner.setProperty(CredentialPropertyDescriptors.CREDENTIALS_FILE,
"src/test/resources/mock-aws-credentials.properties");
TestCredentialsProviderFactory.java:142:
runner.setProperty(CredentialPropertyDescriptors.CREDENTIALS_FILE,
"src/test/resources/mock-aws-credentials.properties");
TestCredentialsProviderFactory.java:150:
runner.setProperty(CredentialPropertyDescriptors.CREDENTIALS_FILE,
"src/test/resources/mock-aws-credentials.properties");
TestCredentialsProviderFactory.java:160:
runner.setProperty(CredentialPropertyDescriptors.CREDENTIALS_FILE,
"src/test/resources/mock-aws-credentials.properties");
TestCredentialsProviderFactory.java:191:
runner.setProperty(CredentialPropertyDescriptors.PROFILE_NAME, "BogusProfile");
TestCredentialsProviderFactory.java:205:
runner.setProperty(CredentialPropertyDescriptors.CREDENTIALS_FILE,
"src/test/resources/mock-aws-credentials.properties");
TestCredentialsProviderFactory.java:223:
runner.setProperty(CredentialPropertyDescriptors.CREDENTIALS_FILE,
"src/test/resources/mock-aws-credentials.properties");
TestCredentialsProviderFactory.java:231:
runner.setProperty(CredentialPropertyDescriptors.CREDENTIALS_FILE,
"src/test/resources/mock-aws-credentials.properties");
TestCredentialsProviderFactory.java:239:
runner.setProperty(CredentialPropertyDescriptors.CREDENTIALS_FILE,
"src/test/resources/mock-aws-credentials.properties");
AWSCredentialsProviderControllerService.java:44:import static
org.apache.nifi.processors.aws.credentials.provider.factory.CredentialPropertyDescriptors.CREDENTIALS_FILE;
FileCredentialsStrategy.java:43:
CredentialPropertyDescriptors.CREDENTIALS_FILE
FileCredentialsStrategy.java:49: String credsFile =
properties.get(CredentialPropertyDescriptors.CREDENTIALS_FILE);
AbstractAWSProcessor.java:80: public static final PropertyDescriptor
CREDENTIALS_FILE = CredentialPropertyDescriptors.CREDENTIALS_FILE;
CredentialPropertyDescriptors.java:51: public static final
PropertyDescriptor CREDENTIALS_FILE = new PropertyDescriptor.Builder()
AbstractEnrichIP.java:45: public static final PropertyDescriptor
GEO_DATABASE_FILE = new PropertyDescriptor.Builder()
> Paths do not support user home directory shortcut expansion
> -----------------------------------------------------------
>
> Key: NIFI-1693
> URL: https://issues.apache.org/jira/browse/NIFI-1693
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 0.6.0
> Reporter: Andy LoPresto
> Assignee: Ryan Withers
> Priority: Minor
> Attachments: file_ref.txt
>
> Original Estimate: 24h
> Time Spent: 10m
> Remaining Estimate: 23h 50m
>
> Java file path handling does not support user home directory shortcut
> expansion ("~" -> "/Users/alopresto" for example). This is well-documented
> and there are simple fixes [1] for this issue.
> Recently this was discovered in the {{EncryptContent}} processors when
> attempting to use a path to the public or secret keyring files that started
> with the "~" character: i.e. {{~/.gnupg/pubring.gpg}}.
> This should ideally be offered as a utility method (effectively a "filter"
> that can be applied to all user-provided paths throughout the application for
> consistent handling).
> [1] http://stackoverflow.com/a/7163455/70465
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)