Andrew,

Yes, I was exploring to see if I can use variable registry values in the 
properties of the SSL Context Service. I wouldn’t need full expression language 
support.

To give an example of what I want to do:

My keystore is a .p12 file, call it store.p12. On my development box it resides 
in a different location than on my prod.

On dev: C:/Users/max/store.p12
On prod: /etc/store.p12

So my idea was to define the keystore path such as 
${nifi.system.properties.dir}/store.p12 in the CS and then I can easily 
override the directory based on which stage I am using the variable registry.

If you guys agree that this is a reasonable request, is it ok for me then to 
raise such a feature request in 
https://issues.apache.org/jira/projects/NIFI/issues/NIFI-4610?filter=allopenissues
 ?

In the meantime, is there another way to achieve what I’m after?

Thanks!

From: Andrew Grande [mailto:[email protected]]
Sent: Wednesday, February 20, 2019 1:53 AM
To: [email protected]
Subject: Re: Using variables in SSLContextService

Mike, I think the ask here is for this CS to support variable registry values. 
IIRC, there are other cases in NiFi where EL is not supported, but VR is. A 
fair request, IMO.

Supporting a full EL for the keystore/truststore path is a bad idea, no doubt.

Do you agree?

Andrew
On Tue, Feb 19, 2019, 3:33 AM Mike Thomsen 
<[email protected]<mailto:[email protected]>> wrote:
When expression language is not supported by a field, it won't accept any 
variables.

Mike

On Mon, Feb 18, 2019 at 10:34 PM Beutel, Maximilian 
<[email protected]<mailto:[email protected]>>
 wrote:
Hello!

Also asked the question on IRC, but figured the mailing list might be better 
for this longer question.

For an InvokeHTTP processor I defined a SSL Context Service. In the SSL Context 
Service, in Keystore Filename property, I’d like to use a variable which I 
defined in a nifi.registry file. So in my nifi.properties I have:

nifi.variable.registry.properties=./conf/custom.properties

And in the conf/custom.properties I have:

                nifi.system.properties.file=C:/Users/some.file

And in the field Keystore Filename in the SSL Context Service I input:

                ${nifi.system.properties.file}

But then saving the SSL Context Service doesn’t work anymore, the validation 
fails and says “${nifi.system.properties.file} does not exist”. The actual file 
does exist however, but I suspect that the variable doesn’t get interpolated.

According to 
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-ssl-context-service-nar/1.5.0/org.apache.nifi.ssl.StandardSSLContextService/index.html
 it seems like expression language is not supported for Keystore Filename 
property. Does this also imply that variables won’t work in that field?

Thanks for your help!

Max


==============================================================================
Please access the attached hyperlink for an important electronic communications 
disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================


=============================================================================== 
Please access the attached hyperlink for an important electronic communications 
disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=============================================================================== 

Reply via email to