Search code examples
apache-nifi

How do I pass environment variables into sensitive parameters in Parameter Context


I'm aware that I can reference an environment variable using the expression language, e.g. ${MY_ENV}. However sensitive fields don't support expression language. Is there another/better approach?

enter image description here


Solution

  • You can add an EnvironmentVariableParameterProvider under ControllerSettings. Then you can create a ParameterContext with given environment variables and choose which of them are sensitive varaibles. If they're not listed, you may need to set them first and restart nifi. enter image description here