为在Linux下运行全流程做出修改

This commit is contained in:
hebingning
2021-04-20 10:37:27 +08:00
parent 0fa575a563
commit d0d44bb45e
26 changed files with 954 additions and 1518 deletions

View File

@@ -52,6 +52,7 @@ SecurityPolicy-Allow-SIP-00001-1
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 allow_sip_policyId16 ${policyId}
insert_policyId_to_file1 allow_sip_objectId30 ${object_Ip_Id}
insert_policyId_to_file1 allow_sip_objectId38 ${object_Ip_Id1}
insert_policyId_to_file1 allow_sip_objectId31 ${object_Account_Id1}
SecurityPolicy-Allow-SIP-00001-2
@@ -77,6 +78,7 @@ SecurityPolicy-Allow-SIP-00001-2
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 allow_sip_policyId17 ${policyId}
insert_policyId_to_file1 allow_sip_objectId32 ${object_Ip_Id}
insert_policyId_to_file1 allow_sip_objectId39 ${object_Ip_Id1}
insert_policyId_to_file1 allow_sip_objectId33 ${object_Account_Id1}
SecurityPolicy-Allow-SIP-00001-3

View File

@@ -274,7 +274,7 @@ SecurityPolicy-Deny-Http-00014
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 deny_http_objectId43 ${object_fqdn_Id}
insert_policyId_to_file1 deny_http_objectId431 ${object_fqdn_Id}
insert_policyId_to_file1 deny_http_objectId21 ${objectId}
insert_policyId_to_file1 deny_http_objectId40 ${objectId1}
insert_policyId_to_file1 deny_http_policyId13 ${policyId}
@@ -385,4 +385,41 @@ SecurityPolicy-Deny-Http-00019
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 deny_http_policyId18 ${policyId}
SecurityPolicy-Deny-Http-00020
[Tags] substring
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$www.xinhuanet.com/
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
Comment cookie8个子串,创建请求头
${addItemList1} Create Dictionary keywordArray=7764,636964,756964,77646c617374,363964,3666653461,3462326663,38346463633835 isHexbin=${1} district=Cookie
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ck_Id} AddObjects ${1} ${objectDict}
Comment user-agent8个子串,创建请求头
${addItemList1} Create Dictionary keywordArray=4d6f7a696c6c612f352e30,57696e646f7773,57696e3634,783634,4170706c65,65624b6974,4b48544d4c,6c696b65 isHexbin=${1} district=User-Agent
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ua_Id} AddObjects ${1} ${objectDict}
Comment cont-Type8个子串,创建应答头:text/html
${addItemList1} Create Dictionary keywordArray=7465,7874,746578,657874,74657874,6874,6d6c,68746d isHexbin=${1} district=Content-Type
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ct_Id} AddObjects ${1} ${objectDict}
# Comment set-cookie8个子串,创建应答头
# ${addItemList1} Create Dictionary keywordArray=7465,78742f,6874,6d6c,68746d6c,63686172,736574,63686172736574 isHexbin=${1} district=Set-Cookie
# ${addItemLists} Create list ${addItemList1}
# ${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
# ${rescode} ${object_ct_Id} AddObjects ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00020 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${object_url_Id}|TSG_FIELD_HTTP_URL,${object_ck_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_ct_Id}|TSG_FIELD_HTTP_RES_HDR,${object_ua_Id}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 deny_http_objectId42 ${object_url_Id}
insert_policyId_to_file1 deny_http_objectId43 ${object_ck_Id}
insert_policyId_to_file1 deny_http_objectId44 ${object_ua_Id}
insert_policyId_to_file1 deny_http_objectId45 ${object_ct_Id}
insert_policyId_to_file1 deny_http_policyId17 ${policyId}

View File

@@ -433,7 +433,7 @@ Proxy-Policy-deny-00014
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ProxydenyTest001401
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com:180
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求体2
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ProxydenyTest001402
@@ -616,3 +616,46 @@ Proxy-Policy-deny-00019
insert_policyId_to_file1 deny_objectId64 ${object_ct_Id}
insert_policyId_to_file1 intercept_deny_policyId18 ${policyId1}
insert_policyId_to_file1 deny_policyId18 ${policyId2}
# Proxy-Policy-deny-00020
# [Tags] substring
# Comment 创建fqdn
# ${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.cndns.com
# ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
# Comment 创建url
# ${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.cndns.com/cn/sms/index.aspx
# ${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
# Comment keyword8个子串,创建应答体
# ${addItemList1} Create Dictionary keywordArray=美橙短信,短信群发,到达率更强,企业营销类,短信验证,群发服务,正规106网关,联通全面 isHexbin=${0}
# ${addItemLists} Create list ${addItemList1}
# ${objectDict} Create Dictionary objectType=keywords objectSubType=keywords isValid=${1} addItemList=${addItemLists}
# ${rescode} ${object_res_cont_Id} AddObjects ${1} ${objectDict}
# Comment user-agent8个子串,创建请求头
# ${addItemList1} Create Dictionary keywordArray=4d6f7a696c6c612f352e30,57696e646f7773,57696e3634,783634,4170706c65,65624b6974,4b48544d4c,6c696b65 isHexbin=${1} district=User-Agent
# ${addItemLists} Create list ${addItemList1}
# ${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
# ${rescode} ${object_ua_Id} AddObjects ${1} ${objectDict}
# Comment cont-Type8个子串,创建应答头
# ${addItemList1} Create Dictionary keywordArray=7465,78742f,6874,6d6c,68746d6c,63686172,736574,63686172736574 isHexbin=${1} district=Content-Type
# ${addItemLists} Create list ${addItemList1}
# ${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
# ${rescode} ${object_ct_Id} AddObjects ${1} ${objectDict}
# Comment 创建拦截策略
# ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny-0019 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${object_fqdn_Id}|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 创建deny策略
# ${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00019 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_ua_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_res_cont_Id}|TSG_FIELD_HTTP_RES_CONTENT,${object_ct_Id}|TSG_FIELD_HTTP_RES_HDR 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 deny_objectId60 ${object_fqdn_Id}
# insert_policyId_to_file1 deny_objectId61 ${object_url_Id}
# insert_policyId_to_file1 deny_objectId62 ${object_res_cont_Id}
# insert_policyId_to_file1 deny_objectId63 ${object_ua_Id}
# insert_policyId_to_file1 deny_objectId64 ${object_ct_Id}
# insert_policyId_to_file1 intercept_deny_policyId18 ${policyId1}
# insert_policyId_to_file1 deny_policyId18 ${policyId2}

