应对策略之间相互影响bug做出的用例修改

This commit is contained in:
hebingning
2021-02-22 10:43:44 +08:00
parent bb8df7b30f
commit eb9884f8c8
40 changed files with 497 additions and 171 deletions

View File

@@ -16,7 +16,7 @@ Proxy-Policy-allow-00001
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$mp.pipix.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn2
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*games.sina.com.cn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*mp.pipix.com
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-allow policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}

View File

@@ -232,7 +232,7 @@ SecurityPolicy-Deny-Http-00011
SecurityPolicy-Deny-Http-00012
[Tags] cookie字串匹配
Comment 创建cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=ipp_uid2|Cookie
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00012 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"block","code":404,"message":"马上到周末"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
@@ -266,7 +266,7 @@ SecurityPolicy-Deny-Http-00014
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=biubiubiud
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00014 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00014 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}

View File

@@ -41,7 +41,7 @@ SecurityPolicy-Deny-Mail-00002
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Простопорно
${rescode} ${object_ATT_CONT_Id} AddObject2 ${1} ${objectDict}
Comment 创建ATT_CONT2
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=$Простопорно
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=$姬巍川测试文件内容Простопорно
${rescode} ${object_ATT_CONT_Id1} AddObject2 ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00002 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"MAIL","method":"drop"} filterList=${object_ATT_CONT_Id}|TSG_FIELD_MAIL_ATT_CONTENT isValid=${1} appIdObjects=${MAIL_ID}

View File

@@ -38,8 +38,8 @@ Proxy-Policy-deny-00001
${policyId2} Get-Pids ${policyId2}
${policyId2} Set Variable ${policyId2}[0]
insert_policyId_to_file1 deny_objectId ${objectId}
insert_policyId_to_file1 deny_objectId46 ${objectId1}
insert_policyId_to_file1 deny_objectId47 ${objectId2}
insert_policyId_to_file1 deny_objectId56 ${objectId1}
insert_policyId_to_file1 deny_objectId57 ${objectId2}
insert_policyId_to_file1 intercept_deny_policyId ${policyId1}
insert_policyId_to_file1 deny_policyId ${policyId2}
@@ -58,7 +58,7 @@ Proxy-Policy-deny-00002
${policyId1} Get-Pids ${policyId1}
${policyId1} Set Variable ${policyId1}[0]
Comment 创建deny策略
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00002 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":403,"protocol":"HTTP"} filterList=165|TSG_FIELD_HTTP_HOST,${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00002 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":403,"protocol":"HTTP"} filterList=165|TSG_FIELD_HTTP_HOST,${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
${policyId2} Get-Pids ${policyId2}
@@ -439,7 +439,7 @@ Proxy-Policy-deny-00014
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ProxydenyTest001402
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_HOST isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
${policyId1} Get-Pids ${policyId1}
@@ -502,8 +502,8 @@ Proxy-Policy-deny-00016
${policyId2} Set Variable ${policyId2}[0]
insert_policyId_to_file1 deny_profileId6 ${profiledId}
insert_policyId_to_file1 deny_objectId47 ${objectId}
insert_policyId_to_file1 deny_objectId48 ${objectId1}
insert_policyId_to_file1 deny_objectId49 ${objectId2}
insert_policyId_to_file1 deny_objectId58 ${objectId1}
insert_policyId_to_file1 deny_objectId59 ${objectId2}
insert_policyId_to_file1 intercept_deny_policyId15 ${policyId1}
insert_policyId_to_file1 deny_policyId17 ${policyId2}

View File

@@ -54,7 +54,7 @@ Proxy-Policy-hijack-00001
Proxy-Policy-hijack-00002
[Tags] cat右匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.uqur.cn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.uqur.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=uqur.cn
@@ -63,7 +63,7 @@ Proxy-Policy-hijack-00002
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
${profiledId} Get From Dictionary ${response} profileId
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=163|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=163|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
${policyId1} Get-Pids ${policyId1}
@@ -83,7 +83,7 @@ Proxy-Policy-hijack-00002
Proxy-Policy-hijack-00003
[Tags] url4种匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*lexus.ru,*oktrucking.org,*federalsignal.com,*peasedev.org
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*lexus.ru,*oktrucking.org,*federalsignal.com,*peasedev.org
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.lex*,$oktrucking.org/,*signal.com/,peasedev
@@ -322,10 +322,10 @@ Proxy-Policy-hijack-00009
Proxy-Policy-hijack-00010
[Tags] 应答头字串匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*tianya.cn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*axun.1616.net
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=list-39-1.shtml
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=/jiemeng.htm
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html|Content-Type

View File

@@ -59,7 +59,7 @@ SecurityPolicy-Intercept-Http-00003
${objectDict} Create Dictionary objectType=ip objectSubType=endpoint isValid=${1} addItemList=${addItemLists}
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Http-00003 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Http-00003 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} destination=${objectId1}|TSG_SECURITY_DESTINATION_ADDR filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}

View File

@@ -30,20 +30,20 @@ SecurityPolicy-Intercept-Ssl-00001
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 intercept_ssl_objectId ${objectId}
insert_policyId_to_file1 intercept_ssl_objectId2 ${objectId1}
insert_policyId_to_file1 intercept_ssl_objectId1 ${objectId1}
insert_policyId_to_file1 intercept_ssl_policyId ${policyId}
SecurityPolicy-Intercept-Ssl-00002
[Tags] category
# ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*momondo.ru
# ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*fenopy.se
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Ssl-00002 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=166|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Ssl-00002 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=166|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
# insert_policyId_to_file1 intercept_ssl_objectId1 ${objectId}
insert_policyId_to_file1 intercept_ssl_objectId2 ${objectId}
insert_policyId_to_file1 intercept_ssl_policyId1 ${policyId}
SecurityPolicy-Intercept-Ssl-00003
@@ -55,24 +55,24 @@ SecurityPolicy-Intercept-Ssl-00003
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*xs8.cn
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Ssl-00003 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1727,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Ssl-00003 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":87,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 intercept_ssl_objectId1 ${objectId}
insert_policyId_to_file1 intercept_ssl_objectId3 ${objectId1}
insert_policyId_to_file1 intercept_ssl_objectId3 ${objectId}
insert_policyId_to_file1 intercept_ssl_objectId4 ${objectId1}
insert_policyId_to_file1 intercept_ssl_policyId2 ${policyId}
SecurityPolicy-Intercept-Ssl-00004
[Tags] category Other Certificate to replace
# ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*momondo.ru
# ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*worldweapon.info
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Ssl-00004 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1727,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=167|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Ssl-00004 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":87,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=167|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
# insert_policyId_to_file1 intercept_ssl_objectId1 ${objectId}
insert_policyId_to_file1 intercept_ssl_objectId5 ${objectId}
insert_policyId_to_file1 intercept_ssl_policyId3 ${policyId}

