b步骤添加Verify用例提交

This commit is contained in:
hebingning
2021-04-12 14:51:02 +08:00
parent 213d280dc9
commit 783443473c
34 changed files with 132 additions and 210 deletions

View File

@@ -59,10 +59,10 @@ Proxy-Policy-allow-00002
Proxy-Policy-allow-00003
[Tags] url4种匹配,fqdn_category
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*csgo500.com,*znakitaro.ru,*astrou.ru,*lunar.pw
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*csgo500.com,*znakitaro.ru,*astrou.ru
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=csgo500,$znakitaro.ru/,*trou.ru/,lun*
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=csgo500,$znakitaro.ru/,*trou.ru/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 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=114|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
@@ -298,7 +298,7 @@ Proxy-Policy-allow-00011
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*chinastock.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=yhwz/investbank
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=cgs-services/investBank.html
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建应答头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type

View File

@@ -25,8 +25,8 @@ SecurityPolicy-Deny-SIP-00001
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 monitor_sip_objectId38 ${object_Ip_Id}
insert_policyId_to_file1 monitor_sip_objectId39 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_objectId38 ${object_Ip_Id}
insert_policyId_to_file1 deny_sip_objectId39 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_policyId ${policyId}
SecurityPolicy-Deny-SIP-00001-1
@@ -45,8 +45,8 @@ SecurityPolicy-Deny-SIP-00001-1
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 monitor_sip_objectId40 ${object_Ip_Id}
insert_policyId_to_file1 monitor_sip_objectId41 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_objectId40 ${object_Ip_Id}
insert_policyId_to_file1 deny_sip_objectId41 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_policyId24 ${policyId}
SecurityPolicy-Deny-SIP-00001-2
@@ -70,9 +70,9 @@ SecurityPolicy-Deny-SIP-00001-2
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 monitor_sip_objectId42 ${object_Ip_Id}
insert_policyId_to_file1 monitor_sip_objectId43 ${object_Ip_Id1}
insert_policyId_to_file1 monitor_sip_objectId44 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_objectId42 ${object_Ip_Id}
insert_policyId_to_file1 deny_sip_objectId43 ${object_Ip_Id1}
insert_policyId_to_file1 deny_sip_objectId44 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_policyId25 ${policyId}
SecurityPolicy-Deny-SIP-00001-3
@@ -96,9 +96,9 @@ SecurityPolicy-Deny-SIP-00001-3
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 monitor_sip_objectId45 ${object_Ip_Id}
insert_policyId_to_file1 monitor_sip_objectId46 ${object_Ip_Id1}
insert_policyId_to_file1 monitor_sip_objectId47 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_objectId45 ${object_Ip_Id}
insert_policyId_to_file1 deny_sip_objectId46 ${object_Ip_Id1}
insert_policyId_to_file1 deny_sip_objectId47 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_policyId26 ${policyId}
SecurityPolicy-Deny-SIP-00001-4
@@ -122,9 +122,9 @@ SecurityPolicy-Deny-SIP-00001-4
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 monitor_sip_objectId48 ${object_Ip_Id}
insert_policyId_to_file1 monitor_sip_objectId49 ${object_Ip_Id1}
insert_policyId_to_file1 monitor_sip_objectId50 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_objectId48 ${object_Ip_Id}
insert_policyId_to_file1 deny_sip_objectId49 ${object_Ip_Id1}
insert_policyId_to_file1 deny_sip_objectId50 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_policyId27 ${policyId}
SecurityPolicy-Deny-SIP-00001-5
@@ -148,9 +148,9 @@ SecurityPolicy-Deny-SIP-00001-5
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 monitor_sip_objectId51 ${object_Ip_Id}
insert_policyId_to_file1 monitor_sip_objectId52 ${object_Ip_Id1}
insert_policyId_to_file1 monitor_sip_objectId53 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_objectId51 ${object_Ip_Id}
insert_policyId_to_file1 deny_sip_objectId52 ${object_Ip_Id1}
insert_policyId_to_file1 deny_sip_objectId53 ${object_Account_Id1}
insert_policyId_to_file1 deny_sip_policyId28 ${policyId}
SecurityPolicy-Deny-SIP-00002

View File

@@ -573,3 +573,6 @@ Proxy-Policy-deny-00018
insert_policyId_to_file1 deny_objectId45 ${object_body_Id}
insert_policyId_to_file1 intercept_deny_policyId14 ${policyId1}
insert_policyId_to_file1 deny_policyId16 ${policyId2}
Proxy-Policy-deny-00018
[Tags] substring

View File

@@ -360,7 +360,7 @@ Proxy-Policy-insert-00011
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=cwyw
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求
Comment 创建应答
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建insert文件

View File

@@ -53,7 +53,7 @@ Proxy-Policy-replace-00002
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=airastana.com
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建url2
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*airastana.com
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=airastana.com*
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-replace policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=109|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
@@ -327,7 +327,7 @@ Proxy-Policy-replace-00011
${policyId1} Get-Pids ${policyId1}
${policyId1} Set Variable ${policyId1}[0]
Comment 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00011 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00011 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST,${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
${policyId2} Get-Pids ${policyId2}
@@ -356,7 +356,7 @@ Proxy-Policy-replace-00012
${policyId1} Get-Pids ${policyId1}
${policyId1} Set Variable ${policyId1}[0]
Comment 创建replace策略
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00012 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyName=Proxy-Policy-replace-00012 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST,${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
${policyId2} Get-Pids ${policyId2}

View File

@@ -62,12 +62,6 @@ Proxy-Policy-allow-00003
${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_allow_00003_3.bat
... ELSE set variable curl -kv https://lunar.pw/
${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-00004
Comment 功能端验证HTTP验证
@@ -145,6 +139,7 @@ Proxy-Policy-allow-00011
${policyDict} Create Dictionary policyId=${allow_policyId10} policyName=Proxy-Policy-allow-00011_1 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${allow_objectId26}|TSG_FIELD_HTTP_URL,${allow_objectId42}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00011.bat
... ELSE set variable curl http://www.chinastock.com.cn/newsite/cgs-services/investBank.html
${stringlist} run keyword if '${systemType}'=='Windows' Create List 中国银河证券

View File

@@ -60,7 +60,7 @@ SecurityPolicy-Allow-Ssl-00001
SecurityPolicy-Allow-Ssl-00002
#新增策略验证
#创建attributes中的字典
${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "homebank.kz"}
${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "xinyue.qq.com"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}

View File

@@ -176,7 +176,7 @@ Proxy-Policy-allow-00006
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.choicehotels.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.choicehotels.com/quality-inn"}
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0aaffwefweaf","district": "User-Agent"}
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "AppleWebKit","district": "User-Agent"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
@@ -232,7 +232,7 @@ Proxy-Policy-allow-00008
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.sse.com.cn"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.sse.com.cn/market/overview/"}
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "html/text","district": "Content-Type"}
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "666html","district": "Content-Type"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
@@ -314,7 +314,6 @@ Proxy-Policy-allow-000010
Proxy-Policy-allow-000011
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.chinastock.com.cn"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.chinastock.com.cn/newsite/cgs-services/investBank.html"}
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
@@ -322,14 +321,14 @@ Proxy-Policy-allow-000011
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct}
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_objectId25} ${allow_objectId26} ${allow_objectId42} ${allow_policyId10}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_objectId26} ${allow_objectId42} ${allow_policyId10}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}
${testType} Evaluate type($objectid_verify)
@@ -425,7 +424,7 @@ Proxy-Policy-allow-000014
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn}
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} ${req_hdr_ua} ${req_hdr_ck} ${res_hdr_sc}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
log ${verifyList}

View File