View File

@@ -495,3 +495,50 @@ Proxy-Policy-hijack-00014
insert_policyId_to_file1 hijack_objectId38 ${object_sk_Id}
insert_policyId_to_file1 intercept_hijack_policyId13 ${policyId1}
insert_policyId_to_file1 hijack_policyId13 ${policyId2}
Proxy-Policy-hijack-000015
[Tags] substring
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$tengrinews.kz
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=tengrinews.kz/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment set-cookie8个子串,创建应答头
${addItemList1} Create Dictionary keywordArray=68747470,6f6e6c79,70617468,4d6178,416765,474d54,6d656761,65794a isHexbin=${1} district=Set-Cookie
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_sc_Id} AddObjects ${1} ${objectDict}
Comment user-agent8个子串,创建请求头
${addItemList1} Create Dictionary keywordArray=4d6f7a696c6c612f352e30,57696e646f7773,57696e3634,783634,4170706c65,65624b6974,4b48544d4c,6c696b65 isHexbin=${1} district=User-Agent
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ua_Id} AddObjects ${1} ${objectDict}
Comment cont-Type8个子串,创建应答头:text/html
${addItemList1} Create Dictionary keywordArray=7465,7874,746578,657874,74657874,6874,6d6c,68746d isHexbin=${1} district=Content-Type
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ct_Id} AddObjects ${1} ${objectDict}
Comment 创建hijack文件
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-5.png hijack {"isValid":1,"contentType":"image/png","opAction":"add","profileName":"test4","contentName":"Create-Hijack Files-test-5.png","profileId":null,"returnData":1}
${profiledId} Get From Dictionary ${response} profileId
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-hijack15 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 创建hijack策略
${policyDict} Create Dictionary policyName=Proxy-Policy-hijack-000015 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"hijack","hijack_profile":${profiledId},"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${object_ua_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_sc_Id}|TSG_FIELD_HTTP_RES_HDR,${object_ct_Id}|TSG_FIELD_HTTP_RES_HDR 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 hijack_profileId14 ${profiledId}
insert_policyId_to_file1 hijack_objectId47 ${objectId}
insert_policyId_to_file1 hijack_objectId48 ${objectId1}
insert_policyId_to_file1 hijack_objectId49 ${object_sc_Id}
insert_policyId_to_file1 hijack_objectId50 ${object_ua_Id}
insert_policyId_to_file1 hijack_objectId51 ${object_ct_Id}
insert_policyId_to_file1 intercept_hijack_policyId14 ${policyId1}
insert_policyId_to_file1 hijack_policyId14 ${policyId2}

View File

@@ -347,3 +347,40 @@ SecurityPolicy-Monitor-Http-00017
insert_policyId_to_file1 monitor_http_objectId31 ${object_yd_Id}
insert_policyId_to_file1 monitor_http_objectId32 ${object_body_Id}
insert_policyId_to_file1 monitor_http_policyId16 ${policyId}
SecurityPolicy-Monitor-Http-00018
[Tags] substring
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$sports.xinhuanet.com/index.htm
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
Comment cookie8个子串,创建请求头
${addItemList1} Create Dictionary keywordArray=7764,636964,756964,77646c617374,363964,3666653461,3462326663,38346463633835 isHexbin=${1} district=Cookie
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ck_Id} AddObjects ${1} ${objectDict}
Comment user-agent8个子串,创建请求头
${addItemList1} Create Dictionary keywordArray=4d6f7a696c6c612f352e30,57696e646f7773,57696e3634,783634,4170706c65,65624b6974,4b48544d4c,6c696b65 isHexbin=${1} district=User-Agent
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ua_Id} AddObjects ${1} ${objectDict}
Comment cont-Type8个子串,创建应答头:text/html
${addItemList1} Create Dictionary keywordArray=7465,7874,746578,657874,74657874,6874,6d6c,68746d isHexbin=${1} district=Content-Type
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ct_Id} AddObjects ${1} ${objectDict}
# Comment set-cookie8个子串,创建应答头
# ${addItemList1} Create Dictionary keywordArray=7465,78742f,6874,6d6c,68746d6c,63686172,736574,63686172736574 isHexbin=${1} district=Set-Cookie
# ${addItemLists} Create list ${addItemList1}
# ${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
# ${rescode} ${object_ct_Id} AddObjects ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Http-00018 policyType=tsg_security policyDesc=autotest action=monitor userRegion={"protocol":"HTTP"} filterList=${object_url_Id}|TSG_FIELD_HTTP_URL,${object_ck_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_ct_Id}|TSG_FIELD_HTTP_RES_HDR,${object_ua_Id}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
${policyId} Get-Pids ${policyId}
${policyId} Set Variable ${policyId}[0]
insert_policyId_to_file1 monitor_http_objectId41 ${object_url_Id}
insert_policyId_to_file1 monitor_http_objectId42 ${object_ck_Id}
insert_policyId_to_file1 monitor_http_objectId43 ${object_ua_Id}
insert_policyId_to_file1 monitor_http_objectId44 ${object_ct_Id}
insert_policyId_to_file1 monitor_http_policyId17 ${policyId}

View File