View File

@@ -35,30 +35,34 @@ SecurityPolicy-Monitor-Ssl-00001
SecurityPolicy-Monitor-Ssl-00002
[Tags] cn cat右匹配
Comment 创建cat
# ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*huya.com,*artistdirect.com
# ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn1
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*www.keysnews.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn2
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$keysnews.com
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Ssl-00002 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SSL"} filterList=148|TSG_FIELD_SSL_CN isValid=${1} appIdObjects=${SSL_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Ssl-00002 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SSL"} filterList=148|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_SNI,${objectId1}|TSG_FIELD_SSL_CN isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
#insert_policyId_to_file1 monitor_ssl_objectId1 ${objectId}
insert_policyId_to_file1 monitor_ssl_objectId1 ${objectId}
insert_policyId_to_file1 monitor_ssl_objectId7 ${objectId1}
insert_policyId_to_file1 monitor_ssl_policyId1 ${policyId}
SecurityPolicy-Monitor-Ssl-00003
[Tags] san cat右匹配
Comment 创建cat
# ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*lyrics.com,*.melody.su
# ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
[Tags] cat右匹配
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*academia.org,*proisraelforever.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Ssl-00003 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SSL"} filterList=146|TSG_FIELD_SSL_SAN isValid=${1} appIdObjects=${SSL_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Ssl-00003 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"SSL"} filterList=146|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
#insert_policyId_to_file1 monitor_ssl_objectId2 ${objectId}
insert_policyId_to_file1 monitor_ssl_objectId2 ${objectId}
insert_policyId_to_file1 monitor_ssl_policyId2 ${policyId}
SecurityPolicy-Monitor-Ssl-00004

View File

@@ -47,8 +47,8 @@ Proxy-Policy-redirect-00001
Proxy-Policy-redirect-00002
[Tags] cat右匹配 update policy:url
Comment 创建fqdn
# ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*vystarcu.org
# ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*glazok.kz
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=glazok.kz
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
@@ -56,18 +56,18 @@ Proxy-Policy-redirect-00002
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*glazok.kz
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=101|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=101|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
${policyId1} Get-Pids ${policyId1}
${policyId1} Set Variable ${policyId1}[0]
Comment 创建redirect策略
${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00002 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"redirect","to":"http://www.iceo.com.cn/renwu2013/","code":302,"protocol":"HTTP"} filterList=101|TSG_FIELD_HTTP_HOST,${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00002 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"redirect","to":"http://www.iceo.com.cn/renwu2013/","code":302,"protocol":"HTTP"} filterList=101|TSG_FIELD_HTTP_HOST,${objectId}|TSG_FIELD_HTTP_HOST,${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
${policyId2} Get-Pids ${policyId2}
${policyId2} Set Variable ${policyId2}[0]
#insert_policyId_to_file1 redirect_objectId1 ${objectId}
insert_policyId_to_file1 redirect_objectId1 ${objectId}
insert_policyId_to_file1 redirect_objectId45 ${objectId1}
insert_policyId_to_file1 redirect_objectId50 ${objectId2}
insert_policyId_to_file1 intercept_redirect_policyId1 ${policyId1}
@@ -76,24 +76,24 @@ Proxy-Policy-redirect-00002
Proxy-Policy-redirect-00003
[Tags] url4种匹配
Comment 创建fqdn
# ${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*secure.uwcu.org,*cit.com,*alaskausa.org,*tradingtechnologies.com
# ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.deepin.org,*vmall.com,$www.suning.com,*flights.ctrip.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.shrunke*,$mytinyurl.net/,*hugedomains.com,sg.sgness.click
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.deepin.org*,vmall,*suning.com/,$flights.ctrip.com/international/search/domestic
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=164|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
${policyId1} Get-Pids ${policyId1}
${policyId1} Set Variable ${policyId1}[0]
Comment 创建redirect策略
${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00003 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"redirect","to":"http://www.iceo.com.cn/renwu2013/","code":302,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyName=Proxy-Policy-redirect-00003 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"redirect","to":"https://www.baidu.com/","code":301,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
${policyId2} Get-Pids ${policyId2}
${policyId2} Set Variable ${policyId2}[0]
#insert_policyId_to_file1 redirect_objectId2 ${objectId}
insert_policyId_to_file1 redirect_objectId2 ${objectId}
insert_policyId_to_file1 redirect_objectId3 ${objectId1}
insert_policyId_to_file1 intercept_redirect_policyId2 ${policyId1}
insert_policyId_to_file1 redirect_policyId2 ${policyId2}
@@ -398,9 +398,9 @@ Proxy-Policy-redirect-00013
Proxy-Policy-redirect-00014
[Tags] 请求体字串匹配,update policy:请求体
Comment 创建请求体
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=lksdf
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
# Comment 创建请求体
# ${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=lksdf
# ${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
@@ -414,7 +414,7 @@ Proxy-Policy-redirect-00014
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=testredirect0014002
${rescode} ${objectId4} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_HOST isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
${policyId1} Get-Pids ${policyId1}
@@ -425,7 +425,7 @@ Proxy-Policy-redirect-00014
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
${policyId2} Get-Pids ${policyId2}
${policyId2} Set Variable ${policyId2}[0]
insert_policyId_to_file1 redirect_objectId33 ${objectId}
# insert_policyId_to_file1 redirect_objectId33 ${objectId}
insert_policyId_to_file1 redirect_objectId34 ${objectId1}
insert_policyId_to_file1 redirect_objectId47 ${objectId2}
insert_policyId_to_file1 redirect_objectId53 ${objectId3}

View File

@@ -292,13 +292,13 @@ Proxy-Policy-replace-00010
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=testpolicyreplace_0010|Content-Type
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-replace-10 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-replace-10 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
${policyId1} Get-Pids ${policyId1}
${policyId1} Set Variable ${policyId1}[0]
Comment 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00010 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_body","find":"hello","replace_with":"111111"}],"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00010 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_body","find":"hello","replace_with":"111111"}],"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
${policyId2} Get-Pids ${policyId2}

View File

@@ -21,21 +21,18 @@ Proxy-Policy-allow-00001
${policyDict} Create Dictionary policyId=${intercept_allow_policyId} policyName=SecurityPolicy-Intercept-allow_1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${allow_objectId39}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 创建allow策略
Comment 改变allow策略
${policyDict} Create Dictionary policyId=${allow_policyId} policyName=Proxy-Policy-allow-00001_1 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${allow_objectId39}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 10
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00001_1.bat
... ELSE set variable curl -kv https://games.sina.com.cn/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 新浪游戏 Tango Secure Gateway CA
... ELSE Create List 新浪游戏 Tango Secure Gateway CA
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00001_1.bat
... ELSE set variable curl -kv https://games.sina.com.cn/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 新浪游戏 Tango Secure Gateway CA
... ELSE Create List 新浪游戏 Tango Secure Gateway CA
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00001.bat
... ELSE set variable curl -kv https://mp.pipix.com
${stringlist} run keyword if '${systemType}'=='Windows' Create List 皮皮虾下载 Tango Secure Gateway CA
... ELSE Create List 皮皮虾下载 Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-allow-00002
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00002.bat

View File

@@ -120,7 +120,7 @@ SecurityPolicy-Deny-Http-00008
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00008.bat
... ELSE set variable curl http://www.cmbchina.com/CmbQuesInfo/index.aspx
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变阻断策略
@@ -130,7 +130,7 @@ SecurityPolicy-Deny-Http-00008
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00008.bat
... ELSE set variable curl http://www.cmbchina.com/CmbQuesInfo/index.aspx
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Deny-Http-00009
@@ -204,25 +204,32 @@ SecurityPolicy-Deny-Http-00014
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00014.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"testDenyHttp0014","setcook":"12345678","contenttype": "content-type","responsebody": "testDenyHttp0014"}" http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List Timed out
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变阻断策略
${policyDict} Create Dictionary policyId=${deny_http_policyId13} policyName=SecurityPolicy-Deny-Http-00014_1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"rst"} filterList=${deny_http_objectId40}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 10
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00014.bat
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00014_1.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"biubiubiud","setcook":"12345678","contenttype": "content-type","responsebody": "biubiubiud"}" http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
sleep 5
Comment 用后失效
${policyDict} Create Dictionary policyId=${deny_http_policyId13} policyName=SecurityPolicy-Deny-Http-00014_1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"rst"} filterList=${deny_http_objectId40}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
SecurityPolicy-Deny-Http-00015
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00015.bat
... ELSE set variable curl http://www.huatonggs.com/about.html#gsjj
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变阻断策略
${policyDict} Create Dictionary policyId=${deny_http_policyId14} policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${deny_http_objectId41}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
@@ -231,31 +238,33 @@ SecurityPolicy-Deny-Http-00015
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00015.bat
... ELSE set variable curl http://www.huatonggs.com/about.html#gsjj
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Deny-Http-00016
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00016.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"DenyHttp0016","setcook":"asdf","contenttype": "charsetDeny0016","responsebody": "adzx"}" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/go
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List 000
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 失效阻断策略,高优先级策略存在相同网址使用情况时候应在使用之后将策略失效
${policyDict} Create Dictionary policyId=${deny_http_policyId15} policyName=SecurityPolicy-Deny-Http-00016 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${deny_http_objectId23}|TSG_FIELD_HTTP_HOST,${deny_http_objectId24}|TSG_FIELD_HTTP_URL,${deny_http_objectId25}|TSG_FIELD_HTTP_REQ_HDR,${deny_http_objectId26}|TSG_FIELD_HTTP_RES_HDR,${deny_http_objectId27}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
SecurityPolicy-Deny-Http-00017
Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00017.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://smspunch.net/send-free-sms.aspx -w %{http_code}
# sleep 3
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00017.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://smspunch.net/send-free-sms.aspx -w %{http_code}
sleep 3
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00017.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://smspunch.net/send-free-sms.aspx -w %{http_code}
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
... ELSE Create List 000
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
sleep 5
SecurityPolicy-Deny-Http-00018
Comment 功能端验证HTTP验证

View File

@@ -18,21 +18,31 @@ Proxy-Policy-deny-00001
... ELSE Create List 重新开始 Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变拦截策略
${policyDict} Create Dictionary policyId=${intercept_deny_policyId} source=${deny_objectId46}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Intercept-deny-1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${deny_objectId47}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
${policyDict} Create Dictionary policyId=${intercept_deny_policyId} policyName=SecurityPolicy-Intercept-replace-1 source=${deny_objectId56}|TSG_SECURITY_SOURCE_LOCATION policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${deny_objectId57}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Comment 改变阻断策略
${policyDict} Create Dictionary policyId=${deny_policyId} source=${deny_objectId46}|TSG_SECURITY_SOURCE_LOCATION policyName=Proxy-Policy-deny-00001-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"重新开始","code":403,"protocol":"HTTP"} filterList=${deny_objectId47}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyId=${deny_policyId} source=${deny_objectId56}|TSG_SECURITY_SOURCE_LOCATION policyName=Proxy-Policy-deny-00001-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"重新开始","code":403,"protocol":"HTTP"} filterList=${deny_objectId57}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
sleep 10
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00001.bat
... ELSE set variable curl -kv \ https://newsela.com/about/content/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 重新开始 Tango Secure Gateway CA
... ELSE Create List 重新开始 Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 范围性,使用后关闭
Comment 改变拦截策略
${policyDict} Create Dictionary policyId=${intercept_deny_policyId} policyName=SecurityPolicy-Intercept-replace-1 source=${deny_objectId56}|TSG_SECURITY_SOURCE_LOCATION policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${deny_objectId57}|TSG_FIELD_SSL_SNI isValid=${0} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Comment 改变阻断策略
${policyDict} Create Dictionary policyId=${deny_policyId} source=${deny_objectId56}|TSG_SECURITY_SOURCE_LOCATION policyName=Proxy-Policy-deny-00001-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"重新开始","code":403,"protocol":"HTTP"} filterList=${deny_objectId57}|TSG_FIELD_HTTP_HOST isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Proxy-Policy-deny-00002
Comment 功能端验证HTTP验证
@@ -214,7 +224,12 @@ Proxy-Policy-deny-00013
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-deny-00014
Comment 功能端验证HTTP验证
Comment 防止安全策略互相影响,策略验证时候再打开
# ${policyDict} Create Dictionary policyId=${intercept_deny_policyId13} policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${deny_objectId34}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
# log ${policyDict}
# ${rescode} UpdatePolicies 1 ${policyDict} v2 update
# sleep 5
# Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014.bat
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
@@ -224,7 +239,7 @@ Proxy-Policy-deny-00014
${policyDict} Create Dictionary policyId=${deny_policyId13} policyName=Proxy-Policy-deny-00014-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${deny_objectId54}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 3
sleep 5
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014_1.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"denyTest0014","setcook":"12345678","contenttype": "content-type","responsebody": "Response Body"}" http://open.node.com/go
@@ -250,6 +265,7 @@ Proxy-Policy-deny-00015
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection was reset
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment
Proxy-Policy-deny-00016
Comment 功能端验证HTTP验证
@@ -266,6 +282,10 @@ Proxy-Policy-deny-00017
${stringlist} run keyword if '${systemType}'=='Windows' Create List 涨涨涨涨
... ELSE Create List 涨涨涨涨
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 拦截策略用完之后置为失效
${policyDict} Create Dictionary policyId=${intercept_deny_policyId13} policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${deny_objectId34}|TSG_FIELD_HTTP_HOST isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Proxy-Policy-deny-00018
Comment 功能端验证HTTP验证

View File

@@ -151,7 +151,7 @@ Proxy-Policy-hijack-00009
Proxy-Policy-hijack-00010
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00010.bat
... ELSE set variable curl http://bbs.tianya.cn/list-39-1.shtml
... ELSE set variable curl http://chaxun.1616.net/jiemeng.htm
${stringlist} run keyword if '${systemType}'=='Windows' Create List 控制小蛇在地图范围内移动
... ELSE Create List 控制小蛇在地图范围内移动
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -214,8 +214,6 @@ Proxy-Policy-hijack-00014
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00014.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" \ --cookie "__cfduid=d5c21129d57e7124b729fd86dc82abdcd1596020306; __stripe_sid=2940d4d5-6822-4daf-8b38-9cd18d745beb; __stripe_mid=dd118cd8-845c-4b6e-98ce-81e8d5bdd52c" --referer 'https://www.baidu.com/' \ https://www.travelzoo.com/cn/collections/hotels/ihg-group-meta/
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00014.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" \ --cookie "__cfduid=d5c21129d57e7124b729fd86dc82abdcd1596020306; __stripe_sid=2940d4d5-6822-4daf-8b38-9cd18d745beb; __stripe_mid=dd118cd8-845c-4b6e-98ce-81e8d5bdd52c" --referer 'https://www.baidu.com/' \ https://www.travelzoo.com/cn/collections/hotels/ihg-group-meta/
${stringlist} run keyword if '${systemType}'=='Windows' Create List test-2.gif Tango Secure Gateway CA
... ELSE Create List test-2.gif Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -36,12 +36,20 @@ SecurityPolicy-Intercept-Http-00002
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Intercept-Http-00003
Comment 防止安全策略互相影响,策略验证时候再打开
${policyDict} Create Dictionary policyId=${intercept_http_policyId2} policyName=SecurityPolicy-Intercept-Http-00003-1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} destination=${intercept_http_objectId3}|TSG_SECURITY_DESTINATION_ADDR filterList=${intercept_http_objectId2}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Intercept_HTTP_00003.bat
... ELSE set variable curl http://open.node.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List POST
... ELSE Create List POST
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 为保证之后使用open.node.com的Monitor用例正常生效做完验证后失效该策略
${policyDict} Create Dictionary policyId=${intercept_http_policyId2} policyName=SecurityPolicy-Intercept-Http-00003-1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} destination=${intercept_http_objectId3}|TSG_SECURITY_DESTINATION_ADDR filterList=${intercept_http_objectId2}|TSG_FIELD_HTTP_HOST isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
SecurityPolicy-Intercept-Http-00004
Comment 功能端验证HTTP验证

View File

@@ -18,7 +18,7 @@ SecurityPolicy-Intercept-Ssl-00001
... ELSE Create List reviewpro Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变安全策略
${policyDict} Create Dictionary policyId=${intercept_ssl_policyId} policyName=SecurityPolicy-Intercept-Ssl-00001_1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} source=${intercept_ssl_objectId2}|TSG_SECURITY_SOURCE_LOCATION filterList=${intercept_ssl_objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
${policyDict} Create Dictionary policyId=${intercept_ssl_policyId} policyName=SecurityPolicy-Intercept-Ssl-00001_1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} source=${intercept_ssl_objectId1}|TSG_SECURITY_SOURCE_LOCATION filterList=${intercept_ssl_objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证
@@ -27,6 +27,10 @@ SecurityPolicy-Intercept-Ssl-00001
${stringlist} run keyword if '${systemType}'=='Windows' Create List reviewpro Tango Secure Gateway CA
... ELSE Create List reviewpro Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 范围性质的ip做完策略验证后置为失效防止影响其他策略
${policyDict} Create Dictionary policyId=${intercept_ssl_policyId} policyName=SecurityPolicy-Intercept-Ssl-00001_1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} source=${intercept_ssl_objectId1}|TSG_SECURITY_SOURCE_LOCATION filterList=${intercept_ssl_objectId}|TSG_FIELD_SSL_SNI isValid=${0} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
SecurityPolicy-Intercept-Ssl-00002
Comment 功能端验证HTTP验证
@@ -44,7 +48,7 @@ SecurityPolicy-Intercept-Http-00003
... ELSE Create List Book
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变安全策略
${policyDict} Create Dictionary policyId=${intercept_ssl_policyId2} policyName=SecurityPolicy-Intercept-Ssl-00003_1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1727,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${intercept_ssl_objectId3}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
${policyDict} Create Dictionary policyId=${intercept_ssl_policyId2} policyName=SecurityPolicy-Intercept-Ssl-00003_1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":87,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${intercept_ssl_objectId4}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Intercept_SSL_00002_2.bat

View File