@@ -44,27 +44,27 @@ SecurityPolicy-Deny-Dns-00002
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.arctictrucks.ru 8.8.8.8
... ELSE set variable nslookup -debug -query=A \ www.arctictrucks.ru
${stringlist} run keyword if '${systemType}'=='Windows' Create List 192.168.41.186 www.jd.com ttl = 500
... ELSE Create List 192.168.41.186 www.jd.com ttl = 500
${stringlist} run keyword if '${systemType}'=='Windows' Create List www.arctictrucks.ru
... ELSE Create List www.arctictrucks.ru
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d wifika.ru 8.8.8.8
... ELSE set variable nslookup -debug -query=A \ wifika.ru
${stringlist} run keyword if '${systemType}'=='Windows' Create List 192.168.41.186 www.jd.com ttl = 500
... ELSE Create List 192.168.41.186 www.jd.com ttl = 500
${stringlist} run keyword if '${systemType}'=='Windows' Create List wifika.ru
... ELSE Create List wifika.ru
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Deny-Dns-00003
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d aec188.com 8.8.8.8
... ELSE set variable nslookup -debug -query=AAAA harfordemcomm.org
${stringlist} run keyword if '${systemType}'=='Windows' Create List fc00::2:11 www.taobao.com ttl = 400
... ELSE Create List fc00::2:11 www.taobao.com ttl = 400
${stringlist} run keyword if '${systemType}'=='Windows' Create List aec188.com
... ELSE Create List aec188.com
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d huitu.com 8.8.8.8
... ELSE set variable nslookup -debug -query=AAAA harfordemcomm.org
${stringlist} run keyword if '${systemType}'=='Windows' Create List fc00::2:11 www.taobao.com ttl = 400
${stringlist} run keyword if '${systemType}'=='Windows' Create List huitu.com
... ELSE Create List fc00::2:11 www.taobao.com ttl = 400
${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -40,7 +40,7 @@ SecurityPolicy-Deny-Ftp-00004
SecurityPolicy-Deny-Ftp-00005
Comment 开启阻断策略
${policyDict} Create Dictionary policyId=${deny_dns_policyId4} policyName=SecurityPolicy-Deny-FTP-00005-1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"FTP","method":"drop"} isValid=${1} appIdObjects=${FTP_ID}
${policyDict} Create Dictionary policyId=${deny_ftp_policyId4} policyName=SecurityPolicy-Deny-FTP-00005-1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"FTP","method":"drop"} isValid=${1} appIdObjects=${FTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证

View File

@@ -79,6 +79,7 @@ SecurityPolicy-Deny-Http-00004
${policyDict} Create Dictionary policyId=${deny_http_policyId3} policyName=SecurityPolicy-Deny-Http-00004_1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"block","code":404,"message":"yyyyy"} filterList=${deny_http_objectId37}|TSG_FIELD_HTTP_REQ_HDR,${deny_http_objectId38}|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/SecurityPolicy_Deny_HTTP_00004.bat
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' \http://www.tsutmb.ru/sveden
@@ -126,6 +127,7 @@ SecurityPolicy-Deny-Http-00008
${policyDict} Create Dictionary policyId=${deny_http_policyId7} policyName=SecurityPolicy-Deny-Http-00008_1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"rst"} filterList=${deny_http_objectId39}|TSG_FIELD_HTTP_RES_HDR,${deny_http_objectId11}|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/SecurityPolicy_Deny_HTTP_00008.bat
... ELSE set variable curl -m 10 http://www.cmbchina.com/CmbQuesInfo/index.aspx
@@ -149,7 +151,7 @@ SecurityPolicy-Deny-Http-00010
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变阻断策略
${policyDict} Create Dictionary policyId=${deny_http_policyId3} policyName=SecurityPolicy-Deny-Http-00010_1 destination=24849|TSG_SECURITY_DESTINATION_ADDR policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${deny_http_objectId16}|TSG_FIELD_HTTP_RES_HDR,${deny_http_objectId15}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
${policyDict} Create Dictionary policyId=${deny_http_policyId9} policyName=SecurityPolicy-Deny-Http-00010_1 destination=24849|TSG_SECURITY_DESTINATION_ADDR policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${deny_http_objectId16}|TSG_FIELD_HTTP_RES_HDR,${deny_http_objectId15}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证

View File

