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.

Access User in NiFi Processor

Highlighted

Access User in NiFi Processor

New Contributor

Hi,

is it possible to access the User/User Id from within a NiFi Processor?

I plan to develop a custom processor and I would like to change its behaviour according to the access rights of the current User.

For example a user should only be allowed to consume from a topic he has the access rights to.

Thanks.

2 REPLIES 2
Highlighted

Re: Access User in NiFi Processor

Master Guru
@Patt Rick

-

None of the NiFi processor ever execute as the user who is logged in. There is one JVM which executes the code for all processors running on the NiFi canvas regardless of whom added them.

The NiFi authorization policies govern what interaction with the canvas are allowed for a given authenticated user.
NiFi also does not use sessions so there is no notion of a "current user". Every single request to NiFi must contain user authorization.

-

Not sure how you intent to code your custom processor to obtain a specific users access rights to a topic. Problem one is determining which user account to use. There could be multiple users "logged in" to the same NIFi UI.

-

Thank you,

Matt

Re: Access User in NiFi Processor

@Matt Clarke laid it all out correctly, but I would add that usually the external system you are connecting to (sounds like you are talking about kafka) has authentication and authorization concepts so that is where the permissioning happens.

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