@@ -22,7 +22,7 @@ Proxy-Policy-monitor-00001
${objectDict} Create Dictionary objectType=ip objectSubType=geo_location isValid=${1} addItemList=${addItemLists}
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
Comment 创建fqdn2
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*vancl.com
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*youzan.com
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-monitor-01 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}
@@ -237,7 +237,7 @@ Proxy-Policy-monitor-00008
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=utf-8|Content-Type
${rescode} ${objectId5} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-monitor-08 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-monitor-08 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}
@@ -438,7 +438,82 @@ Proxy-Policy-monitor-00015
${policyId2} Set Variable ${policyId2}[0]
insert_policyId_to_file1 monitor_objectId35 ${objectId}
insert_policyId_to_file1 monitor_policyId14 ${policyId2}
Proxy-Policy-monitor-00016
[Tags] substring
Comment 效果与Proxy-Policy-hijack-000015相同可以验证hijack和monitor同时命中某策略时策略日志产生情况
Comment 两个用例公用一个拦截此用例未建立b步骤两个用例公用b步骤
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$tengrinews.kz
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=tengrinews.kz/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment set-cookie8个子串,创建应答头
${addItemList1} Create Dictionary keywordArray=68747470,6f6e6c79,70617468,4d6178,416765,474d54,6d656761,65794a isHexbin=${1} district=Set-Cookie
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_sc_Id} AddObjects ${1} ${objectDict}
Comment user-agent8个子串,创建请求头
${addItemList1} Create Dictionary keywordArray=Mozilla,Windows,Win64,x64,AppleWebKit,537.36,KHTML,Chrome isHexbin=${0} district=User-Agent
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ua_Id} AddObjects ${1} ${objectDict}
Comment cont-Type8个子串,创建应答头:text/html
${addItemList1} Create Dictionary keywordArray=text,html,text/html,char,rset,arset,UTF-8,charset=UTF-8 isHexbin=${0} district=Content-Type
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ct_Id} AddObjects ${1} ${objectDict}
Comment 创建monitor策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00016 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${object_ua_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_sc_Id}|TSG_FIELD_HTTP_RES_HDR,${object_ct_Id}|TSG_FIELD_HTTP_RES_HDR 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 monitor_objectId41 ${objectId}
insert_policyId_to_file1 monitor_objectId42 ${objectId1}
insert_policyId_to_file1 monitor_objectId43 ${object_sc_Id}
insert_policyId_to_file1 monitor_objectId44 ${object_ua_Id}
insert_policyId_to_file1 monitor_objectId45 ${object_ct_Id}
insert_policyId_to_file1 monitor_policyId16 ${policyId2}
Proxy-Policy-monitor-00019
Comment 效果与Proxy-Policy-deny-00019相同可以验证deny和monitor同时命中某策略时策略日志产生情况
Comment 两个用例公用一个拦截此用例未建立b步骤两个用例公用b步骤
[Tags] substring
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.cndns.com
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.cndns.com/cn/sms/index.aspx
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
Comment keyword8个子串,创建应答体
${addItemList1} Create Dictionary keywordArray=美橙短信,短信群发,到达率更强,企业营销类,短信验证,群发服务,正规106网关,联通全面 isHexbin=${0}
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=keywords objectSubType=keywords isValid=${1} addItemList=${addItemLists}
${rescode} ${object_res_cont_Id} AddObjects ${1} ${objectDict}
Comment user-agent8个子串,创建请求头
${addItemList1} Create Dictionary keywordArray=4d6f7a696c6c612f352e30,57696e646f7773,57696e3634,783634,4170706c65,65624b6974,4b48544d4c,6c696b65 isHexbin=${1} district=User-Agent
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ua_Id} AddObjects ${1} ${objectDict}
Comment cont-Type8个子串,创建应答头
${addItemList1} Create Dictionary keywordArray=7465,78742f,6874,6d6c,68746d6c,63686172,736574,63686172736574 isHexbin=${1} district=Content-Type
${addItemLists} Create list ${addItemList1}
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
${rescode} ${object_ct_Id} AddObjects ${1} ${objectDict}
Comment 创建deny策略
${policyDict} Create Dictionary policyName=Proxy-Policy-monitor-00019 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","protocol":"HTTP"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_ua_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_res_cont_Id}|TSG_FIELD_HTTP_RES_CONTENT,${object_ct_Id}|TSG_FIELD_HTTP_RES_HDR 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 monitor_objectId36 ${object_fqdn_Id}
insert_policyId_to_file1 monitor_objectId37 ${object_url_Id}
insert_policyId_to_file1 monitor_objectId38 ${object_res_cont_Id}
insert_policyId_to_file1 monitor_objectId39 ${object_ua_Id}
insert_policyId_to_file1 monitor_objectId40 ${object_ct_Id}
insert_policyId_to_file1 monitor_policyId15 ${policyId2}
# Proxy-Policy-monitor-00016
# [Tags] 最大组合1
# Comment 创建fqdn

View File