@@ -33,6 +33,7 @@ SecurityPolicy-Deny-Mail-00001
${policyDict} Create Dictionary policyId=${deny_mail_policyId} source=${deny_mail_objectId32}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Deny-Mail-00001-1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"MAIL","method":"drop"} filterList=${deny_mail_objectId33}|TSG_FIELD_MAIL_CONTENT isValid=${1} appIdObjects=${MAIL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Comment 功能端验证
${Smtp服务器} Set Variable Smtp.163.com
${Smtp服务器端口} Set Variable 25
@@ -70,7 +71,8 @@ SecurityPolicy-Deny-Mail-00002
Comment 改变监控策略
${policyDict} Create Dictionary policyId=${deny_mail_policyId1} policyName=SecurityPolicy-Deny-Mail-00002-1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"MAIL","method":"drop"} filterList=${deny_mail_objectId34}|TSG_FIELD_MAIL_ATT_CONTENT isValid=${1} appIdObjects=${MAIL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Comment 功能端验证
${Smtp服务器} Set Variable Smtp.163.com
${Smtp服务器端口} Set Variable 25

View File

@@ -265,7 +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验证

View File

@@ -80,7 +80,7 @@ SecurityPolicy-Deny-Ftp-00002
SecurityPolicy-Deny-Ftp-00003
# # 新增策略验证
# 创建attributes中的字典
${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "192.168.40.158/wlcsy.txt"}
${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "ftp://192.168.40.158/wlcsy.txt"}
${Content} Create Dictionary attributeType=string attributeName=content appId=104 appName=ftp protocol=http attributeValue={"string": "中文文件内容"}
${Account} Create Dictionary attributeType=string attributeName=account appId=104 appName=ftp protocol=http attributeValue={"string": "ftpuser"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "104"}
@@ -103,7 +103,7 @@ SecurityPolicy-Deny-Ftp-00003
SecurityPolicy-Deny-Ftp-00004
# # 新增策略验证
# 创建attributes中的字典
${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "192.168.40.158/aewn.txt"}
${url} Create Dictionary attributeType=string attributeName=url appId=104 appName=ftp protocol=ftp attributeValue={"string": "ftp://192.168.40.158/aewn.txt"}
${Content} Create Dictionary attributeType=string attributeName=content appId=104 appName=ftp protocol=http attributeValue={"string": "завезенными"}
${Account} Create Dictionary attributeType=string attributeName=account appId=104 appName=ftp protocol=http attributeValue={"string": "ftpuser"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "104"}

View File

@@ -271,33 +271,6 @@ SecurityPolicy-Deny-Http-00009
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Http-00010
#新增策略验证
#创建attributes中的字典
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.avaxsearch.com/tangkas/"}
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "utf-8aabnna","district": "Content-Type"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${res_hdr_ct}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId11} ${deny_http_objectId39} ${deny_http_policyId7}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log ${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Http-00011
#新增策略验证

View File

@@ -30,14 +30,14 @@ Resource ../../../05-Other/AllFlowCaseVariable.txt
SecurityPolicy-Deny-Mail-00001
# # 新增策略验证
# 创建attributes中的字典
${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"Простопорно"}
${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"}
${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"string": "Простопорно"}
${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"}
# 合成attributes字典集
${attributes} Create List ${content_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid}
${attributes} Create List ${content_id} ${from_id} ${app_id} ${ipsource} ${ipdestination} ${subscriberid}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
${rescode} ${resData} VerifyPolicies ${verifyList}
@@ -45,7 +45,7 @@ SecurityPolicy-Deny-Mail-00001
# 打印检查结果
# 将 策略id 加入对象 id
${objectid_verify} set variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId33} ${deny_mail_policyId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId33} ${deny_mail_policyId}
#sleep 5
# 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
${ok} VerifyProxy ${resData} ${objectid_verify}
@@ -69,7 +69,7 @@ SecurityPolicy-Deny-Mail-00002
# 打印检查结果
# 将 策略id 加入对象 id
${objectid_verify} set variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId34} ${deny_mail_policyId1}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_mail_objectId34} ${deny_mail_policyId1}
#sleep 5
# 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
${ok} VerifyProxy ${resData} ${objectid_verify}
@@ -382,7 +382,7 @@ SecurityPolicy-Deny-Mail-00015
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "人生路远及时行乐"}
${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"string": "good"}
${att_content_id} Create Dictionary attributeType=string attributeName=att_content appId=110 appName=mail protocol=mail attributeValue={"string": "Простопорно"}
${account_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"}
${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"}
${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning2021@163.com"}
${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}

View File

@@ -90,7 +90,7 @@ Proxy-Policy-deny-00003
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
Proxy-Policy-allow-00004
Proxy-Policy-deny-00004
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "bbs.nga.cn"}
@@ -150,8 +150,8 @@ Proxy-Policy-deny-00006
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.playgroundsessions.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.choicehotels.com/quality-inn"}
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0aaffwefweaf","district": "User-Agent"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.playgroundsessions.com/about/software-features"}
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "AppleWebKit","district": "User-Agent"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
@@ -248,7 +248,7 @@ Proxy-Policy-deny-00009
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId19} ${deny_objectId20} ${deny_objectId21} ${deny_policyId8}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId20} ${deny_objectId21} ${deny_policyId8}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}
${testType} Evaluate type($objectid_verify)
@@ -437,7 +437,7 @@ Proxy-Policy-deny-000016
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "mt.meipai.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "mt.meipai.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "mt.meipai.com/"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
@@ -460,44 +460,14 @@ Proxy-Policy-deny-000016
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
Proxy-Policy-deny-000017
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.orbitz.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.orbitz.com/Flights"}
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "charset=text","district": "Content-Type"}
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0fsfwhh","district": "User-Agent"}
${req_body} Create Dictionary attributeType=string attributeName=req_body appId=106 appName=http protocol=http attributeValue={"string": "ProxydenyTest001402"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct} ${req_hdr_ua} ${req_body}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId36} ${deny_objectId37} ${deny_objectId38} ${deny_objectId39} ${deny_objectId40} ${deny_policyId15}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log ${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
Proxy-Policy-deny-000018
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.orbitz.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.orbitz.com/Flights"}
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "__stripe_sidafdsvxvx","district": "Cookie"}
${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "afsf123Domain=.orbitz.com","district": "Set-Cookie"}
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "Proxydeny001502"}
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.umusicpub.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.umusicpub.com/au/"}
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "timezoneoffset","district": "Cookie"}
${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "Domain=.umusicpub.com","district": "Set-Cookie"}
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "NOFOLLOW"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}

