Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-10949

Discovery export to Cloud - will generate a Password protected Zip if previously configured

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.1.2
    • Discovery 3.1.0
    • Assets Discovery
    • None

      Issue Summary

      Insight Discovery on Cloud does not support Password Protected Zip files import.

      If Zip Password was configured in the Discovery tool previously, and Export type is later changed to Cloud, with a valid token - the Zip file exported will be password protected, and will fail to export

      Steps to Reproduce

      1. Configure the Discovery Tool>Export tab to File Copy, and set a Zip Password. Exit the tool to save the configuration
      2. Open the Discovery Tool configuration once more, and set Export Type to Cloud, with a valid token.
      3. Exit the tool and run a scan

      Expected Results

      The scan has finished, and the Scan Result zip was exported to the Cloud Instance

      Actual Results

      The zip file is password protected, and fails to export to Cloud with a 400 Bad Request error

      08-Dec-2021 16:29:55 : saving file: 9211D_00001_Hosts_2021-12-08_1629_0839.xml to folder C:\Users\Yinon\Downloads\Discovery_3.1.0\scans | binary = False
      08-Dec-2021 16:29:55 : Start package process for: 9211D_00001
      08-Dec-2021 16:29:55 : Adding file 9211D_00001_Hosts_2021-12-08_1629_0839.xml to package.
      08-Dec-2021 16:29:55 : Adding file 9211D_Discovery_Settings_2021-12-08_1629_0778.xml to package.
      08-Dec-2021 16:29:55 : Finish building package: C:\Users\Yinon\Downloads\Discovery_3.1.0\scans\9211D_00001_2021-12-08_1629_0159.zip
      08-Dec-2021 16:29:55 : Deleting file: C:\Users\Yinon\Downloads\Discovery_3.1.0\scans\9211D_Discovery_Settings_2021-12-08_1629_0778.xml
      08-Dec-2021 16:29:55 : Deleting file: C:\Users\Yinon\Downloads\Discovery_3.1.0\scans\9211D_00001_Hosts_2021-12-08_1629_0839.xml
      08-Dec-2021 16:29:55 : Start transport process.
      08-Dec-2021 16:29:56 : Token is valid
      08-Dec-2021 16:29:56 : Getting authentication to upload file to Media Server...
      08-Dec-2021 16:29:57 : Authentication granted, uploading file to Media Server...
      08-Dec-2021 16:29:57 : Uploading file...
      08-Dec-2021 16:29:57 : Uploaded file successfully
      08-Dec-2021 16:29:57 : File uploaded, instruction Cloud to execute file...
      08-Dec-2021 16:30:03 : Failed to execute upload
      08-Dec-2021 16:30:03 : Exceptions:
      08-Dec-2021 16:30:03 : Response status code does not indicate success: 400 (Bad Request).
         at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
         at Insight.Discovery.Tools.Cloud.Services.InsightHttpService.<>c__DisplayClass17_0.<<ExecuteUpload>b__0>d.MoveNext() in C:\Source\discovery\DiscoTools\Cloud\Services\InsightHttpService.cs:line 305
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
         at Polly.Retry.AsyncRetryEngine.<ImplementationAsync>d__0`1.MoveNext() in /_/src/Polly/Retry/AsyncRetryEngine.cs:line 69
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Polly.AsyncPolicy`1.<ExecuteAsync>d__13.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Insight.Discovery.Tools.Cloud.Services.InsightHttpService.<ExecuteUpload>d__17.MoveNext() in C:\Source\discovery\DiscoTools\Cloud\Services\InsightHttpService.cs:line 302
      08-Dec-2021 16:30:03 : Could not upload file 9211D_00001_2021-12-08_1629_0159.zip to cloud
      08-Dec-2021 16:30:03 : Exceptions:
      08-Dec-2021 16:30:03 : Failed to execute upload
         at Insight.Discovery.Tools.Cloud.Services.InsightHttpService.<ExecuteUpload>d__17.MoveNext() in C:\Source\discovery\DiscoTools\Cloud\Services\InsightHttpService.cs:line 339
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Insight.Discovery.Tools.Cloud.Services.InsightHttpService.<UploadFile>d__13.MoveNext() in C:\Source\discovery\DiscoTools\Cloud\Services\InsightHttpService.cs:line 171
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
         at Insight.Discovery.Logic.FileTransfer.TransferFile() in C:\Source\discovery\Discovery\Logic\FileTransfer.cs:line 199
      08-Dec-2021 16:30:03 : Response status code does not indicate success: 400 (Bad Request).
         at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
         at Insight.Discovery.Tools.Cloud.Services.InsightHttpService.<>c__DisplayClass17_0.<<ExecuteUpload>b__0>d.MoveNext() in C:\Source\discovery\DiscoTools\Cloud\Services\InsightHttpService.cs:line 305
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
         at Polly.Retry.AsyncRetryEngine.<ImplementationAsync>d__0`1.MoveNext() in /_/src/Polly/Retry/AsyncRetryEngine.cs:line 69
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Polly.AsyncPolicy`1.<ExecuteAsync>d__13.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
         at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Insight.Discovery.Tools.Cloud.Services.InsightHttpService.<ExecuteUpload>d__17.MoveNext() in C:\Source\discovery\DiscoTools\Cloud\Services\InsightHttpService.cs:line 302
      08-Dec-2021 16:30:03 : Finished transport process. 

      Workaround

      Either enter Dioscovery Tool Configuration>Export Tab, select File Copy, delete the Zip Password, exit the tool, then enter configuration once more, and set Cloud as the Export Type (with a Valid Token), or - manually edit the discovery.cfg file by deleting the Hash value for the Zip PW in the <ExportZipPassword> tag, followed by the Discovery tool service restart (discovery.exe -u >>> discovery.exe -i )

              Unassigned Unassigned
              8cdc82c96fd5 Yinon Negev
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: