Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

How to make an authenticated REST microservice calls using NiFi Processors

avatar

Can NiFi handle authenticated calls to REST microservices? For example before calling a REST service, the client needs to call an authentication service to obtain a token or session id. The session token is then passed into a REST call to post the data.

Is there any mechanism for maintaining the token and renewing it periodically?

1 ACCEPTED SOLUTION

avatar

If the token can be retrieved from an external resource via static credentials, you can use a separate InvokeHTTP processor to perform the authentication and load the token into flowfile content, which is then fed to the follow-on InvokeHTTP processor to perform the actual request.

@Pierre Villard has a good example of using OAuth 1.0 to generate credential material and then use that in a follow-on request.

View solution in original post

1 REPLY 1

avatar

If the token can be retrieved from an external resource via static credentials, you can use a separate InvokeHTTP processor to perform the authentication and load the token into flowfile content, which is then fed to the follow-on InvokeHTTP processor to perform the actual request.

@Pierre Villard has a good example of using OAuth 1.0 to generate credential material and then use that in a follow-on request.