View File

@@ -43,7 +43,7 @@ SecurityPolicy-Intercept-Http-00003
${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/
... ELSE set variable curl http://open.node.com:180/
${stringlist} run keyword if '${systemType}'=='Windows' Create List POST
... ELSE Create List POST
${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -151,7 +151,7 @@ Proxy-Policy-insert-00006
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.farecompare.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.farecompare.com/hotels/"}
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "safrisyAppleWebKit,"district": "User-Agent"}
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "safrisyAppleWebKit","district": "User-Agent"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
@@ -234,7 +234,7 @@ Proxy-Policy-insert-00009
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.world-guides.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.world-guides.com/north-america/usa/nevada/las-vegas/"}
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html; charset=utf-8","district": "Content-Type"}
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
@@ -290,13 +290,13 @@ Proxy-Policy-insert-00011
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "otc.newone.com.cn"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "otc.newone.com.cn/cwyw"}
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "textobj","district": "Cookie"}
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html","district": "Content-Type"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck}
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
log ${verifyList}
@@ -318,7 +318,7 @@ Proxy-Policy-insert-00012
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "petapixel.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "petapixel.com/topic/equipment/"}
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "1323saltkeyafsfs","district": "Content-Type"}
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "saltkey","district": "Cookie"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
@@ -350,13 +350,13 @@ Proxy-Policy-insert-00013
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0fsfwhh","district": "User-Agent"}
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "__stripe_sidafdsvxvx","district": "Cookie"}
${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "Domain=.intervalworld.com","district": "Set-Cookie"}
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "Proxydeny001502"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${res_body}
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc}
... ${res_hdr_ct} ${req_hdr_ua}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
log ${verifyList}

View File

