Member since
01-16-2022
2
Posts
0
Kudos Received
0
Solutions
01-17-2022
07:49 AM
Hello All, I am trying to access the NiFi bulletin-board through NiFi API with InvokeHTTP process in order to consume the failure message. Referencing these curl command of this post: Creating NiFi Template via Rest API I am at the V1.15 with single-user login mode. My current attempt is: 1. User GenerateFlowFile to simulate the content for API /access/token. {"Custom Text" : "username=${username}&password=${password}"} 2. Use InvokeHTTP to request the access token. HTTP Method POST Remote URL https://localhost:8443/nifi-api/access/token Content Type x-www-form-urlencoded This will response an access token which will be sent within the header. 3. Use InvokeHTTP to request the bulletin-board. HTTP Method GET Remote URL https://localhost:8443/nifi-api/bulletin-board Authentication Bearer ${access_token} This will response the bulletin-board I need. However In my current approach, the password will appear in the flowfile content as plain-text witch doesn't make it a proper approach. Is there a secure way to obtain an access token (i.e. encrypted password) for latter connection? Am I not understanding the NiFi RestAPI right ? Is there a better approach to request from the NiFi API through NiFi itself ? Thank you all in advanced.
... View more
Labels:
- Labels:
-
Apache NiFi