Reputation: 37
I have to invoke multiple Endpoints with the "same" user credentials (basic auth). I don't want to hard code "Basic Auth UserName" and "Basic Auth Password" for each InvokeHttp header. Is there a easy way to maintain it in one place and pass it to each InvokeHttp processor?
Upvotes: 1
Views: 877
Reputation: 18670
If you are using NiFi 1.10.0 or newer, then you can create a parameter context with parameters for "basic.auth.user" and a sensitive parameter for "basic.auth.password", then bind the parameter context to the process group, then in the processor reference #{basic.auth.user} and #{basic.auth.password}.
https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Parameters
If older than 1.10.0, then you can user expression language to reference a variable, system property, or environment variable.
Upvotes: 3