@@ -54,29 +54,5 @@ SecurityPolicy-Intercept-Ssl-00002
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Intercept-Http-00003
#新增策略验证
#创建attributes中的字典
${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "www.xs8.cn"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${sni}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${intercept_ssl_objectId4} ${intercept_ssl_policyId2}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log ${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true

View File

@@ -27,11 +27,10 @@ Library ../../../04-CustomLibrary/Library/VerifyPolicy.py
Resource ../../../05-Other/AllFlowCaseVariable.txt
*** Test Cases ***
SecurityPolicy-Deny-Mail-00001
SecurityPolicy-Monitor-Mail-00001
# # 新增策略验证
# 创建attributes中的字典
${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"zzzzzzz"}
${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"string": "zzzzzzz"}
${app_id} Create Dictionary attributeType=string attributeName=app_id protocol=mail attributeValue={"string": "110"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
@@ -52,7 +51,7 @@ SecurityPolicy-Deny-Mail-00001
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00002
SecurityPolicy-Monitor-Mail-00002
# # 新增策略验证
# 创建attributes中的字典
${att_content_id} Create Dictionary attributeType=string attributeName=att_content appId=110 appName=mail protocol=mail attributeValue={"string": "朱明明测试文件内容"}
@@ -76,7 +75,7 @@ SecurityPolicy-Deny-Mail-00002
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00003
SecurityPolicy-Monitor-Mail-00003
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "асятся"}
@@ -101,7 +100,7 @@ SecurityPolicy-Deny-Mail-00003
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00004
SecurityPolicy-Monitor-Mail-00004
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "后天周末"}
@@ -126,7 +125,7 @@ SecurityPolicy-Deny-Mail-00004
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00005
SecurityPolicy-Monitor-Mail-00005
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "9876543210zxcv"}
@@ -151,7 +150,7 @@ SecurityPolicy-Deny-Mail-00005
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00006
SecurityPolicy-Monitor-Mail-00006
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "Tomatorhahaha"}
@@ -176,7 +175,7 @@ SecurityPolicy-Deny-Mail-00006
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00007
SecurityPolicy-Monitor-Mail-00007
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "планируете"}
@@ -201,7 +200,7 @@ SecurityPolicy-Deny-Mail-00007
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00008
SecurityPolicy-Monitor-Mail-00008
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "asdf741852"}
@@ -226,7 +225,7 @@ SecurityPolicy-Deny-Mail-00008
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00009
SecurityPolicy-Monitor-Mail-00009
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "马上又过一天"}
@@ -251,7 +250,7 @@ SecurityPolicy-Deny-Mail-00009
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00010
SecurityPolicy-Monitor-Mail-00010
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "weekend"}
@@ -276,7 +275,7 @@ SecurityPolicy-Deny-Mail-00010
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00011
SecurityPolicy-Monitor-Mail-00011
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "邮件发送成功"}
@@ -301,7 +300,7 @@ SecurityPolicy-Deny-Mail-00011
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00012
SecurityPolicy-Monitor-Mail-00012
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "ограничительным"}
@@ -326,7 +325,7 @@ SecurityPolicy-Deny-Mail-00012
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00013
SecurityPolicy-Monitor-Mail-00013
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "963258zxcvb"}
@@ -351,7 +350,7 @@ SecurityPolicy-Deny-Mail-00013
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00014
SecurityPolicy-Monitor-Mail-00014
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "一小时一天一个月"}
@@ -376,14 +375,14 @@ SecurityPolicy-Deny-Mail-00014
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
SecurityPolicy-Deny-Mail-00015
SecurityPolicy-Monitor-Mail-00015
# # 新增策略验证
# 创建attributes中的字典
${subject_id} Create Dictionary attributeType=string attributeName=subject appId=110 appName=mail protocol=mail attributeValue={"string": "要留清白在人间"}
${content_id} Create Dictionary attributeType=string attributeName=content appId=110 appName=mail protocol=mail attributeValue={"string": "good"}
${att_content_id} Create Dictionary attributeType=string attributeName=att_content appId=110 appName=mail protocol=mail attributeValue={"string": "Простопорно"}
${from_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "2662136486@qq.com"}
${account_id} Create Dictionary attributeType=string attributeName=from appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"}
${account_id} Create Dictionary attributeType=string attributeName=account appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"}
${to_id} Create Dictionary attributeType=string attributeName=to appId=110 appName=mail protocol=mail attributeValue={"string": "hebingning@geedgenetworks.com"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}

View File

@@ -88,7 +88,8 @@ Proxy-Policy-redirect-00004
Comment 改变重定向策略
${policyDict} Create Dictionary policyId=${redirect_policyId3} policyName=Proxy-Policy-redirect-00004-1 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"redirect","to":"http://www.iceo.com.cn/renwu2013/","code":302,"protocol":"HTTP"} filterList=${redirect_objectId5}|TSG_FIELD_HTTP_URL,${redirect_objectId51}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_redirect_00004.bat
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.merrilledge.com/investing/online-trading
@@ -145,6 +146,7 @@ Proxy-Policy-redirect-00010
${policyDict} Create Dictionary policyId=${intercept_redirect_policyId9} policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${redirect_objectId22}|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_00010.bat
... ELSE set variable curl -kv http://www.chinahr.com/home/bj/
@@ -155,6 +157,7 @@ Proxy-Policy-redirect-00010
${policyDict} Create Dictionary policyId=${intercept_redirect_policyId9} policyName=SecurityPolicy-Intercept-redirect policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${redirect_objectId22}|TSG_FIELD_HTTP_HOST isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 5
Proxy-Policy-redirect-00011
Comment 功能端验证HTTP验证

View File

