*** Settings *** Force Tags tsg_adc_wp adc_api security_policy Library OperatingSystem Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot Resource ../../../02-Keyword/tsg_adc/FileOperation.robot Resource ../../../02-Keyword/tsg_adc/FileOperation.robot Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot Resource ../../../03-Variable/ApplicationID.txt *** Variables *** ${url} /v1/policy/profile/responsepages *** Test Cases *** SecurityPolicy-Deny-Http-00001 [Tags] fqdn完整匹配 update policy:source ip_geo,fqdn Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.lkong.net ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建ip geo ${addItemList1} Create Dictionary keywordArray=XXG地区.* ${addItemLists} Create list ${addItemList1} ${objectDict} Create Dictionary objectType=ip objectSubType=geo_location isValid=${1} addItemList=${addItemLists} ${rescode} ${objectId1} AddObjects ${1} ${objectDict} Comment 创建fqdn2 ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*lkong.net ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00001 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId ${objectId} insert_policyId_to_file1 deny_http_objectId35 ${objectId1} insert_policyId_to_file1 deny_http_objectId36 ${objectId2} insert_policyId_to_file1 deny_http_policyId ${policyId} SecurityPolicy-Deny-Http-00002 [Tags] cat右匹配 Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*bellaircraftmuseum.org ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00002 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"rst"} filterList=150|TSG_FIELD_HTTP_HOST,${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId1 ${objectId} insert_policyId_to_file1 deny_http_policyId1 ${policyId} SecurityPolicy-Deny-Http-00003 [Tags] url4种匹配 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*/news/,$www.icbc.com.cn/,www.gotohoroscope*,indexv ${rescode} ${objectId} AddObject2 ${1} ${objectDict} #创建引用文件 ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages ${profiledId} Get From Dictionary ${response} profileId Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00003 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"block","code":403,"html_profile":${profiledId}} filterList=${objectId}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId2 ${objectId} insert_policyId_to_file1 deny_http_policyId2 ${policyId} insert_policyId_to_file1 deny_http_profiledId ${profiledId} SecurityPolicy-Deny-Http-00004 [Tags] 请求头左匹配 update policy:url 请求头 Comment 创建请求头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*sveden ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} Comment 创建请求头2 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0|User-Agent ${rescode} ${objectId_req_Id} AddObject2 ${1} ${objectDict} Comment 创建url2 ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=tsutmb ${rescode} ${object_url_Id2} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00004 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"block","code":404,"message":"yyyyy"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId3 ${object_url_Id} insert_policyId_to_file1 deny_http_objectId4 ${objectId} insert_policyId_to_file1 deny_http_objectId37 ${objectId_req_Id} insert_policyId_to_file1 deny_http_objectId38 ${object_url_Id2} insert_policyId_to_file1 deny_http_policyId3 ${policyId} SecurityPolicy-Deny-Http-00005 [Tags] 请求头完整匹配 Comment 创建请求头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*a.com/cn/ ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00005 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId5 ${object_url_Id} insert_policyId_to_file1 deny_http_objectId6 ${objectId} insert_policyId_to_file1 deny_http_policyId4 ${policyId} SecurityPolicy-Deny-Http-00006 [Tags] 请求头字串匹配 Comment 创建请求头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=AppleWebKit|User-Agent ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=egypt.travel ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00006 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"alert","code":200,"message":"网站被阻断"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId7 ${object_url_Id} insert_policyId_to_file1 deny_http_objectId8 ${objectId} insert_policyId_to_file1 deny_http_policyId5 ${policyId} SecurityPolicy-Deny-Http-00007 [Tags] 请求头右匹配 Comment 创建请求头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*download.shtml ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} #创建引用文件 ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages ${profiledId} Get From Dictionary ${response} profileId Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00007 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} filterList=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId9 ${object_url_Id} insert_policyId_to_file1 deny_http_objectId10 ${objectId} insert_policyId_to_file1 deny_http_policyId6 ${policyId} insert_policyId_to_file1 deny_http_profiledId1 ${profiledId} SecurityPolicy-Deny-Http-00008 [Tags] 应答头右匹配 update policy:应答头 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*index.aspx ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*utf-8|Content-Type ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建应答头2 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=utf-8|Content-Type ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00008 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"rst"} filterList=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId11 ${object_url_Id} insert_policyId_to_file1 deny_http_objectId12 ${objectId} insert_policyId_to_file1 deny_http_objectId39 ${objectId1} insert_policyId_to_file1 deny_http_policyId7 ${policyId} SecurityPolicy-Deny-Http-00009 [Tags] 应答头完整匹配 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.skycn.com ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00009 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId13 ${object_url_Id} insert_policyId_to_file1 deny_http_objectId14 ${objectId} insert_policyId_to_file1 deny_http_policyId8 ${policyId} SecurityPolicy-Deny-Http-00010 [Tags] 应答头字串匹配 update policy:destination ip learning Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.avaxsearch.com ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html|Content-Type ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00010 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId15 ${object_url_Id} insert_policyId_to_file1 deny_http_objectId16 ${objectId} insert_policyId_to_file1 deny_http_policyId9 ${policyId} SecurityPolicy-Deny-Http-00011 [Tags] 应答头右匹配 Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=finestquotes.com ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00011 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId17 ${object_url_Id} insert_policyId_to_file1 deny_http_objectId18 ${objectId} insert_policyId_to_file1 deny_http_policyId10 ${policyId} SecurityPolicy-Deny-Http-00012 [Tags] cookie字串匹配 Comment 创建cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=ipp_uid2|Cookie ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00012 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"block","code":404,"message":"马上到周末"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId19 ${objectId} insert_policyId_to_file1 deny_http_policyId11 ${policyId} SecurityPolicy-Deny-Http-00013 [Tags] set-cookie4种匹配 Comment 创建set-cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=CURRENT_CITY_CODE*|Set-Cookie,ASP.NET_SessionId*|Set-Cookie,PHPSESSID|Set-Cookie,oKD0_802a*|Set-Cookie ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00013 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${objectId}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId20 ${objectId} insert_policyId_to_file1 deny_http_policyId12 ${policyId} SecurityPolicy-Deny-Http-00014 [Tags] 请求体字串匹配 update policy:请求体 Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} Comment 创建请求体 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=testDenyHttp0014 ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建请求体2 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=biubiubiud ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00014 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${objectId}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${0} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId43 ${object_fqdn_Id} insert_policyId_to_file1 deny_http_objectId21 ${objectId} insert_policyId_to_file1 deny_http_objectId40 ${objectId1} insert_policyId_to_file1 deny_http_policyId13 ${policyId} SecurityPolicy-Deny-Http-00015 [Tags] 应答体字串匹配 update policy:返回体 Comment 创建应答体 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=华彤公司 ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建应答体2 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=华彤集团官网 ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00015 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${objectId}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId22 ${objectId} insert_policyId_to_file1 deny_http_objectId41 ${objectId1} insert_policyId_to_file1 deny_http_policyId14 ${policyId} SecurityPolicy-Deny-Http-00016 [Tags] 最大组合1 Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} Comment 创建请求头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent ${rescode} ${object_qq_Id} AddObject2 ${1} ${objectDict} Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type ${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict} Comment 创建请求体 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=DenyHttp0016 ${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00016 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_qq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR,${object_body_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${0} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId23 ${object_fqdn_Id} insert_policyId_to_file1 deny_http_objectId24 ${object_url_Id} insert_policyId_to_file1 deny_http_objectId25 ${object_qq_Id} insert_policyId_to_file1 deny_http_objectId26 ${object_yd_Id} insert_policyId_to_file1 deny_http_objectId27 ${object_body_Id} insert_policyId_to_file1 deny_http_policyId15 ${policyId} SecurityPolicy-Deny-Http-00017 [Tags] 最大组合2 Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*smspunch.net ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} Comment 创建url ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*send-free-sms.aspx ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} Comment 创建cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie ${rescode} ${object_qq_Id} AddObject2 ${1} ${objectDict} Comment 创建set-cookie ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=NET_SessionId|Set-Cookie ${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict} Comment 创建应答体 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Cell No ${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00017 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_qq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR,${object_body_Id}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId28 ${object_fqdn_Id} insert_policyId_to_file1 deny_http_objectId29 ${object_url_Id} insert_policyId_to_file1 deny_http_objectId30 ${object_qq_Id} insert_policyId_to_file1 deny_http_objectId31 ${object_yd_Id} insert_policyId_to_file1 deny_http_objectId32 ${object_body_Id} insert_policyId_to_file1 deny_http_policyId16 ${policyId} SecurityPolicy-Deny-Http-00018 [Tags] 多源ip对象 Comment 创建第二个源IP ${addItemList1} Create Dictionary isSession=endpoint ip=192.168.50.11-192.168.50.18 port=0-0 direction=0 protocol=0 isInitialize=0 ${addItemLists} Create list ${addItemList1} ${objectDict} Create Dictionary objectType=ip objectSubType=endpoint isValid=${1} addItemList=${addItemLists} ${rescode} ${objectId} AddObjects ${1} ${objectDict} Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.hebbank.com ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00018 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID} source=${objectId}|TSG_SECURITY_SOURCE_ADDR log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_objectId33 ${objectId} insert_policyId_to_file1 deny_http_objectId34 ${object_fqdn_Id} insert_policyId_to_file1 deny_http_policyId17 ${policyId} SecurityPolicy-Deny-Http-00019 [Tags] the minimum match ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00019 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} isValid=${0} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] insert_policyId_to_file1 deny_http_policyId18 ${policyId}