<?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>topic Re: Problem with adding threat indicator via Web Services API in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-with-adding-threat-indicator-via-Web-Services-API/m-p/49639#M3249</link>
    <description>After executing that command, did you execute a publish action?&lt;BR /&gt;Without that, these threat indicators won't be committed.&lt;BR /&gt;Further, they will not take effect.on the gateway until you push the Threat Prevention policy.</description>
    <pubDate>Wed, 03 Apr 2019 01:09:43 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2019-04-03T01:09:43Z</dc:date>
    <item>
      <title>Problem with adding threat indicator via Web Services API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-with-adding-threat-indicator-via-Web-Services-API/m-p/49539#M3244</link>
      <description>&lt;P&gt;Hello mates,&lt;/P&gt;&lt;P&gt;I try to upload threat indicators via Web Services API (R80.20 Take47), but without success. I can see, that the request is processed by management server, but the threat indicator object is not created. I added indicator via mgmt_cli without problems but something wrong with Web Services. Maybe I missed something, but I really don't know what. I need help.&lt;/P&gt;&lt;P&gt;Here is my JSON request body:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;{"name" : "IOC_test_4", "observables" : [{"name":"Observable1","ip-address":"1.2.3.1", "confidence" : "medium","severity" : "low","product" : "AV"}],"action":"Prevent","details-level":"full","ignore-warnings" : true, "comments":"Comment text"}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Got response:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;{u'task-id': u'1abd28ac-325f-4097-94b5-732272eaafe5'}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I found in api.elg logs:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;2019-04-02 09:29:20,182 INFO org.apache.cxf.interceptor.LoggingInInterceptor.log:250 [qtp851195565-25] - Inbound Message&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;----------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ID: 1811&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Address: &lt;A href="http://127.0.0.1:50276/web_api/add-threat-indicator" target="_blank"&gt;http://127.0.0.1:50276/web_api/add-threat-indicator&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Encoding: ISO-8859-1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Http-Method: POST&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Content-Type: application/json&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Headers: {Accept=[*/*], accept-encoding=[gzip, deflate], connection=[keep-alive], Content-Length=[248], content-type=[application/json], Host=[127.0.0.1:50276], User-Agent=[python-requests/2.21.0], X-chkp-sid=[_w5IshidWB4t4brquWvtHwCp_gXSco1Tq-cr2p0Co9Y], X-Forwarded-For=[10.51.20.70], X-Forwarded-Host=[10.51.20.13], X-Forwarded-Host-Port=[443], X-Forwarded-Server=[10.51.20.13]}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Payload: {"name": "IOC_test_4", "ignore-warnings": true, "details-level": "full", "comments": "Comment text", "action": "Prevent", "observables": [{"product": "AV", "confidence": "medium", "name": "Observable1", "ip-address": "1.2.3.1", "severity": "low"}]}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;--------------------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;2019-04-02 09:29:20,186 INFO com.checkpoint.management.web_api_is.utils.helpers.ApiCache.&amp;lt;init&amp;gt;:21 [qtp851195565-25] - Cache created and initialized&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;2019-04-02 09:29:20,187 INFO com.checkpoint.management.web_api.web_services.WebApiEntryPoint.logRequestedCommandInfo:51 [qtp851195565-25] - Executing [add-threat-indicator] of version 1.3 (references 1.2)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;2019-04-02 09:29:20,568 INFO com.checkpoint.management.web_api_is.utils.CsvFileWriterUtils.writeCsvLine:7 [qtp851195565-25] - 2019-04-02,09:29:20 +0200,add-threat-indicator,PASSED,382&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;2019-04-02 09:29:20,569 INFO org.apache.cxf.interceptor.LoggingOutInterceptor.log:250 [qtp851195565-25] - Outbound Message&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;---------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ID: 1811&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Response-Code: 200&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Content-Type: application/json&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Headers: {Content-Type=[application/json], X-chkp-sync-task-id=[1abd28ac-325f-4097-94b5-732272eaafe5], Date=[Tue, 02 Apr 2019 07:29:20 GMT]}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Payload: {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;"task-id" : "1abd28ac-325f-4097-94b5-732272eaafe5"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;So, looks like everithing went OK. I also fou&lt;FONT color="#000000"&gt;nd IOC_test_4_output.xml and IOC_test_4.csv in temp directory&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;[Expert@R8010MGMT:0]# cat /opt/CPsuite-R80.20/fw1/temp/IOC_test_4.csv&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;#! DESCRIPTION = This is user defined IOC file&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;#! REFERENCE = Indicator Bulletin IOC_test_4;April 02 2019&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;# UNIQ-NAME,VALUE,TYPE,CONFIDENCE,SEVERITY,PRODUCT,COMMENT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Observable1,1.2.3.1,IP,medium,low,AV,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;[Expert@R8010MGMT:0]# cat /opt/CPsuite-R80.20/fw1/temp/IOC_test_4_output.xml&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;indicator_parsing_response&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;cp_format&amp;gt;true&amp;lt;/cp_format&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;status&amp;gt;ok&amp;lt;/status&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;indicator uuid="1"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;fileName&amp;gt;/opt/CPsuite-R80.20/fw1/temp/IOC_test_4.csv&amp;lt;/fileName&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;description&amp;gt;This is user defined IOC file&amp;lt;/description&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;reference&amp;gt;Indicator Bulletin IOC_test_4;April 02 2019&amp;lt;/reference&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;Hash_value&amp;gt;6e8d9b6ceb4cbf00082dcaada28f9b01&amp;lt;/Hash_value&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;Observables&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;observable id="18446744069414584330"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;Name&amp;gt;Observable1&amp;lt;/Name&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;type&amp;gt;IP&amp;lt;/type&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;Confidence&amp;gt;Medium&amp;lt;/Confidence&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;Severity&amp;gt;Low&amp;lt;/Severity&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;Product&amp;gt;av&amp;lt;/Product&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;Comment&amp;gt;&amp;lt;/Comment&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;Value&amp;gt;1.2.3.1&amp;lt;/Value&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;/observable&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;/Observables&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;/indicator&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;lt;/indicator_parsing_response&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;So far so good. In SmartConsole I can see, that indicator is added&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scind.png" style="width: 200px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/599iFCF91B4D88510E2F/image-size/small?v=v2&amp;amp;px=200" role="button" title="scind.png" alt="scind.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But that is all. I can not see new indicator in Indicators. In the audit logs, there is no log with new object added (only Log In/Log Out).&lt;/P&gt;&lt;P&gt;Thanks for any response&lt;/P&gt;&lt;P&gt;Juraj Sakala&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 07:50:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-with-adding-threat-indicator-via-Web-Services-API/m-p/49539#M3244</guid>
      <dc:creator>Juraj_Sakala</dc:creator>
      <dc:date>2019-04-02T07:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with adding threat indicator via Web Services API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-with-adding-threat-indicator-via-Web-Services-API/m-p/49639#M3249</link>
      <description>After executing that command, did you execute a publish action?&lt;BR /&gt;Without that, these threat indicators won't be committed.&lt;BR /&gt;Further, they will not take effect.on the gateway until you push the Threat Prevention policy.</description>
      <pubDate>Wed, 03 Apr 2019 01:09:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-with-adding-threat-indicator-via-Web-Services-API/m-p/49639#M3249</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-04-03T01:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with adding threat indicator via Web Services API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-with-adding-threat-indicator-via-Web-Services-API/m-p/49659#M3251</link>
      <description>&lt;P&gt;Thanks, you are absolutely right. I supposed that publishing is automatic like with mgmt_cli, but it is not.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 06:19:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-with-adding-threat-indicator-via-Web-Services-API/m-p/49659#M3251</guid>
      <dc:creator>Juraj_Sakala</dc:creator>
      <dc:date>2019-04-03T06:19:55Z</dc:date>
    </item>
  </channel>
</rss>

