diff --git a/01-TestCase/tsg_adc/selfserver/Api_Proxy/Monitor_Ssl_Tests.robot b/01-TestCase/tsg_adc/selfserver/Api_Proxy/Monitor_Ssl_Tests.robot index 7154d7a..f1b0b15 100644 --- a/01-TestCase/tsg_adc/selfserver/Api_Proxy/Monitor_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/selfserver/Api_Proxy/Monitor_Ssl_Tests.robot @@ -13,127 +13,29 @@ ${policyIds} ${EMPTY} ${objectids} ${EMPTY} *** Test Cases *** -ProxyPolicy-Monitor-Ssl-00001 - [Tags] selfserver ip Monitor ssl - Comment 创建目标IP - ${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0 - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00001 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat - ... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00002 - [Tags] selfserver ip+fqdn完整匹配 Monitor ssl - Comment 创建fqdn - ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00002 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_HOST - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat - ... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00003 - [Tags] selfserver ip+cat右匹配 Monitor ssl - Comment 创建cat - ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00003 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_HOST - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat - ... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00004 - [Tags] selfserver Monitor ip+url右匹配 ssl +ProxyPolicy-Redirect-Http-00001 + [Tags] selfserver ip http redirect Comment 创建url - ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html ${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${objectids} set Variable ${objectId} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} #删除策略 ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} ${policyIds} Create List ${policyId1} - ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages - ${profiledId} Get From Dictionary ${response} profileId Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00004 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00001 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.ziroom.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} #删除策略 ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} ${policyIds} Create List ${policyId1} ${policyId2} Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat - ... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat + ... ELSE set variable curl -kv \ http://open.node.com/test/xiaozhu/xiaozhu.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.ziroom.com/ 301 X-TG-Construct-By + ... ELSE Create List http://www.ziroom.com/ 301 X-TG-Construct-By ${starttime} Get Time Sleep ${policyVerificationSleepSeconds}s ${rescode} SystemCommand ${commandstr} @{stringlist} @@ -143,605 +45,722 @@ ProxyPolicy-Monitor-Ssl-00004 ${s} Convert to String ${policyId3} GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com -ProxyPolicy-Monitor-Ssl-00005 - [Tags] selfserver Monitor ip+url字串匹配 ssl - Comment 创建url - ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages - ${profiledId} Get From Dictionary ${response} profileId - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00005 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0002.bat - ... ELSE set variable curl \ -kv \ https://open.node.com/test/twitter/twitter.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List twitter Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List twitter Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00006 - [Tags] selfserver Monitor ip+url完整匹配 ssl - Comment 创建url - ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/bytedance/bytedance.html - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00006 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0003.bat - ... ELSE set variable curl \ -kv \ https://open.node.com/test/bytedance/bytedance.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List 字节跳动 Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List 字节跳动 Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00007 - [Tags] selfserver Monitor ip+url左匹配 ssl - Comment 创建url - ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node* - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - #创建引用文件 - ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages - ${profiledId} Get From Dictionary ${response} profileId - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00007 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat - ... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00008 - [Tags] selfserver Monitor ssl ip+请求头右匹配 - Comment 创建请求头 - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages - ${profiledId} Get From Dictionary ${response} profileId - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00008 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0008.bat - ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' \ https://open.node.com - @{stringlist} run keyword if '${systemType}'=='Windows' Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00009 - [Tags] selfserver Monitor ip+请求头字串匹配 ssl - Comment 创建请求头 - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages - ${profiledId} Get From Dictionary ${response} profileId - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00009 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0008.bat - ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' \ https://open.node.com - @{stringlist} run keyword if '${systemType}'=='Windows' Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00010 - [Tags] selfserver Monitor ip+请求头完整匹配 ssl - 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} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00010 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0008.bat - ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' \ https://open.node.com - @{stringlist} run keyword if '${systemType}'=='Windows' Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By 发送POST请求 Create List виде Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00011 - [Tags] selfserver Monitor ip+请求头左匹配 ssl - Comment 创建请求头 - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - #创建引用文件 - ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages - ${profiledId} Get From Dictionary ${response} profileId - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00011 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0008.bat - ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' \ https://open.node.com - @{stringlist} run keyword if '${systemType}'=='Windows' Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00012 - [Tags] selfserver Monitor ip+cookie字串匹配 ssl - Comment 创建cookie - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00012 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0012.bat - ... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'https://www.baidu.com/' \ https://open.node.com/test/nationalbank/nationalbank.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List switch=kazakh Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List switch=kazakh Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00013 - [Tags] selfserver Monitor ip+应答头右匹配 ssl - Comment 创建应答头 - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*html|Content-Type - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00013 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat - ... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00014 - [Tags] selfserver Monitor ip+应答头字串匹配 ssl - Comment 创建应答头 - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages - ${profiledId} Get From Dictionary ${response} profileId - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00014 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat - ... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List скомпромиссно Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00015 - [Tags] selfserver Monitor ip+应答头完整匹配 ssl - Comment 创建应答头 - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-SSL-00015 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0003.bat - ... ELSE set variable curl \ -kv \ https://open.node.com/test/bytedance/bytedance.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List 字节跳动 Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List 字节跳动 Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00016 - [Tags] selfserver Monitor ip+应答头左匹配 ssl - Comment 创建应答头 - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00016 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0002.bat - ... ELSE set variable curl \ -kv \ https://open.node.com/test/twitter/twitter.html - @{stringlist} run keyword if '${systemType}'=='Windows' Create List twitter Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List twitter Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00017 - [Tags] selfserver Monitor ip+set-cookie右匹配 ssl - Comment 创建set-cookie - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-SSL-00017 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat - ... ELSE set variable curl -kv https://open.node.com/ - @{stringlist} run keyword if '${systemType}'=='Windows' Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00018 - [Tags] selfserver Monitor ip+set-cookie字串匹配 ssl - Comment 创建set-cookie - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - ${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages - ${profiledId} Get From Dictionary ${response} profileId - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00018 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat - ... ELSE set variable curl -kv https://open.node.com/ - @{stringlist} run keyword if '${systemType}'=='Windows' Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00019 - [Tags] selfserver Monitor ip+set-cookie完整匹配 ssl - Comment 创建set-cookie - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-ssl-00019 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat - ... ELSE set variable curl -kv \ -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action - @{stringlist} run keyword if '${systemType}'=='Windows' Create List Response Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List Response Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00020 - [Tags] selfserver Monitor ip+set-cookie左匹配 ssl - Comment 创建set-cookie - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-SSL-00020 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat - ... ELSE set variable curl -kv https://open.node.com/ - @{stringlist} run keyword if '${systemType}'=='Windows' Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List 发送POST请求 Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00021 - [Tags] selfserver Monitor ip+请求体字串匹配 ssl - Comment 创建请求体 - ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Deny-SSL-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat - ... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action - @{stringlist} run keyword if '${systemType}'=='Windows' Create List Body Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List Body Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00022 - [Tags] selfserver Monitor ip+应答体字串匹配 ssl - Comment 创建应答体 - ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response Body - ${rescode} ${objectId} AddObject2 ${1} ${objectDict} - ${objectids} set Variable ${objectId} - Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 - ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} - ${policyIds} Create List ${policyId1} - Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-ssl-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT - ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} - #删除策略 - ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - ${policyIds} Create List ${policyId1} ${policyId2} - Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat - ... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action - @{stringlist} run keyword if '${systemType}'=='Windows' Create List test Tango Secure Gateway CA X-TG-Construct-By - ... ELSE Create List test Tango Secure Gateway CA X-TG-Construct-By - ${starttime} Get Time - Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommand ${commandstr} @{stringlist} - Sleep ${policyLogVerificationSleepSeconds}s - ${endtime} Get Time - #日志验证 - ${s} Convert to String ${policyId3} - GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com - -ProxyPolicy-Monitor-Ssl-00023 - [Tags] selfserver 最大组合 Monitor ssl +ProxyPolicy-Redirect-Http-00002 + [Tags] selfserver ip+fqdn完整匹配 http redirect Comment 创建fqdn ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} ${objectids} set Variable ${object_fqdn_Id} Comment 创建url - ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*bytedance.html + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00002 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.yhd.com/","code":302,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat + ... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.yhd.com 302 X-TG-Construct-By + ... ELSE Create List https://www.yhd.com 302 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00003 + [Tags] selfserver ip+cat右匹配 http redirect + Comment 创建cat + ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com + ${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${object_cat_Id} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00003 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.toutiao.com/ch/news_hot/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_cat_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat + ... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.toutiao.com/ch/news_hot/ 301 X-TG-Construct-By + ... ELSE Create List https://www.toutiao.com/ch/news_hot/ 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00004 + [Tags] selfserver http redirect ip+url右匹配 + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00004 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://bbs.tianya.cn/list-lookout-1.shtml","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat + ... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List http://bbs.tianya.cn/list-lookout-1.shtml 301 X-TG-Construct-By + ... ELSE Create List http://bbs.tianya.cn/list-lookout-1.shtml 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00005 + [Tags] selfserver http redirect ip+url字串匹配 + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00005 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://kefu.ctrip.com/index","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0002.bat + ... ELSE set variable curl -kv http://open.node.com/test/youtube/youtube.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://kefu.ctrip.com/index 301 X-TG-Construct-By + ... ELSE Create List https://kefu.ctrip.com/index 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00006 + [Tags] selfserver http redirect ip+url完整匹配 + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/nationalbank/nationalbank.html + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00006 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.booking.com/","code":302,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0003.bat + ... ELSE set variable curl -kv http://open.node.com/test/nationalbank/nationalbank.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.booking.com/ 302 X-TG-Construct-By + ... ELSE Create List https://www.booking.com/ 302 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00007 + [Tags] selfserver http redirect ip+url左匹配 + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node* + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00007 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.eastmoney.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat + ... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.eastmoney.com/ 301 X-TG-Construct-By + ... ELSE Create List https://www.eastmoney.com/ 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00008 + [Tags] selfserver http redirect ip+请求头右匹配 + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00008 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.iqiyi.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0008.bat + ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.iqiyi.com/ 301 X-TG-Construct-By + ... ELSE Create List https://www.iqiyi.com/ 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00009 + [Tags] selfserver http redirect ip+请求头字串匹配 + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00009 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://chaoshi.tmall.com/","code":302,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0008.bat + ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://chaoshi.tmall.com/ 302 X-TG-Construct-By + ... ELSE Create List https://chaoshi.tmall.com/ 302 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00010 + [Tags] selfserver http redirect ip+请求头完整匹配 + 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} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00010 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://military.china.com/zh_cn/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0008.bat + ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com + @{stringlist} run keyword if '${systemType}'=='Windows' Create List http://military.china.com/zh_cn/ 301 X-TG-Construct-By + ... ELSE Create List http://military.china.com/zh_cn/ 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00011 + [Tags] selfserver http redirect ip+请求头左匹配 + Comment 创建请求头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00011 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.tiexue.net/","code":302,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0008.bat + ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com + @{stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.tiexue.net/ 302 X-TG-Construct-By + ... ELSE Create List http://www.tiexue.net/ 302 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00012 + [Tags] selfserver http redirect ip+cookie字串匹配 + Comment 创建cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00012 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.douyu.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0012.bat + ... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \ http://open.node.com/test/nationalbank/nationalbank.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.douyu.com/ 301 X-TG-Construct-By + ... ELSE Create List https://www.douyu.com/ 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00013 + [Tags] selfserver http redirect ip+应答头右匹配 + Comment 创建应答头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*charset=UTF-8|Content-Type + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00013 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.fang.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat + ... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.fang.com/ 301 X-TG-Construct-By + ... ELSE Create List https://www.fang.com/ 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00014 + [Tags] selfserver http redirect ip+应答头字串匹配 + Comment 创建应答头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00014 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.zealer.com/video?ZC_ACCESS_TOKEN=&ZC_UID=","code":302,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat + ... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.zealer.com/video?ZC_ACCESS_TOKEN=&ZC_UID= 302 X-TG-Construct-By + ... ELSE Create List https://www.zealer.com/video?ZC_ACCESS_TOKEN=&ZC_UID= 302 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00015 + [Tags] selfserver http redirect ip+应答头完整匹配 + Comment 创建应答头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=UTF-8|Content-Type + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00015 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://stock.stockstar.com/gem/","code":302,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0003.bat + ... ELSE set variable curl -kv http://open.node.com/test/nationalbank/nationalbank.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List http://stock.stockstar.com/gem/ 302 X-TG-Construct-By + ... ELSE Create List http://stock.stockstar.com/gem/ 302 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00016 + [Tags] selfserver http redirect ip+应答头左匹配 + Comment 创建应答头 + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00016 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.kugou.com/yy/html/rank.html","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0002.bat + ... ELSE set variable curl -kv \ http://open.node.com/test/youtube/youtube.html + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.kugou.com/yy/html/rank.html 301 X-TG-Construct-By + ... ELSE Create List https://www.kugou.com/yy/html/rank.html 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00017 + [Tags] selfserver http redirect ip+set-cookie右匹配 + Comment 创建set-cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00017 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.yy.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat + ... ELSE set variable curl -kv http://open.node.com/ + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.yy.com/ 301 X-TG-Construct-By + ... ELSE Create List https://www.yy.com/ 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00018 + [Tags] selfserver http redirect ip+set-cookie字串匹配 + Comment 创建set-cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00018 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.xiaohongshu.com/","code":302,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat + ... ELSE set variable curl -kv http://open.node.com/ + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.xiaohongshu.com/ 302 X-TG-Construct-By + ... ELSE Create List https://www.xiaohongshu.com/ 302 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00019 + [Tags] selfserver http redirect ip+set-cookie完整匹配 + Comment 创建set-cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00019 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.zhihu.com/signin?next=%2F","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0017.bat + ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv \ http://open.node.com/action + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.zhihu.com/signin?next=%2F 301 X-TG-Construct-By + ... ELSE Create List https://www.zhihu.com/signin?next=%2F 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00020 + [Tags] selfserver http redirect ip+set-cookie左匹配 + Comment 创建set-cookie + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00020 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.pcauto.com.cn/","code":302,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat + ... ELSE set variable curl -kv http://open.node.com/ + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.pcauto.com.cn/ 302 X-TG-Construct-By + ... ELSE Create List https://www.pcauto.com.cn/ 302 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00021 + [Tags] selfserver http redirect ip+请求体字串匹配 + Comment 创建请求体 + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open + ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} + Comment 创建安全策略 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 + ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} + ${policyIds} Create List ${policyId1} + Comment 创建管控策略 + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00021 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.cmbchina.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT,${object_url_Id}|TSG_FIELD_HTTP_URL + ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} + #删除策略 + ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} + ${policyIds} Create List ${policyId1} ${policyId2} + Comment 功能端验证HTTP验证 + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0017.bat + ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body"-kv http://open.node.com/action + @{stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.cmbchina.com/ 301 X-TG-Construct-By + ... ELSE Create List http://www.cmbchina.com/ 301 X-TG-Construct-By + ${starttime} Get Time + Sleep ${policyVerificationSleepSeconds}s + ${rescode} SystemCommand ${commandstr} @{stringlist} + Sleep ${policyLogVerificationSleepSeconds}s + ${endtime} Get Time + #日志验证 + ${s} Convert to String ${policyId3} + GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com + +ProxyPolicy-Redirect-Http-00022 + [Tags] selfserver 最大组合 http redirect + Comment 创建目标IP + ${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0 + ${rescode} ${objectId} AddObject2 ${1} ${objectDict} + ${objectids} set Variable ${objectId} + Comment 创建fqdn + ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com + ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} + ${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id} + Comment 创建url + ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict} ${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id} Comment 创建请求头 @@ -749,33 +768,33 @@ ProxyPolicy-Monitor-Ssl-00023 ${rescode} ${object_rq_Id} AddObject2 ${1} ${objectDict} ${objectids} Catenate SEPARATOR=, ${objectids} ${object_rq_Id} Comment 创建应答头 - ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type + ${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type ${rescode} ${object_re_Id} AddObject2 ${1} ${objectDict} ${objectids} Catenate SEPARATOR=, ${objectids} ${object_re_Id} - Comment 创建应答体 - ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=字节跳动 + Comment 创建请求体 + ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test ${rescode} ${object_by_Id} AddObject2 ${1} ${objectDict} ${objectids} Catenate SEPARATOR=, ${objectids} ${object_by_Id} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2 ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} #删除策略 ${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]} ${policyIds} Create List ${policyId1} Comment 创建管控策略 - ${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-Ssl-00023 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_rq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_re_Id}|TSG_FIELD_HTTP_RES_HDR,${object_by_Id}|TSG_FIELD_HTTP_RES_CONTENT + ${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.yhd.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_rq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_re_Id}|TSG_FIELD_HTTP_RES_HDR,${object_by_Id}|TSG_FIELD_HTTP_REQ_CONTENT,${objectId}|TSG_SECURITY_DESTINATION_ADDR ${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict} #删除策略 ${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]} ${policyIds} Create List ${policyId1} ${policyId2} Comment 功能端验证HTTP验证 - ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00023.bat - ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' \ https://open.node.com/test/bytedance/bytedance.html - ${stringlist} run keyword if '${systemType}'=='Windows' Create List Response Body X-TG-Construct-By - ... ELSE Create List Response Body X-TG-Construct-By + ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00023.bat + ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/action + @{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.yhd.com 301 X-TG-Construct-By + ... ELSE Create List https://www.yhd.com 301 X-TG-Construct-By ${starttime} Get Time Sleep ${policyVerificationSleepSeconds}s - ${rescode} SystemCommands ${commandstr} ${stringlist} + ${rescode} SystemCommand ${commandstr} @{stringlist} Sleep ${policyLogVerificationSleepSeconds}s ${endtime} Get Time #日志验证