Pierre,
I just use InvokeHTTP for handling OAuth logins. I usually prefer to place
all of the OAuth login logic in its own ProcessGroup so that it can be
referenced from several places in my workflow and keep that logic separate
from the rest of the functional logic. At this point you can either have
the HTTP POST body sent to this ProcessGroup as the content of the flowfile
or have that ProcessGroup load a file from some location that contains the
login HTTP request body. I have attached a sample workflow where I use this
approach for logging into Salesforce.com. This example simply returns the
access token to the calling workflow via the output port but to Matt's
point you could certainly put it in a DistributedMapCache entry.
PS - Just to help make things more clear the "FetchFile" processor in this
example loads a file that contains Salesforce.com expected POST payload as
described
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_username_password_oauth_flow.htm
Thanks,
Jeremy Dyer
On Sat, Apr 2, 2016 at 11:47 PM, Matt Burgess <[email protected]> wrote:
> Pierre,
>
> I'm no OAuth expert but maybe you could have a flow that hits the OAuth
> service for a token (scheduled for the same duration as the token
> lifetime), then stores it in a DistributedMapCache, then your other flows
> can fetch the token for the desired operations? Alternatively, if you are
> to provide a callback for the OAuth service, you could point it at a
> HandleHttpRequest endpoint for further processing.
>
> Andy LoPresto (my go-to guru for all things security, and recently-named
> committer to Apache NiFi) can probably make better recommendations on this
> (sorry in advance if I'm feeding you to the wolves ALP ;)
>
> Regards,
> Matt
>
> On Fri, Apr 1, 2016 at 3:33 PM, Pierre Villard <
> [email protected]> wrote:
>
>> Hi guys,
>>
>> I'm working on a new flow and I'd need to use OAuth for some HTTP
>> requests. Is there something available for this? Or a recommended way to
>> get the job done with existing processors?
>>
>> Thanks!
>> Pierre
>>
>
>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><template><description></description><name>Salesforce OAuth2 Login Example</name><snippet><processGroups><id>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</id><parentGroupId>f990f6a5-841c-4d59-8a0e-08744febdc62</parentGroupId><position><x>838.6338402732085</x><y>498.3318571507406</y></position><activeRemotePortCount>0</activeRemotePortCount><comments></comments><contents><connections><id>5f530504-012c-491e-ba50-335435232a33</id><parentGroupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</parentGroupId><backPressureDataSizeThreshold>0 MB</backPressureDataSizeThreshold><backPressureObjectThreshold>0</backPressureObjectThreshold><destination><groupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</groupId><id>d1801cf3-ea7f-4b52-847f-5d2240629883</id><type>PROCESSOR</type></destination><flowFileExpiration>0 sec</flowFileExpiration><labelIndex>1</labelIndex><name></name><source><groupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</groupId><id>3a12d9ba-7d97-4877-b945-971c683c334e</id><type>INPUT_PORT</type></source><zIndex>0</zIndex></connections><connections><id>a5bd7042-3fe7-4046-b10f-412a33a94b7e</id><parentGroupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</parentGroupId><backPressureDataSizeThreshold>0 MB</backPressureDataSizeThreshold><backPressureObjectThreshold>0</backPressureObjectThreshold><destination><groupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</groupId><id>bcc1c5d5-8f6a-4e4e-adc0-5dcbee8985d6</id><type>OUTPUT_PORT</type></destination><flowFileExpiration>0 sec</flowFileExpiration><labelIndex>1</labelIndex><name></name><selectedRelationships>matched</selectedRelationships><source><groupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</groupId><id>0face432-ec9c-4a39-802c-90b628fc19bc</id><type>PROCESSOR</type></source><zIndex>0</zIndex></connections><connections><id>da158696-ae59-4579-996d-d7a14fac2e72</id><parentGroupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</parentGroupId><backPressureDataSizeThreshold>0 MB</backPressureDataSizeThreshold><backPressureObjectThreshold>0</backPressureObjectThreshold><destination><groupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</groupId><id>4eea2682-95d6-4dc2-9b43-0d58cc6114cd</id><type>PROCESSOR</type></destination><flowFileExpiration>0 sec</flowFileExpiration><labelIndex>1</labelIndex><name></name><selectedRelationships>Failure</selectedRelationships><selectedRelationships>No Retry</selectedRelationships><selectedRelationships>Retry</selectedRelationships><source><groupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</groupId><id>628138c7-31f1-4b60-892f-50ccc46744d9</id><type>PROCESSOR</type></source><zIndex>0</zIndex></connections><connections><id>174fabe0-09b4-4087-a723-580256d9fede</id><parentGroupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</parentGroupId><backPressureDataSizeThreshold>0 MB</backPressureDataSizeThreshold><backPressureObjectThreshold>0</backPressureObjectThreshold><destination><groupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</groupId><id>628138c7-31f1-4b60-892f-50ccc46744d9</id><type>PROCESSOR</type></destination><flowFileExpiration>0 sec</flowFileExpiration><labelIndex>1</labelIndex><name></name><selectedRelationships>success</selectedRelationships><source><groupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</groupId><id>d1801cf3-ea7f-4b52-847f-5d2240629883</id><type>PROCESSOR</type></source><zIndex>0</zIndex></connections><connections><id>7182e9b2-0b32-4f5a-af6d-69b414ebea15</id><parentGroupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</parentGroupId><backPressureDataSizeThreshold>0 MB</backPressureDataSizeThreshold><backPressureObjectThreshold>0</backPressureObjectThreshold><destination><groupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</groupId><id>0face432-ec9c-4a39-802c-90b628fc19bc</id><type>PROCESSOR</type></destination><flowFileExpiration>0 sec</flowFileExpiration><labelIndex>1</labelIndex><name></name><selectedRelationships>Response</selectedRelationships><source><groupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</groupId><id>628138c7-31f1-4b60-892f-50ccc46744d9</id><type>PROCESSOR</type></source><zIndex>0</zIndex></connections><inputPorts><id>3a12d9ba-7d97-4877-b945-971c683c334e</id><parentGroupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</parentGroupId><position><x>54.46235656738281</x><y>24.973644256591797</y></position><comments></comments><concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount><name>Login Request</name><state>STOPPED</state><type>INPUT_PORT</type></inputPorts><outputPorts><id>bcc1c5d5-8f6a-4e4e-adc0-5dcbee8985d6</id><parentGroupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</parentGroupId><position><x>1572.6612548828125</x><y>213.83319091796875</y></position><comments></comments><concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount><name>Salesforce Oauth2 SessionID</name><state>STOPPED</state><type>OUTPUT_PORT</type><validationErrors>'Port 'Salesforce Oauth2 SessionID'' is invalid because Output connection for port 'Salesforce Oauth2 SessionID' is not defined.</validationErrors></outputPorts><processors><id>d1801cf3-ea7f-4b52-847f-5d2240629883</id><parentGroupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</parentGroupId><position><x>469.9633499011104</x><y>-3.77349687388903</y></position><config><bulletinLevel>WARN</bulletinLevel><comments></comments><concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount><defaultConcurrentTasks><entry><key>TIMER_DRIVEN</key><value>1</value></entry><entry><key>EVENT_DRIVEN</key><value>0</value></entry><entry><key>CRON_DRIVEN</key><value>1</value></entry></defaultConcurrentTasks><defaultSchedulingPeriod><entry><key>TIMER_DRIVEN</key><value>0 sec</value></entry><entry><key>CRON_DRIVEN</key><value>* * * * * ?</value></entry></defaultSchedulingPeriod><descriptors><entry><key>File to Fetch</key><value><defaultValue>${absolute.path}/${filename}</defaultValue><description>The fully-qualified filename of the file to fetch from the file system</description><displayName>File to Fetch</displayName><dynamic>false</dynamic><name>File to Fetch</name><required>true</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry><entry><key>Completion Strategy</key><value><allowableValues><description>Leave the file as-is</description><displayName>None</displayName><value>None</value></allowableValues><allowableValues><description>Moves the file to the directory specified by the <Move Destination Directory> property</description><displayName>Move File</displayName><value>Move File</value></allowableValues><allowableValues><description>Deletes the original file from the file system</description><displayName>Delete File</displayName><value>Delete File</value></allowableValues><defaultValue>None</defaultValue><description>Specifies what to do with the original file on the file system once it has been pulled into NiFi</description><displayName>Completion Strategy</displayName><dynamic>false</dynamic><name>Completion Strategy</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Move Destination Directory</key><value><description>The directory to the move the original file to once it has been fetched from the file system. This property is ignored unless the Completion Strategy is set to "Move File". If the directory does not exist, it will be created.</description><displayName>Move Destination Directory</displayName><dynamic>false</dynamic><name>Move Destination Directory</name><required>false</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry><entry><key>Move Conflict Strategy</key><value><allowableValues><description>The existing destination file should remain intact. The newly ingested file should be moved to the destination directory but be renamed to a random filename</description><displayName>Rename</displayName><value>Rename</value></allowableValues><allowableValues><description>The newly ingested file should replace the existing file in the Destination Directory</description><displayName>Replace File</displayName><value>Replace File</value></allowableValues><allowableValues><description>The existing file should in the Destination Directory should stay intact and the newly ingested file should be deleted</description><displayName>Keep Existing</displayName><value>Keep Existing</value></allowableValues><allowableValues><description>The existing destination file should remain intact and the incoming FlowFile should be routed to failure</description><displayName>Fail</displayName><value>Fail</value></allowableValues><defaultValue>Rename</defaultValue><description>If Completion Strategy is set to Move File and a file already exists in the destination directory with the same name, this property specifies how that naming conflict should be resolved</description><displayName>Move Conflict Strategy</displayName><dynamic>false</dynamic><name>Move Conflict Strategy</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry></descriptors><lossTolerant>false</lossTolerant><penaltyDuration>30 sec</penaltyDuration><properties><entry><key>File to Fetch</key><value>/Your/Path/To/Salesforce_login.txt</value></entry><entry><key>Completion Strategy</key><value>None</value></entry><entry><key>Move Destination Directory</key></entry><entry><key>Move Conflict Strategy</key><value>Rename</value></entry></properties><runDurationMillis>0</runDurationMillis><schedulingPeriod>0 sec</schedulingPeriod><schedulingStrategy>TIMER_DRIVEN</schedulingStrategy><yieldDuration>1 sec</yieldDuration></config><name>Load Salesforce.com Login Data</name><relationships><autoTerminate>true</autoTerminate><description>Any FlowFile that could not be fetched from the file system for any reason other than insufficient permissions or the file not existing will be transferred to this Relationship.</description><name>failure</name></relationships><relationships><autoTerminate>true</autoTerminate><description>Any FlowFile that could not be fetched from the file system because the file could not be found will be transferred to this Relationship.</description><name>not.found</name></relationships><relationships><autoTerminate>true</autoTerminate><description>Any FlowFile that could not be fetched from the file system due to the user running NiFi not having sufficient permissions will be transferred to this Relationship.</description><name>permission.denied</name></relationships><relationships><autoTerminate>false</autoTerminate><description>Any FlowFile that is successfully fetched from the file system will be transferred to this Relationship.</description><name>success</name></relationships><state>STOPPED</state><style/><supportsEventDriven>false</supportsEventDriven><supportsParallelProcessing>true</supportsParallelProcessing><type>org.apache.nifi.processors.standard.FetchFile</type></processors><processors><id>628138c7-31f1-4b60-892f-50ccc46744d9</id><parentGroupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</parentGroupId><position><x>1012.1947620167502</x><y>-10.89491056532296</y></position><config><bulletinLevel>WARN</bulletinLevel><comments></comments><concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount><defaultConcurrentTasks><entry><key>TIMER_DRIVEN</key><value>1</value></entry><entry><key>EVENT_DRIVEN</key><value>0</value></entry><entry><key>CRON_DRIVEN</key><value>1</value></entry></defaultConcurrentTasks><defaultSchedulingPeriod><entry><key>TIMER_DRIVEN</key><value>0 sec</value></entry><entry><key>CRON_DRIVEN</key><value>* * * * * ?</value></entry></defaultSchedulingPeriod><descriptors><entry><key>HTTP Method</key><value><defaultValue>GET</defaultValue><description>HTTP request method (GET, POST, PUT, DELETE, HEAD, OPTIONS). Arbitrary methods are also supported. Methods other than POST and PUT will be sent without a message body.</description><displayName>HTTP Method</displayName><dynamic>false</dynamic><name>HTTP Method</name><required>true</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry><entry><key>Remote URL</key><value><description>Remote URL which will be connected to, including scheme, host, port, path.</description><displayName>Remote URL</displayName><dynamic>false</dynamic><name>Remote URL</name><required>true</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry><entry><key>SSL Context Service</key><value><description>The SSL Context Service used to provide client certificate information for TLS/SSL (https) connections.</description><displayName>SSL Context Service</displayName><dynamic>false</dynamic><identifiesControllerService>org.apache.nifi.ssl.SSLContextService</identifiesControllerService><name>SSL Context Service</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Connection Timeout</key><value><defaultValue>5 secs</defaultValue><description>Max wait time for connection to remote service.</description><displayName>Connection Timeout</displayName><dynamic>false</dynamic><name>Connection Timeout</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Read Timeout</key><value><defaultValue>15 secs</defaultValue><description>Max wait time for response from remote service.</description><displayName>Read Timeout</displayName><dynamic>false</dynamic><name>Read Timeout</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Include Date Header</key><value><allowableValues><displayName>True</displayName><value>True</value></allowableValues><allowableValues><displayName>False</displayName><value>False</value></allowableValues><defaultValue>True</defaultValue><description>Include an RFC-2616 Date header in the request.</description><displayName>Include Date Header</displayName><dynamic>false</dynamic><name>Include Date Header</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Follow Redirects</key><value><allowableValues><displayName>True</displayName><value>True</value></allowableValues><allowableValues><displayName>False</displayName><value>False</value></allowableValues><defaultValue>True</defaultValue><description>Follow HTTP redirects issued by remote server.</description><displayName>Follow Redirects</displayName><dynamic>false</dynamic><name>Follow Redirects</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Attributes to Send</key><value><description>Regular expression that defines which attributes to send as HTTP headers in the request. If not defined, no attributes are sent as headers. Also any dynamic properties set will be sent as headers. The dynamic property key will be the header key and the dynamic property value will be interpreted as expression language will be the header value.</description><displayName>Attributes to Send</displayName><dynamic>false</dynamic><name>Attributes to Send</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Basic Authentication Username</key><value><description>The username to be used by the client to authenticate against the Remote URL. Cannot include control characters (0-31), ':', or DEL (127).</description><displayName>Basic Authentication Username</displayName><dynamic>false</dynamic><name>Basic Authentication Username</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Basic Authentication Password</key><value><description>The password to be used by the client to authenticate against the Remote URL.</description><displayName>Basic Authentication Password</displayName><dynamic>false</dynamic><name>Basic Authentication Password</name><required>false</required><sensitive>true</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Proxy Host</key><value><description>The fully qualified hostname or IP address of the proxy server</description><displayName>Proxy Host</displayName><dynamic>false</dynamic><name>Proxy Host</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Proxy Port</key><value><description>The port of the proxy server</description><displayName>Proxy Port</displayName><dynamic>false</dynamic><name>Proxy Port</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Put Response Body In Attribute</key><value><description>If set, the response body received back will be put into an attribute of the original FlowFile instead of a separate FlowFile. The attribute key to put to is determined by evaluating value of this property. </description><displayName>Put Response Body In Attribute</displayName><dynamic>false</dynamic><name>Put Response Body In Attribute</name><required>false</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry><entry><key>Max Length To Put In Attribute</key><value><defaultValue>256</defaultValue><description>If routing the response body to an attribute of the original (by setting the "Put response body in attribute" property or by receiving an error status code), the number of characters put to the attribute value will be at most this amount. This is important because attributes are held in memory and large attributes will quickly cause out of memory issues. If the output goes longer than this value, it will be truncated to fit. Consider making this smaller if able.</description><displayName>Max Length To Put In Attribute</displayName><dynamic>false</dynamic><name>Max Length To Put In Attribute</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Digest Authentication</key><value><allowableValues><displayName>true</displayName><value>true</value></allowableValues><allowableValues><displayName>false</displayName><value>false</value></allowableValues><defaultValue>false</defaultValue><description>Whether to communicate with the website using Digest Authentication. 'Basic Authentication Username' and 'Basic Authentication Password' are used for authentication.</description><displayName>Use Digest Authentication</displayName><dynamic>false</dynamic><name>Digest Authentication</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Always Output Response</key><value><allowableValues><displayName>true</displayName><value>true</value></allowableValues><allowableValues><displayName>false</displayName><value>false</value></allowableValues><defaultValue>false</defaultValue><description>Will force a response FlowFile to be generated and routed to the 'Response' relationship regardless of what the server status code received is or if the processor is configured to put the server response body in the request attribute. In the later configuration a request FlowFile with the response body in the attribute and a typical response FlowFile will be emitted to their respective relationships.</description><displayName>Always Output Response</displayName><dynamic>false</dynamic><name>Always Output Response</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Trusted Hostname</key><value><description>Bypass the normal truststore hostname verifier to allow the specified remote hostname as trusted. Enabling this property has MITM security implications, use wisely. Will still accept other connections based on the normal truststore hostname verifier. Only valid with SSL (HTTPS) connections.</description><displayName>Trusted Hostname</displayName><dynamic>false</dynamic><name>Trusted Hostname</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Add Response Headers to Request</key><value><allowableValues><displayName>true</displayName><value>true</value></allowableValues><allowableValues><displayName>false</displayName><value>false</value></allowableValues><defaultValue>false</defaultValue><description>Enabling this property saves all the response headers to the original request. This may be when the response headers are needed but a response is not generated due to the status code received.</description><displayName>Add Response Headers to Request</displayName><dynamic>false</dynamic><name>Add Response Headers to Request</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Content-Type</key><value><defaultValue>${mime.type}</defaultValue><description>The Content-Type to specify for when content is being transmitted through a PUT or POST. In the case of an empty value after evaluating an expression language expression, Content-Type defaults to application/octet-stream</description><displayName>Content-Type</displayName><dynamic>false</dynamic><name>Content-Type</name><required>true</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry><entry><key>Use Chunked Encoding</key><value><allowableValues><displayName>true</displayName><value>true</value></allowableValues><allowableValues><displayName>false</displayName><value>false</value></allowableValues><defaultValue>false</defaultValue><description>When POST'ing or PUT'ing content set this property to true in order to not pass the 'Content-length' header and instead send 'Transfer-Encoding' with a value of 'chunked'. This will enable the data transfer mechanism which was introduced in HTTP 1.1 to pass data of unknown lengths in chunks.</description><displayName>Use Chunked Encoding</displayName><dynamic>false</dynamic><name>Use Chunked Encoding</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Penalize on "No Retry"</key><value><allowableValues><displayName>true</displayName><value>true</value></allowableValues><allowableValues><displayName>false</displayName><value>false</value></allowableValues><defaultValue>false</defaultValue><description>Enabling this property will penalize FlowFiles that are routed to the "No Retry" relationship.</description><displayName>Penalize on "No Retry"</displayName><dynamic>false</dynamic><name>Penalize on "No Retry"</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry></descriptors><lossTolerant>false</lossTolerant><penaltyDuration>30 sec</penaltyDuration><properties><entry><key>HTTP Method</key><value>POST</value></entry><entry><key>Remote URL</key><value>https://test.salesforce.com/services/oauth2/token</value></entry><entry><key>SSL Context Service</key></entry><entry><key>Connection Timeout</key><value>5 secs</value></entry><entry><key>Read Timeout</key><value>15 secs</value></entry><entry><key>Include Date Header</key><value>True</value></entry><entry><key>Follow Redirects</key><value>True</value></entry><entry><key>Attributes to Send</key></entry><entry><key>Basic Authentication Username</key></entry><entry><key>Basic Authentication Password</key></entry><entry><key>Proxy Host</key></entry><entry><key>Proxy Port</key></entry><entry><key>Put Response Body In Attribute</key></entry><entry><key>Max Length To Put In Attribute</key><value>256</value></entry><entry><key>Digest Authentication</key><value>false</value></entry><entry><key>Always Output Response</key><value>false</value></entry><entry><key>Trusted Hostname</key></entry><entry><key>Add Response Headers to Request</key><value>false</value></entry><entry><key>Content-Type</key><value>application/x-www-form-urlencoded</value></entry><entry><key>Use Chunked Encoding</key><value>false</value></entry><entry><key>Penalize on "No Retry"</key><value>false</value></entry></properties><runDurationMillis>0</runDurationMillis><schedulingPeriod>0 sec</schedulingPeriod><schedulingStrategy>TIMER_DRIVEN</schedulingStrategy><yieldDuration>1 sec</yieldDuration></config><name>Salesforce User/Pass OAuth2 Login</name><relationships><autoTerminate>false</autoTerminate><description>The original FlowFile will be routed on any type of connection failure, timeout or general exception. It will have new attributes detailing the request.</description><name>Failure</name></relationships><relationships><autoTerminate>false</autoTerminate><description>The original FlowFile will be routed on any status code that should NOT be retried (1xx, 3xx, 4xx status codes). It will have new attributes detailing the request.</description><name>No Retry</name></relationships><relationships><autoTerminate>true</autoTerminate><description>The original FlowFile will be routed upon success (2xx status codes). It will have new attributes detailing the success of the request.</description><name>Original</name></relationships><relationships><autoTerminate>false</autoTerminate><description>A Response FlowFile will be routed upon success (2xx status codes). If the 'Output Response Regardless' property is true then the response will be sent to this relationship regardless of the status code received.</description><name>Response</name></relationships><relationships><autoTerminate>false</autoTerminate><description>The original FlowFile will be routed on any status code that can be retried (5xx status codes). It will have new attributes detailing the request.</description><name>Retry</name></relationships><state>STOPPED</state><style/><supportsEventDriven>false</supportsEventDriven><supportsParallelProcessing>true</supportsParallelProcessing><type>org.apache.nifi.processors.standard.InvokeHTTP</type></processors><processors><id>4eea2682-95d6-4dc2-9b43-0d58cc6114cd</id><parentGroupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</parentGroupId><position><x>1578.1929113378937</x><y>-16.495102251998333</y></position><config><bulletinLevel>DEBUG</bulletinLevel><comments></comments><concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount><defaultConcurrentTasks><entry><key>TIMER_DRIVEN</key><value>1</value></entry><entry><key>EVENT_DRIVEN</key><value>0</value></entry><entry><key>CRON_DRIVEN</key><value>1</value></entry></defaultConcurrentTasks><defaultSchedulingPeriod><entry><key>TIMER_DRIVEN</key><value>0 sec</value></entry><entry><key>CRON_DRIVEN</key><value>* * * * * ?</value></entry></defaultSchedulingPeriod><descriptors><entry><key>Log Level</key><value><allowableValues><displayName>trace</displayName><value>trace</value></allowableValues><allowableValues><displayName>debug</displayName><value>debug</value></allowableValues><allowableValues><displayName>info</displayName><value>info</value></allowableValues><allowableValues><displayName>warn</displayName><value>warn</value></allowableValues><allowableValues><displayName>error</displayName><value>error</value></allowableValues><defaultValue>info</defaultValue><description>The Log Level to use when logging the Attributes</description><displayName>Log Level</displayName><dynamic>false</dynamic><name>Log Level</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Log Payload</key><value><allowableValues><displayName>true</displayName><value>true</value></allowableValues><allowableValues><displayName>false</displayName><value>false</value></allowableValues><defaultValue>false</defaultValue><description>If true, the FlowFile's payload will be logged, in addition to its attributes; otherwise, just the Attributes will be logged.</description><displayName>Log Payload</displayName><dynamic>false</dynamic><name>Log Payload</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Attributes to Log</key><value><description>A comma-separated list of Attributes to Log. If not specified, all attributes will be logged.</description><displayName>Attributes to Log</displayName><dynamic>false</dynamic><name>Attributes to Log</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Attributes to Ignore</key><value><description>A comma-separated list of Attributes to ignore. If not specified, no attributes will be ignored.</description><displayName>Attributes to Ignore</displayName><dynamic>false</dynamic><name>Attributes to Ignore</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Log prefix</key><value><description>Log prefix appended to the log lines. It helps to distinguish the output of multiple LogAttribute processors.</description><displayName>Log prefix</displayName><dynamic>false</dynamic><name>Log prefix</name><required>false</required><sensitive>false</sensitive><supportsEl>true</supportsEl></value></entry></descriptors><lossTolerant>false</lossTolerant><penaltyDuration>30 sec</penaltyDuration><properties><entry><key>Log Level</key><value>debug</value></entry><entry><key>Log Payload</key><value>true</value></entry><entry><key>Attributes to Log</key></entry><entry><key>Attributes to Ignore</key></entry><entry><key>Log prefix</key></entry></properties><runDurationMillis>0</runDurationMillis><schedulingPeriod>0 sec</schedulingPeriod><schedulingStrategy>TIMER_DRIVEN</schedulingStrategy><yieldDuration>1 sec</yieldDuration></config><name>Failure logging</name><relationships><autoTerminate>true</autoTerminate><description>All FlowFiles are routed to this relationship</description><name>success</name></relationships><state>STOPPED</state><style/><supportsEventDriven>true</supportsEventDriven><supportsParallelProcessing>true</supportsParallelProcessing><type>org.apache.nifi.processors.standard.LogAttribute</type></processors><processors><id>0face432-ec9c-4a39-802c-90b628fc19bc</id><parentGroupId>ab129a1d-2ba7-42ce-8757-cd47fe4e114b</parentGroupId><position><x>1013.7950139575373</x><y>197.8627467178082</y></position><config><bulletinLevel>WARN</bulletinLevel><comments></comments><concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount><defaultConcurrentTasks><entry><key>TIMER_DRIVEN</key><value>1</value></entry><entry><key>EVENT_DRIVEN</key><value>0</value></entry><entry><key>CRON_DRIVEN</key><value>1</value></entry></defaultConcurrentTasks><defaultSchedulingPeriod><entry><key>TIMER_DRIVEN</key><value>0 sec</value></entry><entry><key>CRON_DRIVEN</key><value>* * * * * ?</value></entry></defaultSchedulingPeriod><descriptors><entry><key>Destination</key><value><allowableValues><displayName>flowfile-content</displayName><value>flowfile-content</value></allowableValues><allowableValues><displayName>flowfile-attribute</displayName><value>flowfile-attribute</value></allowableValues><defaultValue>flowfile-content</defaultValue><description>Indicates whether the results of the JsonPath evaluation are written to the FlowFile content or a FlowFile attribute; if using attribute, must specify the Attribute Name property. If set to flowfile-content, only one JsonPath may be specified, and the property name is ignored.</description><displayName>Destination</displayName><dynamic>false</dynamic><name>Destination</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Return Type</key><value><allowableValues><displayName>auto-detect</displayName><value>auto-detect</value></allowableValues><allowableValues><displayName>json</displayName><value>json</value></allowableValues><allowableValues><displayName>scalar</displayName><value>scalar</value></allowableValues><defaultValue>auto-detect</defaultValue><description>Indicates the desired return type of the JSON Path expressions. Selecting 'auto-detect' will set the return type to 'json' for a Destination of 'flowfile-content', and 'scalar' for a Destination of 'flowfile-attribute'.</description><displayName>Return Type</displayName><dynamic>false</dynamic><name>Return Type</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Path Not Found Behavior</key><value><allowableValues><displayName>warn</displayName><value>warn</value></allowableValues><allowableValues><displayName>ignore</displayName><value>ignore</value></allowableValues><defaultValue>ignore</defaultValue><description>Indicates how to handle missing JSON path expressions when destination is set to 'flowfile-attribute'. Selecting 'warn' will generate a warning when a JSON path expression is not found.</description><displayName>Path Not Found Behavior</displayName><dynamic>false</dynamic><name>Path Not Found Behavior</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>Null Value Representation</key><value><allowableValues><displayName>empty string</displayName><value>empty string</value></allowableValues><allowableValues><displayName>the string 'null'</displayName><value>the string 'null'</value></allowableValues><defaultValue>empty string</defaultValue><description>Indicates the desired representation of JSON Path expressions resulting in a null value.</description><displayName>Null Value Representation</displayName><dynamic>false</dynamic><name>Null Value Representation</name><required>true</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry><entry><key>access_token</key><value><description></description><displayName>access_token</displayName><dynamic>true</dynamic><name>access_token</name><required>false</required><sensitive>false</sensitive><supportsEl>false</supportsEl></value></entry></descriptors><lossTolerant>false</lossTolerant><penaltyDuration>30 sec</penaltyDuration><properties><entry><key>Destination</key><value>flowfile-attribute</value></entry><entry><key>Return Type</key><value>auto-detect</value></entry><entry><key>Path Not Found Behavior</key><value>ignore</value></entry><entry><key>Null Value Representation</key><value>empty string</value></entry><entry><key>access_token</key><value>access_token</value></entry></properties><runDurationMillis>0</runDurationMillis><schedulingPeriod>0 sec</schedulingPeriod><schedulingStrategy>TIMER_DRIVEN</schedulingStrategy><yieldDuration>1 sec</yieldDuration></config><name>Get Access Token</name><relationships><autoTerminate>true</autoTerminate><description>FlowFiles are routed to this relationship when the JsonPath cannot be evaluated against the content of the FlowFile; for instance, if the FlowFile is not valid JSON</description><name>failure</name></relationships><relationships><autoTerminate>false</autoTerminate><description>FlowFiles are routed to this relationship when the JsonPath is successfully evaluated and the FlowFile is modified as a result</description><name>matched</name></relationships><relationships><autoTerminate>true</autoTerminate><description>FlowFiles are routed to this relationship when the JsonPath does not match the content of the FlowFile and the Destination is set to flowfile-content</description><name>unmatched</name></relationships><state>STOPPED</state><style/><supportsEventDriven>true</supportsEventDriven><supportsParallelProcessing>true</supportsParallelProcessing><type>org.apache.nifi.processors.standard.EvaluateJsonPath</type></processors></contents><disabledCount>0</disabledCount><inactiveRemotePortCount>0</inactiveRemotePortCount><inputPortCount>1</inputPortCount><invalidCount>1</invalidCount><name>Salesforce REST API Login</name><outputPortCount>1</outputPortCount><parent><id>f990f6a5-841c-4d59-8a0e-08744febdc62</id><name>Salesforce Integration</name><parent><id>806b9ea8-20f0-42f6-a65d-4ade3162b3b9</id><name>LendingPoint</name><parent><id>dc52d98f-8c02-4ff2-96b5-970116d2b3a3</id><name>NiFi Flow</name></parent></parent></parent><runningCount>0</runningCount><stoppedCount>5</stoppedCount></processGroups></snippet><timestamp>04/03/2016 05:28:13 EDT</timestamp></template>