@@ -13,7 +13,7 @@ Resource ../../../05-Other/AllFlowCaseVariable.txt
SecurityPolicy-Allow-Http-00001
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_HTTP_00001.bat
... ELSE set variable curl -L http://clintonairport.com/airlines-flights/covid/
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Allow_HTTP_00001_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List COVID
... ELSE Create List COVID
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -24,7 +24,7 @@ SecurityPolicy-Allow-Http-00001
sleep 5
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_HTTP_00001_1.bat
... ELSE set variable curl -L http://www.66rpg.com/index
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Allow_HTTP_00001_1_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List 首页 - 橙光
... ELSE Create List 首页 - 橙光
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -32,7 +32,7 @@ SecurityPolicy-Allow-Http-00001
SecurityPolicy-Allow-Http-00002
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_HTTP_00002.bat
... ELSE set variable curl http://scoutbahamas.org/
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Allow_HTTP_00002_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List ScoutBahamas.org
... ELSE Create List ScoutBahamas.org
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -43,9 +43,13 @@ SecurityPolicy-Allow-Http-00002
sleep 5
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_HTTP_00002_1.bat
... ELSE set variable curl http://www.xiang5.com/
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Allow_HTTP_00002_1L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List 女生小说-香网小说网
... ELSE Create List 女生小说-香网小说网
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_HTTP_00002_1.bat
# ... ELSE set variable curl \ http://www.xiang5.com/
# ${stringlist} run keyword if '${systemType}'=='Windows' Create List 女生小说-香网小说网
# ... ELSE Create List 女生小说-香网小说网
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Allow-Http-00003
@@ -56,7 +60,7 @@ SecurityPolicy-Allow-Http-00003
sleep ${policyModifySleepSeconds}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_HTTP_00002.bat
... ELSE set variable curl http://scoutbahamas.org/
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Allow_HTTP_00002_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List ScoutBahamas.org
... ELSE Create List ScoutBahamas.org
${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -13,7 +13,7 @@ Resource ../../../05-Other/AllFlowCaseVariable.txt
Proxy-Policy-allow-00001
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00001.bat
... ELSE set variable curl -kv https://mp.pipix.com
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_allow_00001_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List 皮皮虾下载 Tango Secure Gateway CA
... ELSE Create List 皮皮虾下载 Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -28,7 +28,7 @@ Proxy-Policy-allow-00001
sleep 10
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00001.bat
... ELSE set variable curl -kv https://mp.pipix.com
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_allow_00001_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List 皮皮虾下载 Tango Secure Gateway CA
... ELSE Create List 皮皮虾下载 Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -36,7 +36,7 @@ Proxy-Policy-allow-00001
Proxy-Policy-allow-00002
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00002.bat
... ELSE set variable curl -kv https://www.feishu.cn/solutions/scenarios/remote-work
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_allow_00002_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List www.feishu.cn Tango Secure Gateway CA
... ELSE Create List www.feishu.cn Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -44,21 +44,21 @@ Proxy-Policy-allow-00002
Proxy-Policy-allow-00003
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00003.bat
... ELSE set variable curl -kv \ https://csgo500.com/
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00003.bat
... ELSE set variable curl -kv \ https://csgo500.com/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_allow_00003_L.bat
# ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00003.bat
# ... ELSE set variable curl -kv \ https://csgo500.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List csgo500 Tango Secure Gateway CA
... ELSE Create List csgo500 Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00003_1.bat
... ELSE set variable curl -kv \ https://znakitaro.ru/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_allow_00003_1L.bat
${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_2.bat
... ELSE set variable curl -kv \ https://astrou.ru/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_allow_00003_2L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List каждые Tango Secure Gateway CA
... ELSE Create List каждые Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -99,7 +99,7 @@ Proxy-Policy-allow-00006
Proxy-Policy-allow-00007
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_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.woodsnap.com/about-us/frames
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_allow_00007_L
${stringlist} run keyword if '${systemType}'=='Windows' Create List WoodSnap Tango Secure Gateway CA
... ELSE Create List WoodSnap Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -149,22 +149,22 @@ Proxy-Policy-allow-00011
Proxy-Policy-allow-00012
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_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.virtuoso.com/destinations
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_allow_00012_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List Object moved Tango Secure Gateway CA
... ELSE Create List Object moved Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00012_2.bat
... ELSE set variable curl -kv --cookie "UM_distinctid=177195d2f67c6b-06a24c7c217958-31346d-384000-177195d2f68bcf; CNZZDATA1279340671=485789824-1611035725-null%7C1611035725; Hm_lvt_76131d7573faf448cb1cfa2a37e6e3ff=1611038274; Hm_lpvt_76131d7573faf448cb1cfa2a37e6e3ff=1611038274; _csrfToken=hcK679WZm6N2HCbL4lEBi8VIc5GD6d3nVrFPZTDP; newstatisticUUID=1611038276_1033864685" --referer 'https://www.baidu.com/' \ https://www.hongxiu.com/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_allow_00012_2L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List 红袖读书 Tango Secure Gateway CA
... ELSE Create List Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00012_3.bat
... ELSE set variable curl -kv --cookie "_csrfToken=qjRd8SBOkzGEgOrCAvpDpRLD0hqTSIoNDVZ6DpbU; newstatisticUUID=1611038238_1406562325" --referer 'https://www.baidu.com/' \ https://www.readnovel.com/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_allow_00012_3L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List 小说阅读网 Tango Secure Gateway CA
... ELSE Create List Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_allow_00012_4.bat
... ELSE set variable curl -kv --cookie "curr_url=https%3A//b.faloo.com/; host4chongzhi=http%3a%2f%2fb.faloo.com%2f" --referer 'https://www.baidu.com/' \ https://b.faloo.com/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_allow_00012_4L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango Secure Gateway CA
... ELSE Create List Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -21,22 +21,27 @@ SecurityPolicy-Deny-Ftp-00001
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证
${FTP} FTP_login ftp://192.168.40.158/123456.txt -u ftpuser:111111 123456789qwertyuiop
should contain ${FTP} ftp_fail
# should contain ${FTP} ftp_fail
run keyword if '${systemType}'=='Windows' should contain ${FTP} ftp_fail
... ELSE should contain ${发送邮件返回结果} Fail
SecurityPolicy-Deny-Ftp-00002
Comment 功能端验证
${FTP} FTP_login ftp://192.168.40.158/test.txt -u ftpuser:111111 中文test
should contain ${FTP} ftp_fail
run keyword if '${systemType}'=='Windows' should contain ${FTP} ftp_fail
... ELSE should contain ${发送邮件返回结果} Fail
SecurityPolicy-Deny-Ftp-00003
Comment 功能端验证
${FTP} FTP_login ftp://192.168.40.158/wlcsy.txt -u ftpuser:111111 中文文件内容
should contain ${FTP} ftp_fail
run keyword if '${systemType}'=='Windows' should contain ${FTP} ftp_fail
... ELSE should contain ${发送邮件返回结果} Fail
SecurityPolicy-Deny-Ftp-00004
Comment 功能端验证
${FTP} FTP_login ftp://192.168.40.158/aewn.txt -u ftpuser:111111 завезенными
should contain ${FTP} ftp_fail
run keyword if '${systemType}'=='Windows' should contain ${FTP} ftp_fail
... ELSE should contain ${发送邮件返回结果} Fail
SecurityPolicy-Deny-Ftp-00005
Comment 开启阻断策略
@@ -45,7 +50,9 @@ SecurityPolicy-Deny-Ftp-00005
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证
${FTP} FTP_login ftp://192.168.40.158/test.txt -u ftpuser:111111 中文test
should contain ${FTP} ftp_fail
# should contain ${FTP} ftp_fail
run keyword if '${systemType}'=='Windows' should contain ${FTP} ftp_fail
... ELSE should contain ${发送邮件返回结果} Fail
Comment 关闭阻断策略
${policyDict} Create Dictionary policyId=${deny_ftp_policyId4} policyName=SecurityPolicy-Deny-FTP-00005-2 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"FTP","method":"rst"} isValid=${0} appIdObjects=${FTP_ID}
log ${policyDict}

View File

@@ -26,7 +26,7 @@ SecurityPolicy-Deny-Http-00001
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00001.bat
... ELSE set variable curl -m 10 http://www.lkong.net/forum.php
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection was reset
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Deny-Http-00002
@@ -119,7 +119,7 @@ SecurityPolicy-Deny-Http-00007
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 -m 10 http://www.cmbchina.com/CmbQuesInfo/index.aspx
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00008_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -130,7 +130,7 @@ SecurityPolicy-Deny-Http-00008
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
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00008_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -184,27 +184,27 @@ SecurityPolicy-Deny-Http-00012
SecurityPolicy-Deny-Http-00013
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00013.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -w %{http_code} www.ziroom.com/life/index -o /dev/null
... ELSE set variable curl --connect-timeout 5 -m 10 www.ziroom.com/life/index -o /dev/null
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
... ELSE Create List 000
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00013_1.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -w %{http_code} blog.cnstock.com
... ELSE set variable curl --connect-timeout 5 -m 10 blog.cnstock.com
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
... ELSE Create List 000
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00013_2.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -w %{http_code} www.sinovision.net/portal.php?mod=center
... ELSE set variable curl --connect-timeout 5 -m 10 www.sinovision.net/portal.php?mod=center
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
... ELSE Create List 000
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00013_3.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -w %{http_code}
... ELSE set variable curl --connect-timeout 5 -m 10 nlr.ru/nlr_visit/RA549/novosti
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
... ELSE Create List 000
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 策略验证之后关闭Deny策略若开启可以与monitor_http_001验证条件优先级
${policyDict} Create Dictionary policyId=${deny_http_policyId12} policyName=SecurityPolicy-Deny-Http-00013 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${deny_http_objectId20}|TSG_FIELD_HTTP_RES_HDR isValid=${0} appIdObjects=${HTTP_ID}
@@ -213,7 +213,7 @@ SecurityPolicy-Deny-Http-00013
SecurityPolicy-Deny-Http-00014
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_objectId43}|TSG_FIELD_HTTP_HOST,${deny_http_objectId21}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
${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_objectId431}|TSG_FIELD_HTTP_HOST,${deny_http_objectId21}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 8
@@ -224,7 +224,7 @@ SecurityPolicy-Deny-Http-00014
... 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_objectId43}|TSG_FIELD_HTTP_HOST,${deny_http_objectId40}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
${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_objectId431}|TSG_FIELD_HTTP_HOST,${deny_http_objectId40}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 10
@@ -282,7 +282,7 @@ SecurityPolicy-Deny-Http-00017
# ... 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 -m 10 -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}
... ELSE set variable curl -m 10 -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
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -291,9 +291,9 @@ SecurityPolicy-Deny-Http-00017
SecurityPolicy-Deny-Http-00018
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00018.bat
... ELSE set variable curl http://www.hebbank.com/
... ELSE set variable curl -m 10 http://www.hebbank.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Deny-Http-00019
@@ -312,4 +312,17 @@ SecurityPolicy-Deny-Http-00019
${policyDict} Create Dictionary policyId=${deny_http_policyId18} policyName=SecurityPolicy-Deny-Http-00019-2 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} isValid=${0} appIdObjects=${HTTP_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep ${policyModifySleepSeconds}
sleep ${policyModifySleepSeconds}
# curl -kv --cookie "wdcid=69d512097f7e021c; uid=6fe4a07479b44464b2fc6aaea84dcc85; wdlast=1618453760" --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" --referer 'https://www.baidu.com/' \ http://www.xinhuanet.com/
# http://sports.xinhuanet.com/index.htm
SecurityPolicy-Deny-Http-00020
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00020.bat
... ELSE set variable curl -kv --cookie "wdcid=69d512097f7e021c; uid=6fe4a07479b44464b2fc6aaea84dcc85; wdlast=1618453760" --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" --referer 'https://www.baidu.com/' \ http://www.xinhuanet.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
... ELSE Create List Connection reset by peer
${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -51,13 +51,13 @@ SecurityPolicy-Deny-Ssl-00002
SecurityPolicy-Deny-Ssl-00003
# Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00003.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -kv --referer 'http://www.baidu.com/' \ https://austinama.org/
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00003L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00003_3.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -kv --referer 'http://www.baidu.com/' \ https://www.carambola.com/
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00003_3L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -65,7 +65,7 @@ SecurityPolicy-Deny-Ssl-00003
SecurityPolicy-Deny-Ssl-00004
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00004.bat
... ELSE set variable curl https://www.prlib.ru/
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00004_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -75,7 +75,7 @@ SecurityPolicy-Deny-Ssl-00004
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00004.bat
... ELSE set variable curl https://www.prlib.ru/
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00004_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -83,7 +83,7 @@ SecurityPolicy-Deny-Ssl-00004
SecurityPolicy-Deny-Ssl-00005
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00005.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -kv --referer 'http://www.baidu.com/' \ https://www.leisu.com/
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00005_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -93,7 +93,7 @@ SecurityPolicy-Deny-Ssl-00005
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00005.bat
... ELSE set variable curl --connect-timeout 5 -m 10 -kv --referer 'http://www.baidu.com/' \ https://www.leisu.com/
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00005_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
... ELSE Create List timed out
${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -361,7 +361,7 @@ SecurityPolicy-Deny-Http-00018
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.hebbank.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":"192.168.50.18","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${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}
@@ -370,7 +370,7 @@ SecurityPolicy-Deny-Http-00018
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${deny_http_objectId33}
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_http_objectId34} ${deny_http_policyId17}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}

View File

@@ -382,7 +382,7 @@ Proxy-Policy-deny-000013
Proxy-Policy-deny-000014
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "open.node.com"}
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "open.node.com:180"}
${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"}

View File

@@ -103,7 +103,7 @@ Proxy-Policy-hijack-00004
Proxy-Policy-hijack-00005
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_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://www.ixigua.com/channel/dianying/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_hijack_00005_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List bFiles-test-5.png Tango Secure Gateway CA
... ELSE Create List bFiles-test-5.png Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -119,7 +119,7 @@ Proxy-Policy-hijack-00006
Proxy-Policy-hijack-00007
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_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.gogokid.com.cn/teacher
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_hijack_00007_L.bat
${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}
@@ -176,11 +176,11 @@ Proxy-Policy-hijack-00011
Proxy-Policy-hijack-00012
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_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.reval.com/corporates/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_hijack_00012_L.bat
sleep 3
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_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.reval.com/corporates/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_hijack_00012_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List bFiles-test-5.png Tango Secure Gateway CA
... ELSE Create List bFiles-test-5.png Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -220,7 +220,17 @@ Proxy-Policy-hijack-00013
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/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_hijack_00014_L.bat
${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}
# _ym_uid=1618469095499323558; _ym_d=1618469095; _ga=GA1.2.408342155.1618469095; _gid=GA1.2.1120402817.1618469095; _ym_isad=2; _ym_visorc=b; XSRF-TOKEN=eyJpdiI6Iks4WHdkV2JKUDVtR1g1Q0paaktJdmc9PSIsInZhbHVlIjoiOUY0Rys5cWVnWk9JbWM1NVpCU3FPTFoyWVQwbE1wSXJraEhSMDFaTm9VVkdrWHQ4XC96VWVvUTY5WmFVZG1XeU9PYVJrcGFLWEFcL0lxSGpCQytrcHFtaGFWcUZlOTQ1cUVIZTlyUmlabU5lOVpuRGhQaHM0UjU3UTZSV2EwRENVRSIsIm1hYyI6ImM0ZjUwN2NlYTExYmViZjljMjBiZTNlZjlhYjI5ZDA4YWI5NTE5ZTNhYWMyMDU3MDViNjM0MWMxYTA1ZmY4MzQifQ%3D%3D; megaserver2_session=eyJpdiI6IkRUUnRwb2c1WXd0TDBXeWdUeVhOdlE9PSIsInZhbHVlIjoieHVsZUhNVkUzbmZmaFB5bVRTNlhVUG0rcWlLZEk0YTVLXC9sQ09BK0xwSGxkQ2JcL2I1dVZKWjBIeG9JWnRGYTZoaWRNeGNwUExWT3VOaE9wXC9wK1krZ1c3bEtUNCtITCt3a1NQOVppMEpIdFlDbitxU3IwU2szeXJcL2tHUU92bjBxIiwibWFjIjoiNmNhOTIwZTZmMmEzNGIwNmYxOGJhYjcxMTFkMjBmMzk2OTgxZmJiMmVhNzJlMDJhOTVkYzA4MWIzM2ViMjY1NSJ9; __gads=ID=3966e5fd6a75b4f6-228b6eea6ac70067:T=1618469109:S=ALNI_Ma9PG_KvtVsBcIaQyD2jO9gO2UBSQ
Proxy-Policy-hijack-00015
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_hijack_00015.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://tengrinews.kz/
${stringlist} run keyword if '${systemType}'=='Windows' Create List bFiles-test-5.png Tango Secure Gateway CA
... ELSE Create List bFiles-test-5.png Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -146,10 +146,10 @@ Proxy-Policy-insert-00008
Proxy-Policy-insert-00009
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00009.bat
... ELSE set variable curl -kv \ http://www.world-guides.com/north-america/usa/nevada/las-vegas/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_insert_00009_L.bat
sleep 3
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00009.bat
... ELSE set variable curl -kv \ http://www.world-guides.com/north-america/usa/nevada/las-vegas/
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_insert_00009_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List X-TG-Construct-By: tfe
... ELSE Create List X-TG-Construct-By: tfe
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -157,7 +157,7 @@ Proxy-Policy-insert-00009
Proxy-Policy-insert-00010
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00010.bat
... ELSE set variable curl -kv http://news.cnstock.com/kcb
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_insert_00010_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List alert
... ELSE Create List alert
${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -21,19 +21,27 @@ SecurityPolicy-Monitor-Ftp-00001
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证
${FTP} FTP_login ftp://192.168.40.158/123zxcvbnm.txt -u ftpuser:111111 crfvtgbyhnuj
should contain ${FTP} ftp_success
#should contain ${FTP} ftp_success
run keyword if '${systemType}'=='Windows' should contain ${FTP} ftp_success
... ELSE should contain ${发送邮件返回结果} Success
SecurityPolicy-Monitor-Ftp-00002
Comment 功能端验证
${FTP} FTP_login ftp://192.168.40.158/stamp.txt -u ftpuser:111111 Shandong Province
should contain ${FTP} ftp_success
#should contain ${FTP} ftp_success
run keyword if '${systemType}'=='Windows' should contain ${FTP} ftp_success
... ELSE should contain ${发送邮件返回结果} Success
SecurityPolicy-Monitor-Ftp-00003
Comment 功能端验证
${FTP} FTP_login ftp://192.168.40.158/qwert.txt -u ftpuser:111111 花好听的名字
should contain ${FTP} ftp_success
run keyword if '${systemType}'=='Windows' should contain ${FTP} ftp_success
... ELSE should contain ${发送邮件返回结果} Success
SecurityPolicy-Monitor-Ftp-00004
Comment 功能端验证
${FTP} FTP_login ftp://192.168.40.158/asdfg.txt -u ftpuser:111111 уютных апартаментов
should contain ${FTP} ftp_success
# should contain ${FTP} ftp_success
run keyword if '${systemType}'=='Windows' should contain ${FTP} ftp_success
... ELSE should contain ${发送邮件返回结果} Success

View File

@@ -31,7 +31,7 @@ SecurityPolicy-Monitor-Http-00001
SecurityPolicy-Monitor-Http-00002
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00002.bat
... ELSE set variable curl http://fitzhughmedia.com/
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00002_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List Fitzhugh Media
... ELSE Create List Fitzhugh Media
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -65,7 +65,7 @@ SecurityPolicy-Monitor-Http-00003
SecurityPolicy-Monitor-Http-00004
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_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.inspirational-quotes.info/motivational-quotes.html
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00004_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List Motivational
... ELSE Create List Motivational
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -75,7 +75,7 @@ SecurityPolicy-Monitor-Http-00004
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_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.inspirational-quotes.info/motivational-quotes.html
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00004_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List Motivational
... ELSE Create List Motivational
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -181,7 +181,7 @@ SecurityPolicy-Monitor-Http-00014
sleep 5
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00014.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"monitortest141","setcook":"monitortest141","contenttype": "content-type","responsebody": "Response Body"}" http://open.node.com:180/go | iconv -f utf-8 -t gbk
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00014_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List monitortest141
... ELSE Create List monitortest141
Comment 改变监控策略
@@ -191,7 +191,7 @@ SecurityPolicy-Monitor-Http-00014
sleep 6
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00014_1.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"monitortest142","setcook":"monitortest142","contenttype": "content-type","responsebody": "Response Body"}" http://open.node.com:180/go | iconv -f utf-8 -t gbk
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00014_1L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List monitortest142
... ELSE Create List monitortest142
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -226,7 +226,7 @@ SecurityPolicy-Monitor-Http-00016
sleep 6
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00016.bat
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{\"requestbody\":\"monitorHttp0016\",\"setcook\":\"monitortest142\",\"contenttype\": \"content-type\",\"responsebody\": \"monitorHttp0016\"}" -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:180/go
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00016_L.bat
${stringlist} run keyword if '${systemType}'=='Windows' Create List monitorHttp0016
... ELSE Create List monitorHttp0016
${rescode} SystemCommands ${commandstr} ${stringlist}
@@ -236,7 +236,6 @@ SecurityPolicy-Monitor-Http-00016
${rescode} UpdatePolicies 1 ${policyDict} v2 update
sleep 6
SecurityPolicy-Monitor-Http-00017
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00017.bat
@@ -244,3 +243,12 @@ SecurityPolicy-Monitor-Http-00017
${stringlist} run keyword if '${systemType}'=='Windows' Create List ArtVisio
... ELSE Create List ArtVisio
${rescode} SystemCommands ${commandstr} ${stringlist}
# http://sports.xinhuanet.com/index.htm
SecurityPolicy-Monitor-Http-00018
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_HTTP_00018.bat
... ELSE set variable curl -kv --cookie "wdcid=69d512097f7e021c; uid=6fe4a07479b44464b2fc6aaea84dcc85; wdlast=1618453760" --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" --referer 'https://www.baidu.com/' \ http://sports.xinhuanet.com/index.htm
${stringlist} run keyword if '${systemType}'=='Windows' Create List 新华网体育
... ELSE Create List 新华网体育
${rescode} SystemCommands ${commandstr} ${stringlist}

View File

@@ -29,9 +29,9 @@ Proxy-Policy-Monitor-00001
sleep 10
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
... ELSE set variable 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
@@ -121,14 +121,14 @@ 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 珍爱网-征婚
${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango 珍爱网-征婚
... ELSE Create List Tango 珍爱网-征婚
${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
sleep 10
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}

View File

@@ -28,7 +28,7 @@ Resource ../../../05-Other/AllFlowCaseVariable.txt
Proxy-Policy-Monitor-00001
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.vancl.com"}
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.youzan.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"}
@@ -109,7 +109,7 @@ Proxy-Policy-Monitor-00004
Proxy-Policy-Monitor-00005
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.mgtv.com/"}
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.mgtv.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.mgtv.com/"}
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
@@ -152,7 +152,7 @@ Proxy-Policy-Monitor-00006
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId10} ${monitor_objectId11} ${monitor_objectId12} ${monitor_policyId5}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId11} ${monitor_objectId12} ${monitor_policyId5}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}
${testType} Evaluate type($objectid_verify)
@@ -166,7 +166,7 @@ Proxy-Policy-Monitor-00007
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.pptv.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.pptv.com/"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.pptv.com"}
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "hahahahsfeSafari/537.36","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"}
@@ -180,7 +180,7 @@ Proxy-Policy-Monitor-00007
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId13} ${monitor_objectId14} ${monitor_objectId15} ${monitor_policyId6}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId14} ${monitor_objectId15} ${monitor_policyId6}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}
${testType} Evaluate type($objectid_verify)
@@ -208,7 +208,7 @@ Proxy-Policy-Monitor-00008
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId51} ${monitor_objectId52} ${monitor_objectId53} ${monitor_policyId7}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_objectId52} ${monitor_objectId53} ${monitor_policyId7}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}
${testType} Evaluate type($objectid_verify)