@@ -155,12 +155,12 @@ Proxy-Policy-replace-00010
${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
sleep 5
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
sleep 10
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:180/go
@@ -171,7 +171,7 @@ Proxy-Policy-replace-00010
${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=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 3
sleep 10
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\": \"aluohareplace0015\"}" -kv http://open.node.com:180/go

View File

@@ -61,13 +61,14 @@ Proxy-Policy-redirect-00001
Proxy-Policy-redirect-00002
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "glazok.kz"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "glazok.kz/"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url}
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${fqdn}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
log ${verifyList}
@@ -143,7 +144,7 @@ Proxy-Policy-redirect-00004
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
${rescode} SystemCommands ${commandstr} ${stringlist}
Proxy-Policy-redirect-00005
#新增策略验证

View File

@@ -57,13 +57,14 @@ Proxy-Policy-replace-00001
Proxy-Policy-replace-00002
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "airastana.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "airastana.com/kaz/kk-kz/Josparlau/Kop-baghytty-ushu"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url}
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${fqdn}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
log ${verifyList}
@@ -237,7 +238,7 @@ Proxy-Policy-replace-00008
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId17} ${hijack_objectId46} ${replace_policyId7}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId17} ${replace_policyId7}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}
${testType} Evaluate type($objectid_verify)
@@ -295,7 +296,7 @@ Proxy-Policy-replace-00011
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId25} ${replace_objectId26} ${replace_objectId27} ${replace_policyId8}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId26} ${replace_objectId27} ${replace_policyId10}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}
${testType} Evaluate type($objectid_verify)
@@ -316,7 +317,7 @@ Proxy-Policy-replace-00012
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${res_hdr_ct}
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
log ${verifyList}
@@ -380,13 +381,12 @@ Proxy-Policy-replace-00014
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0fsfwhh","district": "User-Agent"}
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "__stripe_sidafdsvxvx","district": "Cookie"}
${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "Domain=.engadget.com","district": "Set-Cookie"}
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "Proxydeny001502"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${res_body}
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${req_hdr_ua} ${res_hdr_ct}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
log ${verifyList}

View File

@@ -47,7 +47,6 @@ Proxy-Policy-allow-00003
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host csgo500
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host znakitaro.ru
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host astrou.ru
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host lunar
Proxy-Policy-allow-00004
#删除对象

View File

@@ -15,46 +15,46 @@ ${objectids} ${EMPTY}
*** Test Cases ***
SecurityPolicy-Deny-SIP-00001
${objectids} set Variable ${monitor_sip_objectId38}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_sip_objectId39}
${objectids} set Variable ${deny_sip_objectId38}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_sip_objectId39}
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId}]}
${s} Convert to String ${deny_sip_policyId}
GetLogList security_event_log ${starttime} ${endtime} ${voipCallIp} ${s} sip_from test112
SecurityPolicy-Deny-SIP-00001-1
${objectids} set Variable ${monitor_sip_objectId40}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_sip_objectId41}
${objectids} set Variable ${deny_sip_objectId40}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_sip_objectId41}
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId24}]}
${s} Convert to String ${deny_sip_policyId24}
GetLogList security_event_log ${starttime} ${endtime} ${voipCallIp} ${s} sip_to test16
SecurityPolicy-Deny-SIP-00001-2
${objectids} set Variable ${monitor_sip_objectId42}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_sip_objectId43}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_sip_objectId44}
${objectids} set Variable ${deny_sip_objectId42}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_sip_objectId43}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_sip_objectId44}
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId25}]}
${s} Convert to String ${deny_sip_policyId25}
GetLogList security_event_log ${starttime} ${endtime} ${voipCallIp} ${s} sip_from test114
SecurityPolicy-Deny-SIP-00001-3
${objectids} set Variable ${monitor_sip_objectId45}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_sip_objectId46}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_sip_objectId47}
${objectids} set Variable ${deny_sip_objectId45}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_sip_objectId46}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_sip_objectId47}
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId26}]}
${s} Convert to String ${deny_sip_policyId26}
GetLogList security_event_log ${starttime} ${endtime} ${voipCallIp} ${s} sip_to test18
SecurityPolicy-Deny-SIP-00001-4
${objectids} set Variable ${monitor_sip_objectId48}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_sip_objectId49}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_sip_objectId50}
${objectids} set Variable ${deny_sip_objectId48}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_sip_objectId49}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_sip_objectId50}
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId27}]}
${s} Convert to String ${deny_sip_policyId27}
SecurityPolicy-Deny-SIP-00001-5
${objectids} set Variable ${monitor_sip_objectId51}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_sip_objectId52}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_sip_objectId53}
${objectids} set Variable ${deny_sip_objectId51}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_sip_objectId52}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_sip_objectId53}
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_sip_policyId28}]}
${s} Convert to String ${deny_sip_policyId28}