Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Apache Nifi : Basic Authentication Details using attributes

Solved Go to solution
Highlighted

Apache Nifi : Basic Authentication Details using attributes

Expert Contributor

We have a use case to use "InvokeHttp" for restful service, getting all the details from the DB (URL/username/password), need to pass basic authentication (username and password) via attributes retrieved from DB. Is it possible to pass authentication using attributes ?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Apache Nifi : Basic Authentication Details using attributes

Master Guru
@nyakkanti

Only processor properties that support the NiFi expression language can be configured to use FlowFile attributes.

Some properties (even if the processor property says supports expression language: false, you may be able to use a simple ${<FlowFile-attribute-name>} to return a value from a attribute key/value pair.

But this is never true for sensitive properties such as password properties. Password properties are especially difficult since those values are encrypted upon apply. So if you entered ${<FlowFile-attribute-name>} , that is what gets encrypted. The processor then decrypts that when making the connection. Nowhere in that process does it ever retrieve a value from the FlowFile.

Thanks, Matt

View solution in original post

1 REPLY 1
Highlighted

Re: Apache Nifi : Basic Authentication Details using attributes

Master Guru
@nyakkanti

Only processor properties that support the NiFi expression language can be configured to use FlowFile attributes.

Some properties (even if the processor property says supports expression language: false, you may be able to use a simple ${<FlowFile-attribute-name>} to return a value from a attribute key/value pair.

But this is never true for sensitive properties such as password properties. Password properties are especially difficult since those values are encrypted upon apply. So if you entered ${<FlowFile-attribute-name>} , that is what gets encrypted. The processor then decrypts that when making the connection. Nowhere in that process does it ever retrieve a value from the FlowFile.

Thanks, Matt

View solution in original post

Don't have an account?
Coming from Hortonworks? Activate your account here