1

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?

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks @Bryan for the response. I'm using 1.9.0. "Basic Authentication Password" doesn't support expression language. How do I go about passing "variable" to sensitive value which doesn't support expression language.
There is not a good way, that is one reason why parameters were added so that it can be done from any property no matter what

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.