Re: get access token inside custom processor

2018-08-29 Thread Andy LoPresto
Suraj,

There is no concept of a “logged in user” in NiFi. Many (or none) users may be 
accessing the NiFi UI at the same time, but this is completely independent of 
the flow operation. The component state is running/stopped/etc. regardless of 
the user viewing the UI.


Andy LoPresto
alopre...@apache.org
alopresto.apa...@gmail.com
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Aug 29, 2018, at 10:26 AM, Chamoli, Suraj Ramesh 
>  wrote:
> 
> Hi,
> Is there any way where we can get the USERID  of same as the $hostname{()} 
> and ${ip()} of a nifi server.
> 
> On 2018/02/27 14:31:26, Bryan Bende http://gmail.com/>> 
> wrote:
>> Hello,>
>> 
>> Your custom processor would be the same as if you were writing an>
>> external client program.>
>> 
>> You would need to provide the processor with a username and password>
>> in the processor properties, and then it would need to make a call to>
>> the token REST end-point.>
>> 
>> Processors don't run as the user from the web UI, they run on behalf>
>> of the NiFi framework and have no idea which user started/stopped>
>> them.>
>> 
>> Thanks,>
>> 
>> Bryan>
>> 
>> On Tue, Feb 27, 2018 at 1:27 AM, 尹文才 http://gmail.com/>> 
>> wrote:>
>>> Hi guys, I'm trying to invoke some nifi rest apis inside my custom>
>>> processor, the nifi I'm using is nifi 1.4.0 and it's a 3 node secured>
>>> cluster., the username and password are kept inside a ldap server.>
>>> I know that in a secured nifi cluster, in order to make any request I need>
>>> the access token, my question is how could I get the access token in my>
>>> custom processor? Thanks. (I think the token should be>
>>> available somewhere after successful login right?)>
 
>>> regards,>
>>> ben>



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: get access token inside custom processor

2018-08-29 Thread Chamoli, Suraj Ramesh
Hi,
Is there any way where we can get the USERID  of same as the $hostname{()} and 
${ip()} of a nifi server.

On 2018/02/27 14:31:26, Bryan Bende  wrote:
> Hello,>
>
> Your custom processor would be the same as if you were writing an>
> external client program.>
>
> You would need to provide the processor with a username and password>
> in the processor properties, and then it would need to make a call to>
> the token REST end-point.>
>
> Processors don't run as the user from the web UI, they run on behalf>
> of the NiFi framework and have no idea which user started/stopped>
> them.>
>
> Thanks,>
>
> Bryan>
>
> On Tue, Feb 27, 2018 at 1:27 AM, 尹文才  wrote:>
> > Hi guys, I'm trying to invoke some nifi rest apis inside my custom>
> > processor, the nifi I'm using is nifi 1.4.0 and it's a 3 node secured>
> > cluster., the username and password are kept inside a ldap server.>
> > I know that in a secured nifi cluster, in order to make any request I need>
> > the access token, my question is how could I get the access token in my>
> > custom processor? Thanks. (I think the token should be>
> > available somewhere after successful login right?)>
> >>
> > regards,>
> > ben>
>


Re: get access token inside custom processor

2018-02-27 Thread 尹文才
Thanks Bryan I got it, I thought the processor would be running as the user
that had logged into the NIFI web UI.

Regards,
Ben

2018-02-27 22:31 GMT+08:00 Bryan Bende :

> Hello,
>
> Your custom processor would be the same as if you were writing an
> external client program.
>
> You would need to provide the processor with a username and password
> in the processor properties, and then it would need to make a call to
> the token REST end-point.
>
> Processors don't run as the user from the web UI, they run on behalf
> of the NiFi framework and have no idea which user started/stopped
> them.
>
> Thanks,
>
> Bryan
>
> On Tue, Feb 27, 2018 at 1:27 AM, 尹文才  wrote:
> > Hi guys, I'm trying to invoke some nifi rest apis inside my custom
> > processor, the nifi I'm using is nifi 1.4.0 and it's a 3 node secured
> > cluster., the username and password are kept inside a ldap server.
> > I know that in a secured nifi cluster, in order to make any request I
> need
> > the access token, my question is how could I get the access token in my
> > custom processor? Thanks. (I think the token should be
> > available somewhere after successful login right?)
> >
> > regards,
> > ben
>


Re: get access token inside custom processor

2018-02-27 Thread Bryan Bende
Hello,

Your custom processor would be the same as if you were writing an
external client program.

You would need to provide the processor with a username and password
in the processor properties, and then it would need to make a call to
the token REST end-point.

Processors don't run as the user from the web UI, they run on behalf
of the NiFi framework and have no idea which user started/stopped
them.

Thanks,

Bryan

On Tue, Feb 27, 2018 at 1:27 AM, 尹文才  wrote:
> Hi guys, I'm trying to invoke some nifi rest apis inside my custom
> processor, the nifi I'm using is nifi 1.4.0 and it's a 3 node secured
> cluster., the username and password are kept inside a ldap server.
> I know that in a secured nifi cluster, in order to make any request I need
> the access token, my question is how could I get the access token in my
> custom processor? Thanks. (I think the token should be
> available somewhere after successful login right?)
>
> regards,
> ben