From 78495d8cff0f081cbfc445c3eb561564e643a1d8 Mon Sep 17 00:00:00 2001 From: hebingning Date: Mon, 8 Feb 2021 18:33:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=83=A8=E5=88=86=E5=9B=A0?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E7=9B=B8=E4=BA=92=E5=BD=B1=E5=93=8D=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E7=AD=96=E7=95=A5=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../multi_step/a_Allow_Ssl_Tests.robot | 9 ++++----- .../tsg_adc/multi_step/a_Deny_Dns_Tests.robot | 13 +++++++----- .../multi_step/a_Deny_Http_Tests.robot | 2 +- .../multi_step/a_Deny_Mail_Tests.robot | 4 ++-- .../tsg_adc/multi_step/a_Deny_Ssl_Tests.robot | 10 +++++----- .../tsg_adc/multi_step/a_Deny_Tests.robot | 12 +++++------ .../multi_step/b_Allow_Ssl_Tests.robot | 6 +++--- .../tsg_adc/multi_step/b_Allow_Tests.robot | 5 +++++ .../tsg_adc/multi_step/b_Deny_Dns_Tests.robot | 2 +- .../tsg_adc/multi_step/b_Deny_Ftp_Tests.robot | 4 ++-- .../multi_step/b_Deny_Http_Tests.robot | 4 ++-- .../tsg_adc/multi_step/b_Deny_Tests.robot | 20 +++++++++++++++---- .../multi_step/c_Allow_Http_Tests.robot | 2 +- .../multi_step/c_Allow_Ssl_Tests.robot | 4 ++-- .../tsg_adc/multi_step/c_Deny_Dns_Tests.robot | 8 +++++--- .../multi_step/c_Deny_Http_Tests.robot | 2 +- .../tsg_adc/multi_step/c_Deny_Ssl_Tests.robot | 2 +- .../tsg_adc/multi_step/c_Deny_Tests.robot | 2 +- .../curl/command/ProxyPolicy_Deny_00009.bat | 2 +- .../curl/command/ProxyPolicy_Deny_00014.bat | 2 +- .../command/ProxyPolicy_redirect_00015.bat | 5 ++++- .../SecurityPolicy_Allow_SSL_00002.bat | 2 +- .../SecurityPolicy_Deny_HTTP_00014.bat | 2 +- .../command/SecurityPolicy_Deny_SSL_00001.bat | 2 +- .../SecurityPolicy_Deny_SSL_00001_1.bat | 2 +- .../command/SecurityPolicy_Deny_SSL_00002.bat | 2 +- .../SecurityPolicy_Deny_SSL_00002_2.bat | 2 +- 27 files changed, 78 insertions(+), 54 deletions(-) diff --git a/01-TestCase/tsg_adc/multi_step/a_Allow_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Allow_Ssl_Tests.robot index f0b4115..0e9c02e 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Allow_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Allow_Ssl_Tests.robot @@ -26,15 +26,14 @@ SecurityPolicy-Allow-Ssl-00001 SecurityPolicy-Allow-Ssl-00002 [Tags] cat右匹配 - #Comment 创建cat - # ${fqdn_category} Set Variable ${Empty} - # ${objectDict} Create Dictionary objectType=${fqdn_category} isValid=${1} addItemList=*youtube.com - #${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*protonmail.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-Ssl-00002 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SSL"} filterList=168|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] - #insert_policyId_to_file1 allow_ssl_objectId1 ${objectId} + insert_policyId_to_file1 allow_ssl_objectId1 ${objectId} insert_policyId_to_file1 allow_ssl_policyId1 ${policyId} diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Dns_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Dns_Tests.robot index 36854cc..ef7add1 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Dns_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Dns_Tests.robot @@ -34,8 +34,8 @@ SecurityPolicy-Deny-Dns-00001 SecurityPolicy-Deny-Dns-00002 [Tags] cat右和完整匹配 - Comment 创建cat - # ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*yhd.com,$www.vk.com + # Comment 创建cat + # ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*yhd.com,$www.vk.com # ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Dns-00002 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"DNS","method":"redirect","resolution":[{"qtype":"A","answer":[{"atype":"CNAME","value":"www.jd.com","ttl":{"min":500,"max":500}},{"atype":"A","value":"192.168.41.186","ttl":{"min":300,"max":300}}]}]} filterList=103|TSG_FIELD_DNS_QNAME isValid=${1} appIdObjects=${DNS_ID} @@ -48,15 +48,18 @@ SecurityPolicy-Deny-Dns-00002 SecurityPolicy-Deny-Dns-00003 [Tags] cat - # ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*ya.ru - # ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*aec188.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*huitu.com + ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Dns-00003 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"DNS","method":"redirect","resolution":[{"qtype":"AAAA","answer":[{"atype":"AAAA","value":"fc00::2:11","ttl":{"min":400,"max":400}},{"atype":"CNAME","value":"www.taobao.com","ttl":{"min":600,"max":600}}]}]} filterList=129|TSG_FIELD_DNS_QNAME isValid=${1} appIdObjects=${DNS_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] - #insert_policyId_to_file1 deny_dns_objectId2 ${objectId} + insert_policyId_to_file1 deny_dns_objectId2 ${objectId} + insert_policyId_to_file1 deny_dns_objectId6 ${objectId1} insert_policyId_to_file1 deny_dns_policyId2 ${policyId} SecurityPolicy-Deny-Dns-00004 diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot index d2c879f..a6e2e82 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot @@ -260,7 +260,7 @@ SecurityPolicy-Deny-Http-00013 SecurityPolicy-Deny-Http-00014 [Tags] 请求体字串匹配 update policy:请求体 Comment 创建请求体 - ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test + ${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 diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Mail_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Mail_Tests.robot index dfb72cd..3ff4f0e 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Mail_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Mail_Tests.robot @@ -185,7 +185,7 @@ SecurityPolicy-Deny-Mail-00010 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=tomor* ${rescode} ${object_Subject_Id} AddObject2 ${1} ${objectDict} Comment 创建To - ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=he* + ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=hebing* ${rescode} ${object_To_Id} AddObject2 ${1} ${objectDict} Comment 创建安全策略 ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00010 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"MAIL","method":"rst"} filterList=${object_To_Id}|TSG_FIELD_MAIL_TO,${object_Subject_Id}|TSG_FIELD_MAIL_SUBJECT isValid=${1} appIdObjects=${MAIL_ID} @@ -279,7 +279,7 @@ SecurityPolicy-Deny-Mail-00015 ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Простопорно ${rescode} ${object_ATT_CONT_Id} AddObject2 ${1} ${objectDict} Comment 创建From - ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=1310330 + ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=hebing ${rescode} ${object_From_Id} AddObject2 ${1} ${objectDict} Comment 创建To ${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=geedge diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Ssl_Tests.robot index dc72196..f3dc2b1 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Ssl_Tests.robot @@ -36,16 +36,16 @@ SecurityPolicy-Deny-Ssl-00001 SecurityPolicy-Deny-Ssl-00002 [Tags] cn cat右匹配 - #Comment 创建cat - # ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*vip.com,*berkeleygroup.co.uk - # ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*amesweb.info,*rentar.com + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Ssl-00002 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SSL","method":"rst"} filterList=153|TSG_FIELD_SSL_CN isValid=${1} appIdObjects=${SSL_ID} + ${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Ssl-00002 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SSL","method":"rst"} filterList=153|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID} log ${policyDict} ${rescode} ${policyId} AddPolicies 1 ${policyDict} v2 ${policyId} Get-Pids ${policyId} ${policyId} Set Variable ${policyId}[0] - #insert_policyId_to_file1 deny_ssl_objectId1 ${objectId} + insert_policyId_to_file1 deny_ssl_objectId1 ${objectId} insert_policyId_to_file1 deny_ssl_policyId1 ${policyId} SecurityPolicy-Deny-Ssl-00003 diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Tests.robot index b24313a..479dcb4 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Tests.robot @@ -273,15 +273,15 @@ Proxy-Policy-deny-00008 Proxy-Policy-deny-00009 [Tags] 应答头完整匹配 Comment 创建fqdn - ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*ljale.com + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*cuctv.com ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建url - ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=webdir.html + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=cuctv ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} - Comment 创建请求头 + Comment 创建应答头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=utf-8|Content-Type ${rescode} ${objectId2} AddObject2 ${1} ${objectDict} - Comment #创建引用文件 + Comment 创建引用文件 ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages ${profiledId} Get From Dictionary ${response} profileId Comment Comment 创建拦截策略 @@ -309,7 +309,7 @@ Proxy-Policy-deny-00010 ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*duckduckmoose.com ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建url - ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=learn + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=duckduck ${rescode} ${objectId1} AddObject2 ${1} ${objectDict} Comment 创建请求头 ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html|Content-Type @@ -430,7 +430,7 @@ Proxy-Policy-deny-00013 Proxy-Policy-deny-00014 [Tags] 请求体字串匹配 update policy:请求体 Comment 创建请求体 - ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=1234567 + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=denyTest001401 ${rescode} ${objectId} AddObject2 ${1} ${objectDict} Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com diff --git a/01-TestCase/tsg_adc/multi_step/b_Allow_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Allow_Ssl_Tests.robot index dcd3808..b4a20c0 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Allow_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Allow_Ssl_Tests.robot @@ -18,7 +18,7 @@ SecurityPolicy-Allow-Ssl-00001 SecurityPolicy-Allow-Ssl-00002 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_SSL_00002.bat - ... ELSE set variable curl https://gdepoest.kz/ - ${stringlist} run keyword if '${systemType}'=='Windows' Create List Где поесть - ... ELSE Create List Где поесть + ... ELSE set variable curl -kv https://protonmail.com/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango Secure Secure email + ... ELSE Create List Secure email ${rescode} SystemCommands ${commandstr} ${stringlist} diff --git a/01-TestCase/tsg_adc/multi_step/b_Allow_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Allow_Tests.robot index f2dfd03..8ce35c6 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Allow_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Allow_Tests.robot @@ -30,6 +30,11 @@ Proxy-Policy-allow-00001 ... ELSE set variable curl -kv https://games.sina.com.cn/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List 新浪游戏 Tango Secure Gateway CA ... ELSE Create List 新浪游戏 Tango Secure Gateway CA + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00001_1.bat + ... ELSE set variable curl -kv https://games.sina.com.cn/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 新浪游戏 Tango Secure Gateway CA + ... ELSE Create List 新浪游戏 Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-allow-00002 Comment 功能端验证HTTP验证 diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Dns_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Dns_Tests.robot index 38700dc..b621f25 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Dns_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Dns_Tests.robot @@ -56,7 +56,7 @@ SecurityPolicy-Deny-Dns-00002 SecurityPolicy-Deny-Dns-00003 Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d ace188.com 8.8.8.8 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d aec188.com 8.8.8.8 ... ELSE set variable nslookup -debug -query=AAAA harfordemcomm.org ${stringlist} run keyword if '${systemType}'=='Windows' Create List fc00::2:11 www.taobao.com ttl = 400 ... ELSE Create List fc00::2:11 www.taobao.com ttl = 400 diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Ftp_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Ftp_Tests.robot index 7a2d39f..ff6e3d1 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Ftp_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Ftp_Tests.robot @@ -13,14 +13,14 @@ Resource ../../../05-Other/AllFlowCaseVariable.txt *** Test Cases *** SecurityPolicy-Deny-Ftp-00001 Comment 功能端验证 - ${FTP} FTP_login ftp://192.168.40.158/123456.txt -u"ftp_user:111111" 123456789 + ${FTP} FTP_login ftp://192.168.40.158//home/ftpuser/123456.txt -u ftpuser:111111 123456789 should contain ${FTP} ftp_fail Comment 改变阻断策略 ${policyDict} Create Dictionary policyId=${deny_ftp_policyId} source=${deny_ftp_objectId12}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Deny-FTP-00001-1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"FTP","method":"drop"} filterList=${deny_ftp_objectId13}|TSG_FIELD_FTP_ACCOUNT,${deny_ftp_objectId15}|TSG_FIELD_FTP_CONTENT,${deny_ftp_objectId14}|TSG_FIELD_FTP_URI isValid=${1} appIdObjects=${FTP_ID} log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update Comment 功能端验证 - ${FTP} FTP_login ftp://192.168.40.158/123456.txt -u"ftp_user:111111" 123456789 + ${FTP} FTP_login ftp://192.168.40.158//home/ftpuser/123456.txt -u ftpuser:111111 123456789 should contain ${FTP} ftp_fail SecurityPolicy-Deny-Ftp-00002 diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot index 5d45e30..85ec2b4 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot @@ -193,7 +193,7 @@ SecurityPolicy-Deny-Http-00013 SecurityPolicy-Deny-Http-00014 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00014.bat - ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"1234567","setcook":"12345678","contenttype": "content-type","responsebody": "Response Body"}" http://open.node.com/go + ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"testDenyHttp0014","setcook":"12345678","contenttype": "content-type","responsebody": "testDenyHttp0014"}" http://open.node.com/go ${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found ... ELSE Create List Connection reset by peer ${rescode} SystemCommands ${commandstr} ${stringlist} @@ -203,7 +203,7 @@ SecurityPolicy-Deny-Http-00014 ${rescode} UpdatePolicies 1 ${policyDict} v2 update Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00014.bat - ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"1234567","setcook":"12345678","contenttype": "content-type","responsebody": "Response Body"}" http://open.node.com/go + ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"biubiubiud","setcook":"12345678","contenttype": "content-type","responsebody": "biubiubiud"}" http://open.node.com/go ${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found ... ELSE Create List Connection reset by peer ${rescode} SystemCommands ${commandstr} ${stringlist} diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Tests.robot index 5c08f59..2cc023d 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Tests.robot @@ -67,6 +67,11 @@ Proxy-Policy-deny-00003 ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-deny-00004 + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00004.bat + ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.usdebtclock.org/state-debt-clocks/state-of-california-debt-clock.html + ${stringlist} run keyword if '${systemType}'=='Windows' Create List qwertyuiop Tango Secure Gateway CA + ... ELSE Create List qwertyuiop Tango Secure Gateway CA Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00004.bat ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.usdebtclock.org/state-debt-clocks/state-of-california-debt-clock.html @@ -81,6 +86,7 @@ Proxy-Policy-deny-00004 ${policyDict} Create Dictionary policyId=${deny_policyId3} policyName=Proxy-Policy-deny-00004-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"qwertyuiop","code":404,"protocol":"HTTP"} filterList=${deny_objectId48}|TSG_FIELD_HTTP_URL,${deny_objectId49}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update + sleep 3 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00004_1.bat ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://bbs.nga.cn/ @@ -103,7 +109,13 @@ Proxy-Policy-deny-00006 ${stringlist} run keyword if '${systemType}'=='Windows' Create List 明天大涨 Tango Secure Gateway CA ... ELSE Create List 明天大涨 Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} - + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00006.bat + ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.playgroundsessions.com/about/software-features + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 明天大涨 Tango Secure Gateway CA + ... ELSE Create List 明天大涨 Tango Secure Gateway CA + ${rescode} SystemCommands ${commandstr} ${stringlist} + Proxy-Policy-deny-00007 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00007.bat @@ -137,9 +149,9 @@ Proxy-Policy-deny-00008 Proxy-Policy-deny-00009 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00009.bat - ... ELSE set variable curl http://www.ljale.com/home/webdir.html - ${stringlist} run keyword if '${systemType}'=='Windows' Create List Timed out - ... ELSE Create List Timed out + ... ELSE set variable curl http://www.cuctv.com/ + ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 + ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-deny-00010 diff --git a/01-TestCase/tsg_adc/multi_step/c_Allow_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/c_Allow_Http_Tests.robot index 1a0c929..b8f5ba6 100644 --- a/01-TestCase/tsg_adc/multi_step/c_Allow_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/c_Allow_Http_Tests.robot @@ -30,7 +30,7 @@ SecurityPolicy-Allow-Http-00002 ${s} Convert to String ${allow_http_policyId1} GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host scoutbahamas -SecurityPolicy-Allow-Http-00003 +# SecurityPolicy-Allow-Http-00003 #删除对象 # ${objectids} set Variable ${allow_http_objectId2} #删除策略 diff --git a/01-TestCase/tsg_adc/multi_step/c_Allow_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/c_Allow_Ssl_Tests.robot index 52c7172..6914975 100644 --- a/01-TestCase/tsg_adc/multi_step/c_Allow_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/c_Allow_Ssl_Tests.robot @@ -24,8 +24,8 @@ SecurityPolicy-Allow-Ssl-00001 SecurityPolicy-Allow-Ssl-00002 #删除对象 - #${objectids} set Variable ${allow_ssl_objectId1} + ${objectids} set Variable ${allow_ssl_objectId1} #删除策略 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_ssl_policyId1}]} ${s} Convert to String ${allow_ssl_policyId1} - GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni gdepoest + GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni protonmail.com diff --git a/01-TestCase/tsg_adc/multi_step/c_Deny_Dns_Tests.robot b/01-TestCase/tsg_adc/multi_step/c_Deny_Dns_Tests.robot index 1f28362..7cc0c77 100644 --- a/01-TestCase/tsg_adc/multi_step/c_Deny_Dns_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/c_Deny_Dns_Tests.robot @@ -26,7 +26,7 @@ SecurityPolicy-Deny-Dns-00001 SecurityPolicy-Deny-Dns-00002 #删除对象 - #${objectids} set Variable ${deny_dns_objectId1} + # ${objectids} set Variable ${deny_dns_objectId1} #删除策略 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_dns_policyId1}]} ${s} Convert to String ${deny_dns_policyId1} @@ -35,11 +35,13 @@ SecurityPolicy-Deny-Dns-00002 SecurityPolicy-Deny-Dns-00003 #删除对象 - # ${objectids} set Variable ${deny_dns_objectId2} + ${objectids} set Variable ${deny_dns_objectId2} + ${objectids} Catenate SEPARATOR=, ${objectids} ${deny_dns_objectId6} #删除策略 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_dns_policyId2}]} ${s} Convert to String ${deny_dns_policyId2} - GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname ya.ru + GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname huitu + GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname aec188.com SecurityPolicy-Deny-Dns-00004 #删除对象 diff --git a/01-TestCase/tsg_adc/multi_step/c_Deny_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/c_Deny_Http_Tests.robot index 5fa1ccb..c45754a 100644 --- a/01-TestCase/tsg_adc/multi_step/c_Deny_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/c_Deny_Http_Tests.robot @@ -24,7 +24,7 @@ SecurityPolicy-Deny-Http-00001 #删除策略 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId}]} ${s} Convert to String ${deny_http_policyId} - GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host webalta.ru + GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.lkong.net SecurityPolicy-Deny-Http-00002 #删除对象 diff --git a/01-TestCase/tsg_adc/multi_step/c_Deny_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/c_Deny_Ssl_Tests.robot index ee9d34e..e25d147 100644 --- a/01-TestCase/tsg_adc/multi_step/c_Deny_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/c_Deny_Ssl_Tests.robot @@ -27,7 +27,7 @@ SecurityPolicy-Deny-Ssl-00001 SecurityPolicy-Deny-Ssl-00002 #删除对象 - #${objectids} set Variable ${deny_ssl_objectId1} + ${objectids} set Variable ${deny_ssl_objectId1} #删除策略 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_ssl_policyId1}]} ${s} Convert to String ${deny_ssl_policyId1} diff --git a/01-TestCase/tsg_adc/multi_step/c_Deny_Tests.robot b/01-TestCase/tsg_adc/multi_step/c_Deny_Tests.robot index 64293f4..2f6f483 100644 --- a/01-TestCase/tsg_adc/multi_step/c_Deny_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/c_Deny_Tests.robot @@ -138,7 +138,7 @@ Proxy-Policy-deny-00009 ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId8}]} ${policyIds} Create List ${policyId1} ${policyId2} ${s} Convert to String ${deny_policyId8} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.ljale.com + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.cuctv.com Proxy-Policy-deny-00010 #删除文件 diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00009.bat b/05-Other/curl/command/ProxyPolicy_Deny_00009.bat index c280f43..6cb41af 100644 --- a/05-Other/curl/command/ProxyPolicy_Deny_00009.bat +++ b/05-Other/curl/command/ProxyPolicy_Deny_00009.bat @@ -1 +1 @@ -curl http://www.ljale.com/home/webdir.html | iconv -f utf-8 -t gbk \ No newline at end of file +curl http://www.cuctv.com/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_Deny_00014.bat b/05-Other/curl/command/ProxyPolicy_Deny_00014.bat index d8d7ac9..94a050e 100644 --- a/05-Other/curl/command/ProxyPolicy_Deny_00014.bat +++ b/05-Other/curl/command/ProxyPolicy_Deny_00014.bat @@ -1 +1 @@ -curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"1234567\",\"setcook\":\"12345678\",\"contenttype\": \"content-type\",\"responsebody\": \"Response Body\"}" http://open.node.com/go | iconv -f utf-8 -t gbk \ No newline at end of file +curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"denyTest001401\",\"setcook\":\"12345678\",\"contenttype\": \"content-type\",\"responsebody\": \"Response Body\"}" http://open.node.com/go | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/ProxyPolicy_redirect_00015.bat b/05-Other/curl/command/ProxyPolicy_redirect_00015.bat index edda56e..136d208 100644 --- a/05-Other/curl/command/ProxyPolicy_redirect_00015.bat +++ b/05-Other/curl/command/ProxyPolicy_redirect_00015.bat @@ -1,4 +1,7 @@ -curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=tyuiop&setCookie=asdf&contentType=content-type&resBody=adzx" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/go | iconv -f utf-8 -t gbk +curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"testredirect0015\",\"setcook\":\"monitortest142\",\"contenttype\": \"content-type\",\"responsebody\": \"testredirect0014002\"}" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/go | iconv -f utf-8 -t gbk + + + diff --git a/05-Other/curl/command/SecurityPolicy_Allow_SSL_00002.bat b/05-Other/curl/command/SecurityPolicy_Allow_SSL_00002.bat index 581ec04..4b346af 100644 --- a/05-Other/curl/command/SecurityPolicy_Allow_SSL_00002.bat +++ b/05-Other/curl/command/SecurityPolicy_Allow_SSL_00002.bat @@ -1 +1 @@ -curl https://gdepoest.kz/ | iconv -f utf-8 -t gbk \ No newline at end of file +curl -kv https://protonmail.com/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/SecurityPolicy_Deny_HTTP_00014.bat b/05-Other/curl/command/SecurityPolicy_Deny_HTTP_00014.bat index d8d7ac9..0bdd8c0 100644 --- a/05-Other/curl/command/SecurityPolicy_Deny_HTTP_00014.bat +++ b/05-Other/curl/command/SecurityPolicy_Deny_HTTP_00014.bat @@ -1 +1 @@ -curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"1234567\",\"setcook\":\"12345678\",\"contenttype\": \"content-type\",\"responsebody\": \"Response Body\"}" http://open.node.com/go | iconv -f utf-8 -t gbk \ No newline at end of file +curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"testDenyHttp0014\",\"setcook\":\"12345678\",\"contenttype\": \"content-type\",\"responsebody\": \"testDenyHttp0014\"}" http://open.node.com/go | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/SecurityPolicy_Deny_SSL_00001.bat b/05-Other/curl/command/SecurityPolicy_Deny_SSL_00001.bat index 96f74ad..44d4477 100644 --- a/05-Other/curl/command/SecurityPolicy_Deny_SSL_00001.bat +++ b/05-Other/curl/command/SecurityPolicy_Deny_SSL_00001.bat @@ -1 +1 @@ -curl https://amesweb.info/ | iconv -f utf-8 -t gbk \ No newline at end of file +curl https://www.freestockimages.ru/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/SecurityPolicy_Deny_SSL_00001_1.bat b/05-Other/curl/command/SecurityPolicy_Deny_SSL_00001_1.bat index 2be0e2d..a19bab2 100644 --- a/05-Other/curl/command/SecurityPolicy_Deny_SSL_00001_1.bat +++ b/05-Other/curl/command/SecurityPolicy_Deny_SSL_00001_1.bat @@ -1 +1 @@ -curl https://rentar.com/ | iconv -f utf-8 -t gbk \ No newline at end of file +curl https://www.cxwl.com/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/SecurityPolicy_Deny_SSL_00002.bat b/05-Other/curl/command/SecurityPolicy_Deny_SSL_00002.bat index 2b6c7d1..96f74ad 100644 --- a/05-Other/curl/command/SecurityPolicy_Deny_SSL_00002.bat +++ b/05-Other/curl/command/SecurityPolicy_Deny_SSL_00002.bat @@ -1 +1 @@ -curl https://iitu.kz/ru/ | iconv -f utf-8 -t gbk \ No newline at end of file +curl https://amesweb.info/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/SecurityPolicy_Deny_SSL_00002_2.bat b/05-Other/curl/command/SecurityPolicy_Deny_SSL_00002_2.bat index 91d6ccc..fbcebed 100644 --- a/05-Other/curl/command/SecurityPolicy_Deny_SSL_00002_2.bat +++ b/05-Other/curl/command/SecurityPolicy_Deny_SSL_00002_2.bat @@ -1 +1 @@ -curl https://kaznu.kz/ | iconv -f utf-8 -t gbk \ No newline at end of file +curl https://rentar.com/ | iconv -f utf-8 -t gbk \ No newline at end of file