<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Nifi Dynamic Parameter Context / ListAzureBlobStorage SAS Token in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Dynamic-Parameter-Context-ListAzureBlobStorage-SAS/m-p/388984#M246844</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111061"&gt;@Deejay&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our NiFi expert&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95503"&gt;@steven-matison&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jun 2024 01:03:21 GMT</pubDate>
    <dc:creator>DianaTorres</dc:creator>
    <dc:date>2024-06-11T01:03:21Z</dc:date>
    <item>
      <title>Nifi Dynamic Parameter Context / ListAzureBlobStorage SAS Token</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Dynamic-Parameter-Context-ListAzureBlobStorage-SAS/m-p/388983#M246843</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;I'm quite new to Nifi. I'm using v.&lt;SPAN&gt;&amp;nbsp;1.24.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm working on a project which requires fetching blobs from Azure Blob Storage and putting them into SFTP.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To achieve the desired result, there are two major steps :&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN class="TextRun SpellingErrorZoomed SCXP54904304 BCX0"&gt;&lt;SPAN class="SCXP54904304 BCX0"&gt;Get&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SCXP54904304 BCX0"&gt;&lt;SPAN class="NormalTextRun SCXP54904304 BCX0"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SpellingErrorZoomed SCXP54904304 BCX0"&gt;&lt;SPAN class="SCXP54904304 BCX0"&gt;Token&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SCXP54904304 BCX0"&gt;&lt;SPAN class="NormalTextRun SCXP54904304 BCX0"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SpellingErrorZoomed SCXP54904304 BCX0"&gt;&lt;SPAN class="SCXP54904304 BCX0"&gt;Bearer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SCXP54904304 BCX0"&gt;&lt;SPAN class="NormalTextRun SCXP54904304 BCX0"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SpellingErrorZoomed SCXP54904304 BCX0"&gt;&lt;SPAN class="SCXP54904304 BCX0"&gt;from&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SCXP54904304 BCX0"&gt;&lt;SPAN class="NormalTextRun SCXP54904304 BCX0"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Authentification Server&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="EOP SCXP54904304 BCX0"&gt;​&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="EOP SCXP54904304 BCX0"&gt;C&lt;SPAN class="TextRun SpellingErrorZoomed SCXP66936517 BCX0"&gt;&lt;SPAN class="SCXP66936517 BCX0"&gt;alling&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SCXP66936517 BCX0"&gt;&lt;SPAN class="NormalTextRun SCXP66936517 BCX0"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;a webservice to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SpellingErrorZoomed SCXP66936517 BCX0"&gt;&lt;SPAN class="SCXP66936517 BCX0"&gt;get&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SCXP66936517 BCX0"&gt;&lt;SPAN class="NormalTextRun SCXP66936517 BCX0"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SAS key&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SpellingErrorZoomed SCXP66936517 BCX0"&gt;&lt;SPAN class="SCXP66936517 BCX0"&gt;with&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SCXP66936517 BCX0"&gt;&lt;SPAN class="NormalTextRun SCXP66936517 BCX0"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SpellingErrorZoomed SCXP66936517 BCX0"&gt;&lt;SPAN class="SCXP66936517 BCX0"&gt;Token&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SCXP66936517 BCX0"&gt;&lt;SPAN class="NormalTextRun SCXP66936517 BCX0"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SpellingErrorZoomed SCXP66936517 BCX0"&gt;&lt;SPAN class="SCXP66936517 BCX0"&gt;Bearer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SCXP66936517 BCX0"&gt;&lt;SPAN class="NormalTextRun SCXP66936517 BCX0"&gt;&lt;SPAN&gt;&amp;nbsp;gotten&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SpellingErrorZoomed SCXP66936517 BCX0"&gt;&lt;SPAN class="SCXP66936517 BCX0"&gt;from&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SCXP66936517 BCX0"&gt;&lt;SPAN class="NormalTextRun SCXP66936517 BCX0"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SpellingErrorZoomed SCXP66936517 BCX0"&gt;&lt;SPAN class="SCXP66936517 BCX0"&gt;previous&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="TextRun SCXP66936517 BCX0"&gt;&lt;SPAN class="NormalTextRun SCXP66936517 BCX0"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;call.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="EOP SCXP54904304 BCX0"&gt;&lt;SPAN class="EOP SCXP66936517 BCX0"&gt;There are two limitations :&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL class="lia-list-style-type-lower-alpha"&gt;&lt;LI&gt;&lt;SPAN class="EOP SCXP54904304 BCX0"&gt;&lt;SPAN class="EOP SCXP66936517 BCX0"&gt;The SAS Key expires every 1440 minutes. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="EOP SCXP54904304 BCX0"&gt;&lt;SPAN class="EOP SCXP66936517 BCX0"&gt;The ListAzureBlobStorage processor doesn't accept any incoming flowfiles.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="EOP SCXP54904304 BCX0"&gt;&lt;SPAN class="EOP SCXP66936517 BCX0"&gt;Therefore, I thought about dynamically updating Parameter Context and using the parameter as property value in the ListAzureBlobStorage.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Following is the high-level approach of my nifi job :&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;GenerateFlowFile :&lt;/STRONG&gt; scheduled to trigger at every&amp;nbsp;&amp;nbsp;1430 minutes + contains the body of the InvokeHTTP request&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;InvokeHTTP (Get Bearer Token) :&lt;/STRONG&gt; processor to request a bearer token from the authentication server&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;EvaluateJsonPath (Extract Bearer Token)&lt;/STRONG&gt;:&amp;nbsp;Extract the bearer token from the response&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;InvokeHTTP (Get SAS Token)&lt;/STRONG&gt;:&amp;nbsp;processor to obtain the SAS token&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;EvaluateJsonPath (Extract SAS Token)&lt;/STRONG&gt;:&amp;nbsp;Extract the SAS token from the response&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;ReplaceText (Prepare for Parameter Context Update)&lt;/STRONG&gt;:&amp;nbsp;Prepare a JSON payload with the SAS token and update the flow file content&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;PutDistributedMapCache (Store SAS Token)&lt;/STRONG&gt;:&amp;nbsp;Store the SAS token in a distributed cache for later retrieval.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;FetchDistributedMapCache (Retrieve SAS Token)&lt;/STRONG&gt;:&amp;nbsp;Retrieve the SAS token from the distributed cache.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;ReplaceText (Update Parameter Context)&lt;/STRONG&gt;:&amp;nbsp;Prepare a JSON payload to update the parameter context with the new SAS token.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;InvokeHTTP (Update Parameter Context)&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;EvaluateJsonPath (Check Update Status):&amp;nbsp;&lt;/STRONG&gt;Extract the completion status from the response to check if the update is complete.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;RouteOnAttribute (Check Update Completion)&lt;/STRONG&gt;:&amp;nbsp;Route the flow based on whether the update is complete or not&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;InvokeHTTP (GET Method to Check Progress)&lt;/STRONG&gt;:&amp;nbsp;If the update is not complete, send a GET request to check the progress.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;InvokeHTTP (DELETE Method to Remove Completed Request)&lt;/STRONG&gt;:&amp;nbsp;If the update is complete, send a DELETE request to remove the completed request from memory.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I took inspirations from the following post :&amp;nbsp;&lt;A href="https://community.cloudera.com/t5/Support-Questions/Update-parameter-contexts-dynamically-using-REST-API/m-p/347697" target="_blank" rel="noopener"&gt;https://community.cloudera.com/t5/Support-Questions/Update-parameter-contexts-dynamically-using-REST-API/m-p/347697&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The SAS Token is a sensitive field in ListAzureBlobStorage and FetchStorageBlobStorage. I'm getting the following error :&amp;nbsp;&lt;EM&gt;"SAS Token is invalid because the property SAS Token cannot reference parameter 'sasToken' because the Sensitivity of the parameter does not match the Sensitivity of the property".&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I tried the following :&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Attempting to update the sensitivity of the parameter 'sasToken' from not sensitive to sensitive by adding a field sensitivity = True in the ReplaceText processor in step 9.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{&lt;BR /&gt;"revision": {&lt;BR /&gt;"clientId": "bea2399d-2e37-1fff-1f82-17e8cfbc9514",&lt;BR /&gt;"version": 3&lt;BR /&gt;},&lt;BR /&gt;"component": {&lt;BR /&gt;"id": "bea239b6-2e37-1fff-7fe8-a9a01a8d79e7",&lt;BR /&gt;"parameters": [&lt;BR /&gt;{&lt;BR /&gt;"parameter": {&lt;BR /&gt;"name": "sasToken",&lt;BR /&gt;"&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;sensitive": true&lt;/STRONG&gt;&lt;/FONT&gt;,&lt;BR /&gt;"value": "${sasToken}"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;2.&amp;nbsp;Pre-set Parameter Sensitivity i.e. ensuring that the 'sasToken' parameter is initially created with the correct sensitivity (i.e., sensitive) in my NiFi parameter context&lt;/P&gt;&lt;P&gt;In both the cases, I get the following error :&amp;nbsp;&lt;/P&gt;&lt;DIV class="attribute-detail"&gt;&lt;PRE&gt;invokehttp.request.url&lt;BR /&gt;http://localhost:8080/nifi-api/parameter-contexts/bea239b6-2e37-1fff-7fe8-a9a01a8d79e7/update-requests&lt;BR /&gt;&lt;BR /&gt;invokehttp.response.body&lt;BR /&gt;Could not update inherited Parameter Contexts for Parameter Context [ABCD-abcd] because: Cannot update Parameters because doing so would change Parameter 'sasToken' from sensitive to not sensitive&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;Please let me know what do to ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Deejay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS : I'm happy to provide more details if needed.&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 10 Jun 2024 21:07:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Dynamic-Parameter-Context-ListAzureBlobStorage-SAS/m-p/388983#M246843</guid>
      <dc:creator>Deejay</dc:creator>
      <dc:date>2024-06-10T21:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Dynamic Parameter Context / ListAzureBlobStorage SAS Token</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Dynamic-Parameter-Context-ListAzureBlobStorage-SAS/m-p/388984#M246844</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111061"&gt;@Deejay&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our NiFi expert&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95503"&gt;@steven-matison&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 01:03:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Dynamic-Parameter-Context-ListAzureBlobStorage-SAS/m-p/388984#M246844</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-06-11T01:03:21Z</dc:date>
    </item>
  </channel>
</rss>

