You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Mike Thomsen <mi...@gmail.com> on 2020/01/02 20:17:41 UTC

OAuth2 and REST with standard processors

We have an OAuth2 resource server in our environment that provides a JWT
back. Are there any good patterns that would work out of the box with the
standard processor set to enable us to easily add the Authorization header
to the outgoing REST call?

If not, does anyone have any thoughts about creating a controller service
to facilitate? Based on my limited experience here, it seems like it
wouldn't be terribly difficult to create a service that does a client grant
against an OAuth2 resource server and then take the access_token and make
it available to our REST processors.

Thoughts?

Thanks,

Mike

Re: OAuth2 and REST with standard processors

Posted by Mike Thomsen <mi...@gmail.com>.
Andy,

Can you weigh in on whether or not this PR should be continued since it
builds on Oltu, which is now officially retired to the Attic? I'm
personally wary of depending on a retired Oauth2 client.

Thanks,

Mike

On Thu, Jan 2, 2020 at 8:43 PM Jeremy Dyer <jd...@gmail.com> wrote:

> Mike - I needed to do this very same thing a little over 2 years ago. I
> opened an initial PR https://github.com/apache/nifi/pull/2085 this PR of
> course would need some work to be merged but I used it a lot on a private
> branch with success. I would be a fan of seeing this approach used and can
> personally vouch for it working well.
>
> Thanks,
> Jeremy Dyer
>
> On Thu, Jan 2, 2020 at 3:18 PM Mike Thomsen <mi...@gmail.com>
> wrote:
>
> > We have an OAuth2 resource server in our environment that provides a JWT
> > back. Are there any good patterns that would work out of the box with the
> > standard processor set to enable us to easily add the Authorization
> header
> > to the outgoing REST call?
> >
> > If not, does anyone have any thoughts about creating a controller service
> > to facilitate? Based on my limited experience here, it seems like it
> > wouldn't be terribly difficult to create a service that does a client
> grant
> > against an OAuth2 resource server and then take the access_token and make
> > it available to our REST processors.
> >
> > Thoughts?
> >
> > Thanks,
> >
> > Mike
> >
>

Re: OAuth2 and REST with standard processors

Posted by Jeremy Dyer <jd...@gmail.com>.
Mike - I needed to do this very same thing a little over 2 years ago. I
opened an initial PR https://github.com/apache/nifi/pull/2085 this PR of
course would need some work to be merged but I used it a lot on a private
branch with success. I would be a fan of seeing this approach used and can
personally vouch for it working well.

Thanks,
Jeremy Dyer

On Thu, Jan 2, 2020 at 3:18 PM Mike Thomsen <mi...@gmail.com> wrote:

> We have an OAuth2 resource server in our environment that provides a JWT
> back. Are there any good patterns that would work out of the box with the
> standard processor set to enable us to easily add the Authorization header
> to the outgoing REST call?
>
> If not, does anyone have any thoughts about creating a controller service
> to facilitate? Based on my limited experience here, it seems like it
> wouldn't be terribly difficult to create a service that does a client grant
> against an OAuth2 resource server and then take the access_token and make
> it available to our REST processors.
>
> Thoughts?
>
> Thanks,
>
> Mike
>