@@ -20,7 +20,7 @@ SecurityPolicy-Momitor-Mail-00001
${邮箱密码} Set Variable ${mailqqPasswd}
${邮件主题} Set Variable 123123132
${发送者} Set Variable ${mailqqAccount}
${附件} Set Variable ["${mailpath}/姬巍川测试文件.txt"]
${附件} Set Variable ["${mailpath}/何冰凝测试文件.txt"]
${接收者} Set Variable ["${mailAccountGeedge}"]
${抄送者} Set Variable ["${mailAccountGeedge}"]
${密送者} Set Variable ["${mailAccountGeedge}"]
@@ -39,7 +39,7 @@ SecurityPolicy-Momitor-Mail-00001
${邮箱密码} Set Variable ${mailqqPasswd}
${邮件主题} Set Variable 123123132
${发送者} Set Variable ${mailqqAccount}
${附件} Set Variable ["${mailpath}/姬巍川测试文件.txt"]
${附件} Set Variable ["${mailpath}/何冰凝测试文件.txt"]
${接收者} Set Variable ["${mailAccountGeedge}"]
${抄送者} Set Variable ["${mailAccountGeedge}"]
${密送者} Set Variable ["${mailAccountGeedge}"]
@@ -47,6 +47,7 @@ SecurityPolicy-Momitor-Mail-00001
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 30
SecurityPolicy-Momitor-Mail-00002
Comment 功能端验证
@@ -83,7 +84,8 @@ SecurityPolicy-Momitor-Mail-00002
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 31
SecurityPolicy-Momitor-Mail-00003
Comment 功能端验证
${Smtp服务器} Set Variable smtp.qq.com
@@ -92,7 +94,7 @@ SecurityPolicy-Momitor-Mail-00003
${邮箱密码} Set Variable ${mailqqPasswd}
${邮件主题} Set Variable Согласятся
${发送者} Set Variable ${mailqqAccount}
${附件} Set Variable ["${mailpath}/姬巍川测试文件.txt"]
${附件} Set Variable ["${mailpath}/何冰凝测试文件.txt"]
${接收者} Set Variable ["${mailAccountGeedge}"]
${抄送者} Set Variable ["${mailAccountGeedge}"]
${密送者} Set Variable ["${mailAccountGeedge}"]
@@ -111,7 +113,7 @@ SecurityPolicy-Momitor-Mail-00003
${邮箱密码} Set Variable ${mailqqPasswd}
${邮件主题} Set Variable Согласятся
${发送者} Set Variable ${mailqqAccount}
${附件} Set Variable ["${mailpath}/姬巍川测试文件.txt"]
${附件} Set Variable ["${mailpath}/何冰凝测试文件.txt"]
${接收者} Set Variable ["${mailAccountGeedge}"]
${抄送者} Set Variable ["${mailAccountGeedge}"]
${密送者} Set Variable ["${mailAccountGeedge}"]
@@ -119,6 +121,8 @@ SecurityPolicy-Momitor-Mail-00003
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 35
SecurityPolicy-Momitor-Mail-00004
Comment 功能端验证
${Smtp服务器} Set Variable smtp.qq.com
@@ -127,7 +131,7 @@ SecurityPolicy-Momitor-Mail-00004
${邮箱密码} Set Variable ${mailqqPasswd}
${邮件主题} Set Variable 后天周末
${发送者} Set Variable ${mailqqAccount}
${附件} Set Variable ["${mailpath}/姬巍川测试文件.txt"]
${附件} Set Variable ["${mailpath}/何冰凝测试文件.txt"]
${接收者} Set Variable ["${mailAccountGeedge}"]
${抄送者} Set Variable ["${mailAccountGeedge}"]
${密送者} Set Variable ["${mailAccountGeedge}"]
@@ -135,7 +139,8 @@ SecurityPolicy-Momitor-Mail-00004
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 45
SecurityPolicy-Momitor-Mail-00005
Comment 功能端验证
${Smtp服务器} Set Variable smtp.qq.com
@@ -144,7 +149,7 @@ SecurityPolicy-Momitor-Mail-00005
${邮箱密码} Set Variable ${mailqqPasswd}
${邮件主题} Set Variable 9876543210zxcv
${发送者} Set Variable ${mailqqAccount}
${附件} Set Variable ["${mailpath}/姬巍川测试文件.txt"]
${附件} Set Variable ["${mailpath}/何冰凝测试文件.txt"]
${接收者} Set Variable ["${mailAccountGeedge}"]
${抄送者} Set Variable ["${mailAccountGeedge}"]
${密送者} Set Variable ["${mailAccountGeedge}"]
@@ -152,7 +157,8 @@ SecurityPolicy-Momitor-Mail-00005
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 66
SecurityPolicy-Momitor-Mail-00006
Comment 功能端验证
${Smtp服务器} Set Variable smtp.qq.com
@@ -169,6 +175,7 @@ SecurityPolicy-Momitor-Mail-00006
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 80
SecurityPolicy-Momitor-Mail-00007
Comment 功能端验证
@@ -186,6 +193,7 @@ SecurityPolicy-Momitor-Mail-00007
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 99
SecurityPolicy-Momitor-Mail-00008
Comment 功能端验证
@@ -223,6 +231,8 @@ SecurityPolicy-Momitor-Mail-00008
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 111
SecurityPolicy-Momitor-Mail-00009
Comment 功能端验证
${Smtp服务器} Set Variable smtp.qq.com
@@ -239,6 +249,7 @@ SecurityPolicy-Momitor-Mail-00009
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 120
SecurityPolicy-Momitor-Mail-00010
Comment 功能端验证
@@ -256,6 +267,7 @@ SecurityPolicy-Momitor-Mail-00010
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 175
SecurityPolicy-Momitor-Mail-00011
Comment 功能端验证
@@ -290,6 +302,7 @@ SecurityPolicy-Momitor-Mail-00012
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 75
SecurityPolicy-Momitor-Mail-00013
Comment 功能端验证
@@ -307,6 +320,7 @@ SecurityPolicy-Momitor-Mail-00013
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 80
SecurityPolicy-Momitor-Mail-00014
Comment 功能端验证
@@ -324,6 +338,7 @@ SecurityPolicy-Momitor-Mail-00014
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
Log ${发送邮件返回结果}
should contain ${发送邮件返回结果} mail_success
sleep 92
SecurityPolicy-Momitor-Mail-00015
Comment 功能端验证

View File

@@ -37,30 +37,23 @@ SecurityPolicy-Monitor-Ssl-00001
SecurityPolicy-Monitor-Ssl-00002
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_SSL_00002.bat
... ELSE set variable curl https://www.lenouvelliste.ch/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Nouvelliste
... ELSE Create List Nouvelliste
${rescode} SystemCommands ${commandstr} ${stringlist}
Sleep ${policyLogVerificationSleepSeconds}s
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_SSL_00002_2.bat
... ELSE set variable curl https://bdtruth.com.au/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Barrier
... ELSE Create List Barrier
... ELSE set variable curl https://www.keysnews.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List keysnews.com
... ELSE Create List keysnews.com
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Monitor-Ssl-00003
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_SSL_00003.bat
... ELSE set variable curl https://www.academia.org/
${stringlist} run keyword if '${systemType}'=='Windows' Create List CMR
... ELSE Create List CMR
${stringlist} run keyword if '${systemType}'=='Windows' Create List Accuracy In Academia
... ELSE Create List Accuracy In Academia
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_SSL_00003_3.bat
... ELSE set variable curl https://www.proisraelforever.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Ardenbrook Labradors
... ELSE Create List Ardenbrook Labradors
${stringlist} run keyword if '${systemType}'=='Windows' Create List Israel Forever
... ELSE Create List Israel Forever
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Monitor-Ssl-00004

View File

