This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dongxiaoyan-tsg-autotest/01-TestCase/tsg_adc/multi_step/a_Allow_Tests.robot
2020-07-29 20:20:03 +08:00

347 lines
26 KiB
Plaintext

*** Settings ***
Force Tags tsg_adc_wp adc_api proxy_policy
Library OperatingSystem
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
Resource ../../../02-Keyword/tsg_adc/FileOperation.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
*** Test Cases ***
Proxy-Policy-allow-00001
[Tags] fqdn
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$mp.pipix.com
${rescode} ${objectId} 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=3
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00001 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId ${objectId}
insert_policyId_to_file1 intercept_allow_policyId ${policyId1}
insert_policyId_to_file1 allow_policyId ${policyId2}
Proxy-Policy-allow-00002
[Tags] cat
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*feishu.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-allow policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00002 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId1 ${objectId}
insert_policyId_to_file1 intercept_allow_policyId1 ${policyId1}
insert_policyId_to_file1 allow_policyId1 ${policyId2}
Proxy-Policy-allow-00003
[Tags] url
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*smzdm.com,*bilibili.com,*cheapair.com,*surfline.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=passport.bilibili.com/l*,$www.smzdm.com/jingxuan/,*air.com/hotels/,premium
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment Comment 创建拦截策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-allow policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00003 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId2 ${objectId}
insert_policyId_to_file1 allow_objectId3 ${objectId1}
insert_policyId_to_file1 intercept_allow_policyId2 ${policyId1}
insert_policyId_to_file1 allow_policyId2 ${policyId2}
Proxy-Policy-allow-00004
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*expeditionportal.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=al.com/4wd/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
${rescode} ${objectId2} 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=3
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00004 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
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 intercept_allow_policyId3 ${policyId1}
insert_policyId_to_file1 allow_policyId3 ${policyId2}
Proxy-Policy-allow-00005
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.motel6.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=motel6.com/#/home
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
${rescode} ${objectId2} 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=3
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00005 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId7 ${objectId}
insert_policyId_to_file1 allow_objectId8 ${objectId1}
insert_policyId_to_file1 allow_objectId9 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId4 ${policyId1}
insert_policyId_to_file1 allow_policyId4 ${policyId2}
Proxy-Policy-allow-00006
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.choicehotels.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=quality-inn
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=AppleWebKit|User-Agent
${rescode} ${objectId2} 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=3
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00006 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId10 ${objectId}
insert_policyId_to_file1 allow_objectId11 ${objectId1}
insert_policyId_to_file1 allow_objectId12 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId5 ${policyId1}
insert_policyId_to_file1 allow_policyId5 ${policyId2}
Proxy-Policy-allow-00007
[Tags] 请求头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.clubmed.us
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=Sandpiper-Bay/y
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
${rescode} ${objectId2} 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=3
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00007 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId13 ${objectId}
insert_policyId_to_file1 allow_objectId14 ${objectId1}
insert_policyId_to_file1 allow_objectId15 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId6 ${policyId1}
insert_policyId_to_file1 allow_policyId6 ${policyId2}
Proxy-Policy-allow-00008
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*sse.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=market/overview/
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*utf-8|Content-Type
${rescode} ${objectId2} 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=2
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00008 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId16 ${objectId}
insert_policyId_to_file1 allow_objectId17 ${objectId1}
insert_policyId_to_file1 allow_objectId18 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId7 ${policyId1}
insert_policyId_to_file1 allow_policyId7 ${policyId2}
Proxy-Policy-allow-00009
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*szse.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=lawrules
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type
${rescode} ${objectId2} 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=2
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00009 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId19 ${objectId}
insert_policyId_to_file1 allow_objectId20 ${objectId1}
insert_policyId_to_file1 allow_objectId21 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId8 ${policyId1}
insert_policyId_to_file1 allow_policyId8 ${policyId2}
Proxy-Policy-allow-00010
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*gf.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=about/intro
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html|Content-Type
${rescode} ${objectId2} 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=2
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00010 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId22 ${objectId}
insert_policyId_to_file1 allow_objectId23 ${objectId1}
insert_policyId_to_file1 allow_objectId24 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId9 ${policyId1}
insert_policyId_to_file1 allow_policyId9 ${policyId2}
Proxy-Policy-allow-00011
[Tags] 应答头
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*chinastock.com.cn
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=yhwz/investbank
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type
${rescode} ${objectId2} 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=2
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00011 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
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 intercept_allow_policyId10 ${policyId1}
insert_policyId_to_file1 allow_policyId10 ${policyId2}
Proxy-Policy-allow-00012
[Tags] cookie
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.virtuoso.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=destinations
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
Comment 创建cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=saltkey|Cookie
${rescode} ${objectId2} 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=3
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00012 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId28 ${objectId}
insert_policyId_to_file1 allow_objectId29 ${objectId1}
insert_policyId_to_file1 allow_objectId30 ${objectId2}
insert_policyId_to_file1 intercept_allow_policyId11 ${policyId1}
insert_policyId_to_file1 allow_policyId11 ${policyId2}
Proxy-Policy-allow-00013
[Tags] set-cookie
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$russia.payu.com,*925mm.com,*qunar.com,$www.vitalsource.com
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=pll_language=ru*|Set-Cookie,*Domain=qunar.com;Path=/|Set-Cookie,frontLang=zh-cn|Set-Cookie,_stargate_session*|Set-Cookie
${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=3
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
Comment 创建allow策略
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00013 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId31 ${objectId}
insert_policyId_to_file1 allow_objectId32 ${objectId1}
insert_policyId_to_file1 intercept_allow_policyId12 ${policyId1}
insert_policyId_to_file1 allow_policyId12 ${policyId2}
Proxy-Policy-allow-00014
[Tags] 最大组合1
Comment 创建fqdn
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*sutori.com
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
Comment 创建url
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*teachers
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
Comment 创建请求头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
${rescode} ${object_qq_Id} AddObject2 ${1} ${objectDict}
Comment 创建应答头
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type
${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict}
Comment 创建cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=__stripe_sid|cookie
${rescode} ${object_ck_Id} AddObject2 ${1} ${objectDict}
Comment 创建set-cookie
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=domain=.sutori.com|set-cookie
${rescode} ${object_sk_Id} 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=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3
log ${policyDict}
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
${policyDict} Create Dictionary policyName=Proxy-Policy-allow-00014 policyType=pxy_manipulation policyDesc=autotest action=allow userRegion={"method":"allow","protocol":"HTTP"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_qq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR,${object_ck_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_sk_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=2
log ${policyDict}
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
insert_policyId_to_file1 allow_objectId33 ${object_fqdn_Id}
insert_policyId_to_file1 allow_objectId34 ${object_url_Id}
insert_policyId_to_file1 allow_objectId35 ${object_qq_Id}
insert_policyId_to_file1 allow_objectId36 ${object_yd_Id}
insert_policyId_to_file1 allow_objectId37 ${object_ck_Id}
insert_policyId_to_file1 allow_objectId38 ${object_sk_Id}
insert_policyId_to_file1 intercept_allow_policyId13 ${policyId1}
insert_policyId_to_file1 allow_policyId13 ${policyId2}