代理alllow策略增加修改策略中的fqdn,url,请求头,返回头用例

This commit is contained in:
hebingning
2021-01-26 21:25:49 +08:00
parent 25831f887d
commit 58050bf13d
4 changed files with 71 additions and 19 deletions

View File

@@ -10,10 +10,13 @@ Resource ../../../03-Variable/ApplicationID.txt
*** Test Cases ***
Proxy-Policy-allow-00001
[Tags] fqdn完整匹配
[Tags] fqdn完整匹配 修改fqdn
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$mp.pipix.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建fqdn2
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*games.sina.com.cn
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-allow policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
@@ -23,6 +26,7 @@ Proxy-Policy-allow-00001
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId ${objectId}
insert_policyId_to_file1 allow_objectId39 ${objectId1}
insert_policyId_to_file1 intercept_allow_policyId ${policyId1}
insert_policyId_to_file1 allow_policyId ${policyId2}
@@ -65,7 +69,7 @@ Proxy-Policy-allow-00003
insert_policyId_to_file1 allow_policyId2 ${policyId2}
Proxy-Policy-allow-00004
[Tags] 请求头左匹配
[Tags] 请求头左匹配 修改policy中url,请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*123.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
@@ -75,6 +79,12 @@ Proxy-Policy-allow-00004
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建url2
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*hao123.com
${rescode} ${objectId3} AddObject2 ${1} ${objectDict}
Comment 创建请求头2
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0|User-Agent
${rescode} ${objectId4} AddObject2 ${1} ${objectDict}
Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-allow policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
@@ -86,6 +96,8 @@ Proxy-Policy-allow-00004
insert_policyId_to_file1 allow_objectId4 ${objectId}
insert_policyId_to_file1 allow_objectId5 ${objectId1}
insert_policyId_to_file1 allow_objectId6 ${objectId2}
insert_policyId_to_file1 allow_objectId40 ${objectId3}
insert_policyId_to_file1 allow_objectId41 ${objectId4}
insert_policyId_to_file1 intercept_allow_policyId3 ${policyId1}
insert_policyId_to_file1 allow_policyId3 ${policyId2}
@@ -247,9 +259,12 @@ Proxy-Policy-allow-00011
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=yhwz/investbank
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求
Comment 创建应答
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
Comment 创建应答头2
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type
${rescode} ${objectId3} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-allow policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
log ${policyDict}
@@ -261,6 +276,7 @@ Proxy-Policy-allow-00011
insert_policyId_to_file1 allow_objectId25 ${objectId}
insert_policyId_to_file1 allow_objectId26 ${objectId1}
insert_policyId_to_file1 allow_objectId27 ${objectId2}
insert_policyId_to_file1 allow_objectId42 ${objectId3}
insert_policyId_to_file1 intercept_allow_policyId10 ${policyId1}
insert_policyId_to_file1 allow_policyId10 ${policyId2}