@@ -0,0 +1,261 @@
*** Settings ***
Force Tags tsg_adc_wp proxy_policy adc_verify
Library OperatingSystem
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
Resource ../../../02-Keyword/tsg_adc/FileOperation.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
Resource ../../../03-Variable/ApplicationID.txt
Resource ../../../05-Other/AllFlowCaseVariable.txt
*** Test Cases ***
Proxy-Policy-Monitor-00001
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00001.bat
... ELSE set variable curl -kv \ tv.cctv.com
${stringlist} run keyword if '${systemType}'=='Windows' Create List CCTV节目官网 Tango Secure Gateway CA
... ELSE Create List CCTV节目官网 Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变拦截策略
${policyDict} Create Dictionary policyId=${intercept_monitor_policyId} source=${monitor_objectId46}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Intercept-monitor-01 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${monitor_objectId47}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 改变Monitor策略
${policyDict} Create Dictionary policyId=${monitor_policyId} source=${monitor_objectId46}|TSG_SECURITY_SOURCE_LOCATION policyName=Proxy-Policy-monitor-00001 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","protocol":"HTTP"} filterList=${monitor_objectId47}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00001_1.bat
... ELSE set variable curl -kv \ curl -kv http://www.vancl.com/?source=vancl_net
${stringlist} run keyword if '${systemType}'=='Windows' Create List 凡客VANCL
... ELSE Create List 凡客VANCL
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-Monitor-00002
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00002.bat
... ELSE set variable curl -kv \ \ https://www.parkpennies.com/index.htm
${stringlist} run keyword if '${systemType}'=='Windows' Create List Disneyland Pressed Coins Tango Secure Gateway CA
... ELSE Create List Disneyland Pressed Coins Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
# Proxy-Policy-Monitor-00003
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003.bat
# ... ELSE set variable curl -kv \ https://railways.kz/
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
# ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003_1.bat
# ... ELSE set variable curl -kv \ https://creativetravelgroup.com/
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
# ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003_2.bat
# ... ELSE set variable curl -kv \ https://www.hinabian.com/
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
# ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003_3.bat
# ... ELSE set variable curl -kv \ https://www.smithsonianjourneys.org/
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
# ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
# ${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-Monitor-00004
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00004_1.bat
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://v.qq.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 腾讯视频 Tango Secure Gateway CA
... ELSE Create List 腾讯视频 Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变拦截策略
${policyDict} Create Dictionary policyId=${intercept_monitor_policyId3} policyName=SecurityPolicy-Intercept-monitor-04 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${monitor_objectId48}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 改变Monitor策略
${policyDict} Create Dictionary policyId=${monitor_policyId3} policyName=Proxy-Policy-monitor-00004-01 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","protocol":"HTTP"} filterList=${monitor_objectId48}|TSG_FIELD_HTTP_HOST,${monitor_objectId49}|TSG_FIELD_HTTP_URL,${monitor_objectId50}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00004_2.bat
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' http://www.kumi.cn/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 最新动画片
... ELSE Create List 最新动画片
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-Monitor-00005
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00005.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://americantesol.com/tesol-register.html
${stringlist} run keyword if '${systemType}'=='Windows' Create List 高清视频在线观看 Tango Secure Gateway CA
... ELSE Create List 高清视频在线观看 Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-Monitor-00006
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00006.bat
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.playgroundsessions.com/about/software-features
${stringlist} run keyword if '${systemType}'=='Windows' Create List PP视频 Tango Secure Gateway CA
... ELSE Create List PP视频 Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-Monitor-00007
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00007.bat
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.pptv.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List PP视频 Tango Secure Gateway CA
... ELSE Create List PP视频 Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-Monitor-00008
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00008.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/' http://www.zhenai.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 珍爱网-征婚
... ELSE Create List 珍爱网-征婚
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变拦截策略
${policyDict} Create Dictionary policyId=${intercept_monitor_policyId7} policyName=SecurityPolicy-Intercept-monitor-0801 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${monitor_objectId51}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Comment 改变阻断策略
${policyDict} Create Dictionary policyId=${monitor_policyId7} policyName=Proxy-Policy-monitor-00008-1 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","protocol":"HTTP"} filterList=${monitor_objectId52}|TSG_FIELD_HTTP_URL,${monitor_objectId53}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00008_1.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://love.163.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango 花田,网易
... ELSE Create List Tango 花田,网易
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-Monitor-00009
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00009.bat
... ELSE set variable curl http://v.iqilu.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 山东网络台
... ELSE Create List 山东网络台
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-Monitor-00010
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_000010.bat
... ELSE set variable curl http://www.fun.tv/movie/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 风行电影频道
... ELSE Create List 风行电影频道
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-Monitor-00011
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00011.bat
... ELSE set variable curl http://tutcandy.com/2009/04/ai-sketch-to-vector-tutorial
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00011.bat
... ELSE set variable curl http://tutcandy.com/2009/04/ai-sketch-to-vector-tutorial
${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
${rescode} SystemCommands ${commandstr} ${stringlist}
# Proxy-Policy-Monitor-00012
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00012.bat
# ... ELSE set variable curl -kv --cookie "lQfQ_2132_saltkey=t8WY1oPe; lQfQ_2132_lastvisit=1595381790; lQfQ_2132_sid=vqXOg6; lQfQ_2132_lastact=1595385400%09forum.php%09image" --referer 'https://www.baidu.com/' \ https://www.youqulu.com/category/zixun
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List 123456789 Tango Secure Gateway CA
# ... ELSE Create List 123456789 Tango Secure Gateway CA
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Proxy-Policy-Monitor-00013
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013.bat
# ... ELSE set variable curl -kv \ https://www.nypl.org/books-music-movies
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA
# ... ELSE Create List 一直相信 Tango Secure Gateway CA
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013_1.bat
# ... ELSE set variable curl -kv https://www.thailand.com.co/category-207-b0.html
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA
# ... ELSE Create List 一直相信 Tango Secure Gateway CA
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013_2.bat
# ... ELSE set variable curl -kv \ https://bj.zu.ke.com/zufang
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA
# ... ELSE Create List 一直相信 Tango Secure Gateway CA
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013_3.bat
# ... ELSE set variable curl -kv \ https://nationalbank.kz/?switch=kazakh
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA
# ... ELSE Create List 一直相信 Tango Secure Gateway CA
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Proxy-Policy-Monitor-00014
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014.bat
# ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
# ... ELSE Create List Connection was reset
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Comment 改变阻断策略
# ${policyDict} Create Dictionary policyId=${deny_policyId13} policyName=Proxy-Policy-Monitor-00014-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${deny_objectId54}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
# log ${policyDict}
# ${rescode} UpdatePolicies 1 ${policyDict} v2 update
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014_1.bat
# ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"denyTest0014","setcook":"12345678","contenttype": "content-type","responsebody": "Response Body"}" http://open.node.com/go
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
# ... ELSE Create List Connection was reset
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Proxy-Policy-Monitor-00015
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00015.bat
# ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"lkjh","setcook":"qeqew","contenttype": "content-type","responsebody": "ASDFG"}" http://open.node.com/go
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
# ... ELSE Create List Connection was reset
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Comment 改变阻断策略
# ${policyDict} Create Dictionary policyId=${deny_policyId14} policyName=Proxy-Policy-Monitor-00014-1 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${deny_objectId55}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
# log ${policyDict}
# ${rescode} UpdatePolicies 1 ${policyDict} v2 update
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00015.bat
# ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"lkjh","setcook":"qeqew","contenttype": "content-type","responsebody": "deny015"}" http://open.node.com/go
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
# ... ELSE Create List Connection was reset
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Proxy-Policy-Monitor-00016
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00018.bat
# ... ELSE set variable curl -kv https://www.stewart.com/en.html
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00018.bat
# ... ELSE set variable curl -kv https://www.stewart.com/en.html
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
# ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Proxy-Policy-Monitor-00017
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00016.bat
# ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"mnbv","setcook":"asdf","contenttype": "content-type","responsebody": "adzx"}" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/go
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found
# ... ELSE Create List Not Found
# ${rescode} SystemCommands ${commandstr} ${stringlist}
# Proxy-Policy-Monitor-00018
# Comment 功能端验证HTTP验证
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00017.bat
# ... ELSE set variable curl -kv --cookie "test%20cookie=null; timezoneoffset=-480; ASP.NET_SessionId=sta2b3gxpxzqei3by1ka3qsa; visid_incap_1010467=Iu/pLzeoTnGn2VDjWdP9GpoBGF8AAAAAQUIPAAAAAADzSLZtZ1tZ/Rbjfct3Nq69" --referer 'https://www.baidu.com/' \ https://www.umusicpub.com/au/
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
# ... ELSE Create List Connection reset by peer Tango Secure Gateway CA
# ${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -53,27 +53,27 @@ Proxy-Policy-redirect-00002
Proxy-Policy-redirect-00003
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00003.bat
... ELSE set variable curl -kv https://mytinyurl.net/
${stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.iceo.com.cn/renwu2013/ Tango Secure Gateway CA
... ELSE Create List http://www.iceo.com.cn/renwu2013/ Tango Secure Gateway CA
... ELSE set variable curl -kv https://www.deepin.org/zh/
${stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.baidu.com/ Tango Secure Gateway CA
... ELSE Create List https://www.baidu.com/ Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00003_1.bat
... ELSE set variable curl -kv https://www.hugedomains.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.iceo.com.cn/renwu2013/ Tango Secure Gateway CA
... ELSE Create List http://www.iceo.com.cn/renwu2013/ Tango Secure Gateway CA
... ELSE set variable curl -kv https://www.vmall.com/?cid=10000089&wi=mid:138,fid:139,cid:10000089,wi:88605_387_0__1
${stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.baidu.com/ Tango Secure Gateway CA
... ELSE Create List https://www.baidu.com/ Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00003_2.bat
... ELSE set variable curl -kv https://www.shrunken.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.iceo.com.cn/renwu2013/ Tango Secure Gateway CA
... ELSE Create List http://www.iceo.com.cn/renwu2013/ Tango Secure Gateway CA
... ELSE set variable curl -kv https://www.suning.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.baidu.com/ Tango Secure Gateway CA
... ELSE Create List https://www.baidu.com/ Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00003_3.bat
... ELSE set variable curl -kv https://sg.sgness.click/
${stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.iceo.com.cn/renwu2013/ Tango Secure Gateway CA
... ELSE Create List http://www.iceo.com.cn/renwu2013/ Tango Secure Gateway CA
... ELSE set variable curl -kv https://flights.ctrip.com/international/search/domestic
${stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.baidu.com/ Tango Secure Gateway CA
... ELSE Create List https://www.baidu.com/ Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-redirect-00004
@@ -195,6 +195,11 @@ Proxy-Policy-redirect-00013
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-redirect-00014
Comment 此处拦截策略与之前策略有策略的相互影响,策略验证步骤再启动安全策略
${policyDict} Create Dictionary policyId=${intercept_redirect_policyId13} policyName=SecurityPolicy-Intercept-redirect-0014and0015 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${redirect_objectId34}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00014.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"testredirect0014001","setcook":"monitortest142","contenttype": "content-type","responsebody": "testredirect0014001"}" -kv http://open.node.com/go

View File

@@ -151,6 +151,16 @@ Proxy-Policy-replace-00009
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-replace-00010
Comment 此处拦截策略与之前策略有策略的相互影响,做验证之前先将策略启动
${policyDict} Create Dictionary policyId=${intercept_replace_policyId9} policyName=SecurityPolicy-Intercept-replace-10 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${replace_objectId22}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 此处replace策略与之后策略有策略的相互影响做验证之前先将策略启动
Comment 启动Replace策略
${policyDict} Create Dictionary policyId=${replace_policyId9} policyName=Proxy-Policy-replace-00010-1 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_body","find":"hello","replace_with":"111111"}],"protocol":"HTTP"} filterList=${replace_objectId23}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00010.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"testpolicyreplace_0010","setcook":"12345678","contenttype": "content-type","responsebody": "helloreplace0010"}" -kv http://open.node.com/go
@@ -168,7 +178,11 @@ Proxy-Policy-replace-00010
${stringlist} run keyword if '${systemType}'=='Windows' Create List chifan
... ELSE Create List chifan
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 使用后将策略失效,防止影响后续的策略
${policyDict} Create Dictionary policyId=${replace_policyId9} policyName=Proxy-Policy-replace-00010-1 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_body","find":"helloreplace0010","replace_with":"chifan"}],"protocol":"HTTP"} filterList=${replace_objectId23}|TSG_FIELD_HTTP_URL isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Proxy-Policy-replace-00011
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_replace_00011.bat

View File

@@ -24,7 +24,6 @@ Proxy-Policy-allow-00001
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${allow_policyId}
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host mp.pipix.com
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host games.sina.com.cn
Proxy-Policy-allow-00002
#删除对象

View File

@@ -19,8 +19,8 @@ ${profiledId} ${EMPTY}
Proxy-Policy-deny-00001
#删除对象
${objectids} set Variable ${deny_objectId}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId46}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId47}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId56}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId57}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId}]}
@@ -219,8 +219,9 @@ Proxy-Policy-deny-00016
#删除文件
${profiledId} set Variable ${deny_profileId5}
#删除对象
${objectids} set Variable ${deny_objectId49}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId47}
${objectids} set Variable ${deny_objectId47}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId58}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_objectId59}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_deny_policyId15}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${deny_policyId17}]}