View File

@@ -225,387 +225,387 @@ VerifySecurity-Allow-Rtp-00009
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_rtp_policyId8}]}
VerifySecurity-Deny-Rtp-00001
[Tags] VerifyDenyRtp00001
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"65500","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}
${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_rtp_policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Deny-Rtp-00001
# [Tags] VerifyDenyRtp00001
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"65500","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}
# ${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_rtp_policyId}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# # # ${ok} VerifyProxy ${objectids} ${resData}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Deny-Rtp-0000200002And0004
[Tags] VerifyDenyRtp00002
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${deny_rtp_objectId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId1}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Deny-Rtp-0000200002And0004
# [Tags] VerifyDenyRtp00002
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","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}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${deny_rtp_objectId}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId1}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# # # ${ok} VerifyProxy ${objectids} ${resData}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Deny-Rtp-00003
[Tags] VerifyDenyRtp00003
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.6","port":"2222","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${addpolicySubId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId2}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Deny-Rtp-00003
# [Tags] VerifyDenyRtp00003
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.6","port":"2222","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}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${addpolicySubId}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId2}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Deny-Rtp-00005
[Tags] VerifyDenyRtp00005
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"30000","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${deny_rtp_objectId2}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId4}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Deny-Rtp-00005
# [Tags] VerifyDenyRtp00005
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"30000","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}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${deny_rtp_objectId2}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId4}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Deny-Rtp-00006
[Tags] VerifyDenyRtp00006
#新增策略验证
#创建attributes中的字典
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"2222","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${deny_rtp_objectId3}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId5}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Deny-Rtp-00006
# [Tags] VerifyDenyRtp00006
# #新增策略验证
# #创建attributes中的字典
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"2222","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}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${deny_rtp_objectId3}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId5}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Deny-Rtp-00008
[Tags] VerifyDenyRtp00008
#新增策略验证
#创建attributes中的字典
# 新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${deny_rtp_objectId5}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId7}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Deny-Rtp-00008
# [Tags] VerifyDenyRtp00008
# #新增策略验证
# #创建attributes中的字典
# # 新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
# ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# # 合成attributes字典集
# ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${deny_rtp_objectId5}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_rtp_policyId7}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Deny-Rtp-00009
[Tags] VerifyDenyRtp00009
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${allow_rtp_objectId6}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId8}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Deny-Rtp-00009
# [Tags] VerifyDenyRtp00009
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
# ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# # 合成attributes字典集
# ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${allow_rtp_objectId6}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${allow_rtp_policyId8}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Monitor-Rtp-00001
[Tags] VerifyMonitorRtp00001
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"65500","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}
${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} ${monitor_rtp_policyId}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Monitor-Rtp-00001
# [Tags] VerifyMonitorRtp00001
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"65500","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}
# ${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} ${monitor_rtp_policyId}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# # # ${ok} VerifyProxy ${objectids} ${resData}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Monitor-Rtp-00002
[Tags] VerifyMonitorRtp00002
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${monitor_rtp_objectId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId1}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
# # ${ok} VerifyProxy ${objectids} ${resData}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Monitor-Rtp-00002
# [Tags] VerifyMonitorRtp00002
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","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}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${monitor_rtp_objectId}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId1}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# # # ${ok} VerifyProxy ${objectids} ${resData}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Monitor-Rtp-00003
[Tags] VerifyMonitorRtp00003
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.6","port":"2222","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${addpolicySubId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId2}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Monitor-Rtp-00003
# [Tags] VerifyMonitorRtp00003
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.6","port":"2222","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}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${addpolicySubId}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId2}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Monitor-Rtp-00005
[Tags] VerifyMonitorRtp00005
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"30000","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${monitor_rtp_objectId2}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId4}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Monitor-Rtp-00005
# [Tags] VerifyMonitorRtp00005
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"30000","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}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${monitor_rtp_objectId2}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId4}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Monitor-Rtp-00006
[Tags] VerifyMonitorRtp00006
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"2222","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}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${monitor_rtp_objectId3}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId5}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Monitor-Rtp-00006
# [Tags] VerifyMonitorRtp00006
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"2222","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}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${monitor_rtp_objectId3}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId5}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Monitor-Rtp-00008
[Tags] VerifyMonitorRtp00008
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${monitor_rtp_objectId5}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId7}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Monitor-Rtp-00008
# [Tags] VerifyMonitorRtp00008
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
# ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# # 合成attributes字典集
# ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${monitor_rtp_objectId5}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId7}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# Should Be Equal As Strings ${ok} true
VerifySecurity-Monitor-Rtp-00009
[Tags] VerifyMonitorRtp00009
#新增策略验证
#创建attributes中的字典
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# 合成attributes字典集
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
${verifySession} Create Dictionary attributes=${attributes}
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
log ${verifyList}
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${monitor_rtp_objectId6}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId8}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log 1111111111111111${objectid_verify}
${testType} Evaluate type($objectid_verify)
${testType} Evaluate type($resData)
log 222222222222222${resData}
sleep 5
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
# VerifySecurity-Monitor-Rtp-00009
# [Tags] VerifyMonitorRtp00009
# #新增策略验证
# #创建attributes中的字典
# ${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
# ${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
# ${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
# ${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP2}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
# # 合成attributes字典集
# ${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
# ${verifySession} Create Dictionary attributes=${attributes}
# ${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
# log ${verifyList}
# ${rescode} ${resData} VerifyPolicies ${verifyList}
# # 打印检查结果
# ${objectid_verify} Set Variable ${monitor_rtp_objectId6}
# ${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${monitor_rtp_policyId8}
# # # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
# log 1111111111111111${objectid_verify}
# ${testType} Evaluate type($objectid_verify)
# ${testType} Evaluate type($resData)
# log 222222222222222${resData}
# sleep 5
# ${ok} VerifyProxy ${resData} ${objectid_verify}
# Should Be Equal As Strings ${ok} true

