|
|
|
|
@@ -5,6 +5,9 @@ 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
|
|
|
|
|
esource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
|
|
|
|
|
Resource ../../../03-Variable/ApplicationID.txt
|
|
|
|
|
Resource ../../../05-Other/AllFlowCaseVariable.txt
|
|
|
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
Proxy-Policy-deny-00001
|
|
|
|
|
@@ -14,11 +17,25 @@ Proxy-Policy-deny-00001
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 重新开始 Tango Secure Gateway CA
|
|
|
|
|
... ELSE Create List 重新开始 Tango Secure Gateway CA
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
Comment 改变拦截策略
|
|
|
|
|
${policyDict} Create Dictionary policyId=${intercept_deny_policyId} source=${deny_objectId46}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Intercept-deny-1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${deny_objectId47}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
|
|
|
|
|
log ${policyDict}
|
|
|
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
|
|
|
Comment 改变阻断策略
|
|
|
|
|
${policyDict} Create Dictionary policyId=${deny_policyId} source=${deny_objectId46}|TSG_SECURITY_SOURCE_LOCATION policyName=Proxy-Policy-deny-00001-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"重新开始","code":403,"protocol":"HTTP"} filterList=${deny_objectId47}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
|
|
|
|
|
log ${policyDict}
|
|
|
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00001.bat
|
|
|
|
|
... ELSE set variable curl -kv \ https://newsela.com/about/content/
|
|
|
|
|
${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-00002
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00002.bat
|
|
|
|
|
... ELSE set variable curl -kv \ \ https://www.villaday.com/villageList
|
|
|
|
|
... ELSE set variable curl -kv \ \ https://www.hugedomains.com/domain_profile.cfm?d=bagarres&e=com
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable Tango Secure Gateway CA
|
|
|
|
|
... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable Tango Secure Gateway CA
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
@@ -26,25 +43,25 @@ Proxy-Policy-deny-00002
|
|
|
|
|
Proxy-Policy-deny-00003
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003.bat
|
|
|
|
|
... ELSE set variable curl -kv \ https://www.wmtransfer.com/eng/business/accept-payments/online-shop/widget.shtml
|
|
|
|
|
... ELSE set variable curl -kv \ https://railways.kz/
|
|
|
|
|
${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_00003_1.bat
|
|
|
|
|
... ELSE set variable curl -kv \ https://www.banbaowang.com/shouchaobao/
|
|
|
|
|
... ELSE set variable curl -kv \ https://creativetravelgroup.com/
|
|
|
|
|
${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_00003_2.bat
|
|
|
|
|
... ELSE set variable curl -kv \ https://www.qidian.com/rank
|
|
|
|
|
... ELSE set variable curl -kv \ https://www.hinabian.com/
|
|
|
|
|
${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_00003_3.bat
|
|
|
|
|
... ELSE set variable curl -kv \ https://www.rolandberger.com/ru/?country=RU
|
|
|
|
|
... ELSE set variable curl -kv \ https://www.smithsonianjourneys.org/
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
|
|
|
|
|
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
@@ -56,7 +73,21 @@ Proxy-Policy-deny-00004
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List qwertyuiop Tango Secure Gateway CA
|
|
|
|
|
... ELSE Create List qwertyuiop Tango Secure Gateway CA
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
Comment 改变拦截策略
|
|
|
|
|
${policyDict} Create Dictionary policyId=${intercept_deny_policyId3} policyName=SecurityPolicy-Intercept-deny-1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${deny_objectId50}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
|
|
|
|
|
log ${policyDict}
|
|
|
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
|
|
|
Comment 改变阻断策略
|
|
|
|
|
${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
|
|
|
|
|
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/
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List qwertyuiop Tango Secure Gateway CA
|
|
|
|
|
... ELSE Create List qwertyuiop Tango Secure Gateway CA
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00005
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00005.bat
|
|
|
|
|
@@ -88,24 +119,41 @@ Proxy-Policy-deny-00008
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
Comment 改变拦截策略
|
|
|
|
|
${policyDict} Create Dictionary policyId=${intercept_deny_policyId7} policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${deny_objectId51}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
|
|
|
|
|
log ${policyDict}
|
|
|
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
|
|
|
Comment 改变阻断策略
|
|
|
|
|
${policyDict} Create Dictionary policyId=${deny_policyId7} policyName=Proxy-Policy-deny-00004-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"qwertyuiop","code":404,"protocol":"HTTP"} filterList=${deny_objectId52}|TSG_FIELD_HTTP_URL,${deny_objectId53}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
|
|
|
|
log ${policyDict}
|
|
|
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00008_1.bat
|
|
|
|
|
... ELSE set variable curl http://bbs.tianya.cn/list-16-1.shtml
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
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 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Timed out
|
|
|
|
|
... ELSE Create List Timed out
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00010
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00010.bat
|
|
|
|
|
... ELSE set variable curl http://www.duckduckmoose.com/learn/
|
|
|
|
|
... ELSE set variable curl http://www.duckduckmoose.com/
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
|
|
|
|
|
... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00011
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00011.bat
|
|
|
|
|
... ELSE set variable curl http://tutcandy.com/2009/04/ai-sketch-to-vector-tutorial
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00011.bat
|
|
|
|
|
... ELSE set variable curl http://tutcandy.com/2009/04/ai-sketch-to-vector-tutorial
|
|
|
|
|
@@ -151,19 +199,42 @@ Proxy-Policy-deny-00014
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014.bat
|
|
|
|
|
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
|
|
|
|
... ELSE Create List Connection reset by peer
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found
|
|
|
|
|
... ELSE Create List Not Found
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
Comment 改变阻断策略
|
|
|
|
|
${policyDict} Create Dictionary policyId=${deny_policyId13} policyName=Proxy-Policy-deny-00014-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${deny_objectId54}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
|
|
|
|
|
log ${policyDict}
|
|
|
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014.bat
|
|
|
|
|
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=denyTest0014&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found
|
|
|
|
|
... ELSE Create List Not Found
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00015
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00015.bat
|
|
|
|
|
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=lkjh&setCookie=12345678&contentType=content-type&resBody=ASDFG" http://open.node.com/action
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
|
|
|
|
... ELSE Create List Connection reset by peer
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found
|
|
|
|
|
... ELSE Create List Not Found
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
Comment 改变阻断策略
|
|
|
|
|
${policyDict} Create Dictionary policyId=${deny_policyId14} policyName=Proxy-Policy-deny-00014-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${deny_objectId55}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
|
|
|
|
|
log ${policyDict}
|
|
|
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00015.bat
|
|
|
|
|
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=lkjh&setCookie=12345678&contentType=content-type&resBody=deny015" http://open.node.com/action
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found
|
|
|
|
|
... ELSE Create List Not Found
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00016
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00018.bat
|
|
|
|
|
... ELSE set variable curl -kv https://www.stewart.com/en.html
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00018.bat
|
|
|
|
|
... ELSE set variable curl -kv https://www.stewart.com/en.html
|
|
|
|
|
@@ -175,8 +246,8 @@ Proxy-Policy-deny-00017
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00016.bat
|
|
|
|
|
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=mnbv&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/action
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 涨涨涨涨
|
|
|
|
|
... ELSE Create List 涨涨涨涨
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found
|
|
|
|
|
... ELSE Create List Not Found
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00018
|
|
|
|
|
|