Created 12-23-2020 05:30 AM
Hi,
I have sensitive parameter defined in process group's parameter context. The documentation says that this parameter can be assigned to a sensitive property only. So I want to know how to create custom sensitive property specific to my nifi processor.
I did see few posts where they are asking to use InvokeScriptedProcessor, but I did not find any example. Any suggestions here would be of great help.
Thanks,
Created 12-23-2020 07:46 AM
That is correct, dynamically added properties are all of type non-sensitive.
You would need to build a custom processor with static configurable properties that have a PropertyDescriptor with ".sensitive(true)".
I am not a developer myself, but you may find this resource useful:
https://itnext.io/deep-dive-into-a-custom-apache-nifi-processor-c2191e4f89a0
If you found my answer addresses your question, please click on "Accept as Solution" below the answer.
Hope this helps you,
Matt
Created 12-23-2020 06:34 AM
@Nyk
You'll need to provide more context around your use case to get a good answer. It is not clear what you are trying to accomplish here.
- Are you trying to build your own custom NiFi processor where you want to define some configurable properties as type sensitive?
- Are you trying to use the "+" icon to add a new dynamic property to an existing NiFi processor and hide/encrypt the value set in that property? In this case, that is not possible since all dynamic properties are nonsensitive.
The use of invokeScriptedProcessor you saw was a recommendation made to sue it rather than ExecuteScript processor. That is because you can define properties via the invokeScriptedProcessor custom script you write additional processor properties to be used within that processor only as sensitive.
But looks like there may be some issues around that ability outlined here:
https://issues.apache.org/jira/browse/NIFI-7012
Hope this helps,
Matt
Created 12-23-2020 06:43 AM
Thanks Matt for quick reply.
Yes, I am trying to use the "+" icon to add a new dynamic property to an existing NiFi processor and hide/encrypt the value set in that property.
There is no way that we can do this ?
Can I create a custom processor where I can define some configurable properties as type sensitive and create NAR out of it ?
Created 12-23-2020 07:46 AM
That is correct, dynamically added properties are all of type non-sensitive.
You would need to build a custom processor with static configurable properties that have a PropertyDescriptor with ".sensitive(true)".
I am not a developer myself, but you may find this resource useful:
https://itnext.io/deep-dive-into-a-custom-apache-nifi-processor-c2191e4f89a0
If you found my answer addresses your question, please click on "Accept as Solution" below the answer.
Hope this helps you,
Matt