File diff suppressed because it is too large Load Diff

View File

@@ -27,6 +27,7 @@ SecurityPolicy-Allow-Sip-00001-1
#删除对象
${objectids} set Variable ${allow_sip_objectId30}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_sip_objectId31}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_sip_objectId38}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_sip_policyId16}]}
${s} Convert to String ${allow_sip_policyId16}
@@ -36,6 +37,7 @@ SecurityPolicy-Allow-Sip-00001-2
#删除对象
${objectids} set Variable ${allow_sip_objectId32}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_sip_objectId33}
${objectids} Catenate SEPARATOR=, ${objectids} ${allow_sip_objectId39}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${allow_sip_policyId17}]}
${s} Convert to String ${allow_sip_policyId17}

View File

@@ -200,3 +200,14 @@ SecurityPolicy-Deny-Http-00019
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId18}]}
${s} Convert to String ${deny_http_policyId18}
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.hebbank.com
SecurityPolicy-Deny-Http-00020
#删除对象
${objectids} set Variable ${deny_http_objectId42}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId43}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId44}
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId45}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId17}]}
${s} Convert to String ${deny_http_policyId17}
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.xinhuanet.com

View File

@@ -222,3 +222,19 @@ Proxy-Policy-hijack-00014
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId13}
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.travelzoo.com
Proxy-Policy-hijack-00015
#删除文件
${profiledId} set Variable ${hijack_profileId14}
#删除对象
${objectids} set Variable ${hijack_objectId47}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId48}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId49}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId50}
${objectids} Catenate SEPARATOR=, ${objectids} ${hijack_objectId51}
#删除策略
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${intercept_hijack_policyId14}]}
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${hijack_policyId14}]}
${policyIds} Create List ${policyId1} ${policyId2}
${s} Convert to String ${hijack_policyId14}
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host tengrinews.kz