View File

@@ -159,7 +159,7 @@ Proxy-Policy-hijack-00010
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId9}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId9}
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host tianya.cn
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host chaxun.1616.net
Proxy-Policy-hijack-00011
#删除文件

View File

@@ -21,7 +21,7 @@ SecurityPolicy-Intercept-Http-00001
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${intercept_http_policyId}]}
${s} Convert to String ${intercept_http_policyId}
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.mydrivers.com
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host yumi.com
SecurityPolicy-Intercept-Http-00002
#删除对象
@@ -36,8 +36,8 @@ SecurityPolicy-Intercept-Http-00003
${objectids} set Variable ${intercept_http_objectId2}
${objectids} Catenate SEPARATOR=, ${objectids} ${intercept_http_objectId3}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${intercept_http_policyId1}]}
${s} Convert to String ${intercept_http_policyId1}
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${intercept_http_policyId2}]}
${s} Convert to String ${intercept_http_policyId2}
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
SecurityPolicy-Intercept-Http-00004
@@ -46,5 +46,5 @@ SecurityPolicy-Intercept-Http-00004
${objectids} Catenate SEPARATOR=, ${objectids} ${intercept_http_objectId5}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${intercept_http_policyId3}]}
${s} Convert to String ${intercept_http_policyId1}
${s} Convert to String ${intercept_http_policyId3}
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host zongheng.com

View File

@@ -17,9 +17,7 @@ ${objectids} ${EMPTY}
SecurityPolicy-Intercept-Ssl-00001
#删除对象
${objectids} set Variable ${intercept_ssl_objectId}
${objectids} Catenate SEPARATOR=, ${objectids} ${intercept_ssl_objectId2}
${objectids} Catenate SEPARATOR=, ${objectids} ${intercept_ssl_objectId4}
${objectids} Catenate SEPARATOR=, ${objectids} ${intercept_ssl_objectId5}
${objectids} Catenate SEPARATOR=, ${objectids} ${intercept_ssl_objectId1}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${intercept_ssl_policyId}]}
${s} Convert to String ${intercept_ssl_policyId}
@@ -27,7 +25,7 @@ SecurityPolicy-Intercept-Ssl-00001
SecurityPolicy-Intercept-Ssl-00002
#删除对象
${objectids} set Variable ${EMPTY}
${objectids} set Variable ${intercept_ssl_objectId2}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${intercept_ssl_policyId1}]}
${s} Convert to String ${intercept_ssl_policyId1}
@@ -35,8 +33,8 @@ SecurityPolicy-Intercept-Ssl-00002
SecurityPolicy-Intercept-Ssl-00003
#删除对象
${objectids} set Variable ${intercept_ssl_objectId1}
${objectids} Catenate SEPARATOR=, ${objectids} ${intercept_ssl_objectId3}
${objectids} set Variable ${intercept_ssl_objectId3}
${objectids} Catenate SEPARATOR=, ${objectids} ${intercept_ssl_objectId4}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${intercept_ssl_policyId2}]}
${s} Convert to String ${intercept_ssl_policyId2}
@@ -44,8 +42,7 @@ SecurityPolicy-Intercept-Ssl-00003
SecurityPolicy-Intercept-Ssl-00004
#删除对象
${objectids} set Variable ${EMPTY}
${objectids} Catenate SEPARATOR=, ${objectids} ${intercept_ssl_objectId6}
${objectids} set Variable ${intercept_ssl_objectId5}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${intercept_ssl_policyId3}]}
${s} Convert to String ${intercept_ssl_policyId3}

View File

@@ -25,16 +25,16 @@ SecurityPolicy-Monitor-Ssl-00001
SecurityPolicy-Monitor-Ssl-00002
#删除对象
#${objectids} set Variable ${monitor_ssl_objectId1}
${objectids} set Variable ${monitor_ssl_objectId1}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_ssl_objectId7}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_ssl_policyId1}]}
${s} Convert to String ${monitor_ssl_policyId1}
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni lenouvelliste
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni bdtruth
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni keysnews.com
SecurityPolicy-Monitor-Ssl-00003
#删除对象
#${objectids} set Variable ${monitor_ssl_objectId2}
${objectids} set Variable ${monitor_ssl_objectId2}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_ssl_policyId2}]}
${s} Convert to String ${monitor_ssl_policyId2}

View File

@@ -39,8 +39,8 @@ Proxy-Policy-monitor-00002
Proxy-Policy-monitor-00003
#删除对象
${objectids} set Variable ${monitor_objectId2}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId3}
${objectids} set Variable ${monitor_objectId3}
# ${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId3}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_monitor_policyId2}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId2}]}

View File

@@ -29,7 +29,8 @@ Proxy-Policy-redirect-00001
Proxy-Policy-redirect-00002
#删除对象
${objectids} set Variable ${redirect_objectId45}
${objectids} set Variable ${redirect_objectId1}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId45}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId50}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId1}]}
@@ -40,17 +41,17 @@ Proxy-Policy-redirect-00002
Proxy-Policy-redirect-00003
#删除对象
#${objectids} set Variable ${redirect_objectId2}
${objectids} set Variable ${redirect_objectId2}
${objectids} set Variable ${redirect_objectId3}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_redirect_policyId2}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${redirect_policyId2}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${redirect_policyId2}
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.sail-croatia
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.pagemillwinery.com
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host nwrassn.org
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.poetrysoup.com
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.deepin.org
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host flights.ctrip.com
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.vmall.com
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.suning.com
Proxy-Policy-redirect-00004
#删除对象
@@ -178,8 +179,8 @@ Proxy-Policy-redirect-00013
Proxy-Policy-redirect-00014
#删除对象
${objectids} set Variable ${redirect_objectId33}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId34}
${objectids} set Variable ${redirect_objectId34}
# ${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId34}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId47}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId53}
${objectids} Catenate SEPARATOR=, ${objectids} ${redirect_objectId54}

View File

@@ -1 +0,0 @@
curl -kv https://games.sina.com.cn/ | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl http://bbs.tianya.cn/list-39-1.shtml | iconv -f utf-8 -t gbk
curl http://chaxun.1616.net/jiemeng.htm | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl -kv https://www.sail-croatia.com/ | iconv -f utf-8 -t gbk
curl -kv https://www.deepin.org/zh/ | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl -kv https://www.pagemillwinery.com/ | iconv -f utf-8 -t gbk
curl -kv https://www.vmall.com/?cid=10000089&wi=mid:138,fid:139,cid:10000089,wi:88605_387_0__1 | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl -kv https://nwrassn.org/ | iconv -f utf-8 -t gbk
curl -kv https://www.suning.com/ | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl -kv https://www.poetrysoup.com/ | iconv -f utf-8 -t gbk
curl -kv https://flights.ctrip.com/international/search/domestic | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"testDenyHttp0014\",\"setcook\":\"12345678\",\"contenttype\": \"content-type\",\"responsebody\": \"testDenyHttp0014\"}" http://open.node.com/go | iconv -f utf-8 -t gbk
curl --connect-timeout 5 -m 10 -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"testDenyHttp0014\",\"setcook\":\"12345678\",\"contenttype\": \"content-type\",\"responsebody\": \"testDenyHttp0014\"}" http://open.node.com/go | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"biubiubiud\",\"setcook\":\"12345678\",\"contenttype\": \"content-type\",\"responsebody\": \"biubiubiud\"}" http://open.node.com/go | iconv -f utf-8 -t gbk
curl --connect-timeout 5 -m 10 -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"biubiubiud\",\"setcook\":\"12345678\",\"contenttype\": \"content-type\",\"responsebody\": \"biubiubiud\"}" http://open.node.com/go | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl http://www.huatonggs.com/about.html#gsjj | iconv -f utf-8 -t gbk
curl --connect-timeout 5 -m 10 -kv http://www.huatonggs.com/about.html#gsjj | iconv -f utf-8 -t gbk

View File

@@ -1 +1 @@
curl https://www.lenouvelliste.ch/ | iconv -f utf-8 -t gbk
curl https://www.keysnews.com/ | iconv -f utf-8 -t gbk

View File

@@ -0,0 +1 @@
halashaogusina