View File

@@ -178,3 +178,14 @@ SecurityPolicy-Monitor-Http-00017
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_http_policyId16}]}
${s} Convert to String ${monitor_http_policyId16}
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.airwargame.com
SecurityPolicy-Monitor-Http-00018
#删除对象
${objectids} set Variable ${monitor_http_objectId41}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_http_objectId42}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_http_objectId43}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_http_objectId44}
#删除策略
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${monitor_http_policyId17}]}
${s} Convert to String ${monitor_http_policyId17}
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host sports.xinhuanet.com

View File

@@ -196,6 +196,30 @@ Proxy-Policy-monitor-00015
${policyIds} Create List {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId14}]}
${s} Convert to String ${monitor_policyId14}
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
Proxy-Policy-monitor-00016
#删除对象
${objectids} set Variable ${monitor_objectId41}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId42}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId43}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId44}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId45}
#删除策略
${policyIds} Create List {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId16}]}
${s} Convert to String ${monitor_policyId16}
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
Proxy-Policy-monitor-00019
#删除对象
${objectids} set Variable ${monitor_objectId36}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId37}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId38}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId39}
${objectids} Catenate SEPARATOR=, ${objectids} ${monitor_objectId40}
#删除策略
${policyIds} Create List {"policyType":"pxy_manipulation","policyIds":[${monitor_policyId15}]}
${s} Convert to String ${monitor_policyId15}
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.cndns.com
# Proxy-Policy-monitor-00016
# #删除对象