2020-07-22 20:03:57 +08:00
|
|
|
|
*** 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
|
2021-05-17 13:24:29 +06:00
|
|
|
|
|
2020-07-22 20:03:57 +08:00
|
|
|
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
|
|
${url} /v1/policy/profile/responsepages
|
|
|
|
|
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
|
Proxy-Policy-deny-00001
|
2021-02-01 19:16:09 +08:00
|
|
|
|
[Tags] fqdn完整匹配 update policy:ip geo,fqdn
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=$newsela.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment 创建categories
|
|
|
|
|
|
${addItemList1} Create Dictionary fqdn=$newsela.com
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary categoryType=fqdn categoryName=newsela objectSubType=category isValid=${1} fqdnList=${addItemLists}
|
|
|
|
|
|
${rescode} ${categoryObjId} ${categoryId} AddCategories ${1} ${objectDict} add 200
|
2021-02-01 19:16:09 +08:00
|
|
|
|
Comment 创建ip geo
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=XXG地区.*
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=ip objectSubType=geo_location isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment 创建fqdn2
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*newsela.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId2} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建拦截策略
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny 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,${categoryObjId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00001 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"重新开始","code":403,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST,${categoryObjId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId ${objectId}
|
2021-02-22 10:43:44 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId56 ${objectId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId57 ${objectId2}
|
2021-05-17 13:24:29 +06:00
|
|
|
|
insert_policyId_to_file1 deny_categoryId ${categoryId}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00002
|
2021-05-24 09:23:24 +08:00
|
|
|
|
[Tags] deny
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-24 09:23:24 +08:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*www.youku.com isHexbin=${0}
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment #创建引用文件
|
|
|
|
|
|
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages
|
|
|
|
|
|
${profiledId} Get From Dictionary ${response} profileId
|
|
|
|
|
|
Comment Comment 创建拦截策略
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny-002 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}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00002 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":403,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_profileId ${profiledId}
|
2021-02-18 16:21:02 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId1 ${objectId}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId1 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId1 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00003
|
2020-08-10 19:07:01 +08:00
|
|
|
|
[Tags] url4种匹配
|
2021-05-17 13:24:29 +06:00
|
|
|
|
Comment 创建fqdn
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*wimdu.de isHexbin=${0}
|
|
|
|
|
|
${addItemList2} Create Dictionary keywordArray=*creativetravelgroup.com isHexbin=${0}
|
|
|
|
|
|
${addItemList3} Create Dictionary keywordArray=*hinabian.com isHexbin=${0}
|
|
|
|
|
|
${addItemList4} Create Dictionary keywordArray=*smithsonianjourneys.org isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1} ${addItemList2} ${addItemList3} ${addItemList4}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=www.wimdu.de* isHexbin=${0}
|
|
|
|
|
|
${addItemList2} Create Dictionary keywordArray=$creativetravelgroup.com/ isHexbin=${0}
|
|
|
|
|
|
${addItemList3} Create Dictionary keywordArray=*hinabian.com/ isHexbin=${0}
|
|
|
|
|
|
${addItemList4} Create Dictionary keywordArray=smithsonianjourneys isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1} ${addItemList2} ${addItemList3} ${addItemList4}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
2021-02-18 16:21:02 +08:00
|
|
|
|
Comment 创建引用文件
|
2020-07-22 20:03:57 +08:00
|
|
|
|
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
|
|
|
|
|
${profiledId} Get From Dictionary ${response} profileId
|
|
|
|
|
|
Comment Comment 创建拦截策略
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny-003 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}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00003 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":404,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_profileId1 ${profiledId}
|
2021-02-18 16:21:02 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId2 ${objectId}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId3 ${objectId1}
|
|
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId2 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId2 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00004
|
2021-02-01 19:16:09 +08:00
|
|
|
|
[Tags] 请求头左匹配 update policy:url,请求头
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*usdebtclock.org isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=state-of-california-debt-clock.html isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment user-agent,创建请求头
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=Mozilla/5.0* isHexbin=${0} district=User-Agent
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId2} AddObjects ${1} ${objectDict}
|
2021-02-01 19:16:09 +08:00
|
|
|
|
Comment 创建url2
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=bbs.nga.cn/
|
|
|
|
|
|
${rescode} ${objectId3} AddObject2 ${1} ${objectDict}
|
2021-05-17 13:24:29 +06:00
|
|
|
|
Comment 创建url
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=bbs.nga.cn/ isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId3} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment user-agent,创建请求头2
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=Mozilla/5.0 isHexbin=${0} district=User-Agent
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId4} AddObjects ${1} ${objectDict}
|
2021-02-01 19:16:09 +08:00
|
|
|
|
Comment 创建fqdn2
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*nga.cn isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId5} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建拦截策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny 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}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00004 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"qwertyuiop","code":404,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId4 ${objectId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId5 ${objectId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId6 ${objectId2}
|
2021-02-01 19:16:09 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId48 ${objectId3}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId49 ${objectId4}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId50 ${objectId5}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId3 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId3 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00005
|
2020-08-10 19:07:01 +08:00
|
|
|
|
[Tags] 请求头完整匹配
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=$americantesol.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=tesol-register isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment user-agent,创建请求头
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36 isHexbin=${0} district=User-Agent
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId2} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建拦截策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny 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}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00005 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"онлайн фильмы","code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId7 ${objectId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId8 ${objectId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId9 ${objectId2}
|
|
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId4 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId4 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00006
|
2020-08-10 19:07:01 +08:00
|
|
|
|
[Tags] 请求头字串匹配
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=$www.playgroundsessions.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=software-features isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment user-agent,创建请求头
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=AppleWebKit isHexbin=${0} district=User-Agent
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId2} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建拦截策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny 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}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00006 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"明天大涨","code":404,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId10 ${objectId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId11 ${objectId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId12 ${objectId2}
|
|
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId5 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId5 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00007
|
2020-08-10 19:07:01 +08:00
|
|
|
|
[Tags] 请求头右匹配
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=$peoplestalkradio.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=forums/register.php isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment user-agent,创建请求头
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*Safari/537.36 isHexbin=${0} district=User-Agent
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId2} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建拦截策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny 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}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00007 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"今天中奖","code":403,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId13 ${objectId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId14 ${objectId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId15 ${objectId2}
|
|
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId6 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId6 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00008
|
2021-02-01 19:16:09 +08:00
|
|
|
|
[Tags] 应答头右匹配 update policy:fqdn,url,应答头
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*6renyou.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=user_comment isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment 创建应答头,Content-Type
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*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} ${objectId2} AddObjects ${1} ${objectDict}
|
2021-02-01 19:16:09 +08:00
|
|
|
|
Comment 创建引用文件
|
2020-07-22 20:03:57 +08:00
|
|
|
|
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
|
|
|
|
|
${profiledId} Get From Dictionary ${response} profileId
|
2021-02-18 16:21:02 +08:00
|
|
|
|
Comment 创建fqdn2
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*tianya.cn isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId3} AddObjects ${1} ${objectDict}
|
2021-03-01 09:08:49 +08:00
|
|
|
|
Comment 创建url2
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=tianya.cn isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId4} AddObjects ${1} ${objectDict}
|
2021-02-18 16:21:02 +08:00
|
|
|
|
Comment 创建应答头2
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=text/html* isHexbin=${0} district=Content-Type
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId5} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment Comment 创建拦截策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00008 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_profileId2 ${profiledId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId16 ${objectId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId17 ${objectId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId18 ${objectId2}
|
2021-02-01 19:16:09 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId51 ${objectId3}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId52 ${objectId4}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId53 ${objectId5}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId7 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId7 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00009
|
2020-08-10 19:07:01 +08:00
|
|
|
|
[Tags] 应答头完整匹配
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*cuctv.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=cuctv isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
2021-02-08 18:33:51 +08:00
|
|
|
|
Comment 创建应答头
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=$text/html; 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} ${objectId2} AddObjects ${1} ${objectDict}
|
2021-02-08 18:33:51 +08:00
|
|
|
|
Comment 创建引用文件
|
2020-07-22 20:03:57 +08:00
|
|
|
|
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
|
|
|
|
|
${profiledId} Get From Dictionary ${response} profileId
|
|
|
|
|
|
Comment Comment 创建拦截策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00009 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_profileId3 ${profiledId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId19 ${objectId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId20 ${objectId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId21 ${objectId2}
|
|
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId8 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId8 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00010
|
2020-08-10 19:07:01 +08:00
|
|
|
|
[Tags] 应答头字串匹配
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*duckduckmoose.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=duckduck isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment 创建应答头
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=text/html isHexbin=${0} district=Content-Type
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId2} AddObjects ${1} ${objectDict}
|
2021-02-18 16:21:02 +08:00
|
|
|
|
Comment 创建引用文件
|
2020-07-22 20:03:57 +08:00
|
|
|
|
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages
|
|
|
|
|
|
${profiledId} Get From Dictionary ${response} profileId
|
|
|
|
|
|
Comment Comment 创建拦截策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00010 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_profileId4 ${profiledId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId22 ${objectId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId23 ${objectId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId24 ${objectId2}
|
|
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId9 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId9 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00011
|
2020-08-10 19:07:01 +08:00
|
|
|
|
[Tags] 应答头左匹配
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*tutcandy.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=sketch-to isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment 创建应答头
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=text* isHexbin=${0} district=Content-Type
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId2} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment #创建引用文件
|
|
|
|
|
|
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages
|
|
|
|
|
|
${profiledId} Get From Dictionary ${response} profileId
|
|
|
|
|
|
Comment Comment 创建拦截策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00011 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":451,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_profileId5 ${profiledId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId25 ${objectId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId26 ${objectId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId27 ${objectId2}
|
|
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId10 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId10 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00012
|
2020-08-10 19:07:01 +08:00
|
|
|
|
[Tags] cookie字串匹配
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=$www.youqulu.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=zixun isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建cookie
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=saltkey|Cookie
|
|
|
|
|
|
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
|
|
|
|
|
|
Comment 创建拦截策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny 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}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00012 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"123456789","code":403,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL,${objectId2}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId28 ${objectId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId29 ${objectId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId30 ${objectId2}
|
|
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId11 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId11 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00013
|
2020-08-10 19:07:01 +08:00
|
|
|
|
[Tags] set-cookie4种匹配
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建fqdn
|
2020-08-06 18:39:36 +08:00
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.nypl.org,*thailand.com.co,*ke.com,$nationalbank.kz
|
2020-07-22 20:03:57 +08:00
|
|
|
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
|
|
|
|
|
Comment 创建set-cookie
|
2020-08-06 18:39:36 +08:00
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=incap_ses*|Set-Cookie,*Max-Age=604800|Set-Cookie,domain=.ke.com|Set-Cookie,irkzadmin_session*|Set-Cookie
|
2020-07-22 20:03:57 +08:00
|
|
|
|
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
|
2020-08-06 18:39:36 +08:00
|
|
|
|
Comment 创建url
|
2020-08-11 19:15:25 +08:00
|
|
|
|
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=www.nypl.org,thailand.com.co,ke.com,nationalbank.kz
|
2020-08-06 18:39:36 +08:00
|
|
|
|
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建拦截策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny 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}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00013 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"一直相信","code":403,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_RES_HDR,${objectId2}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId31 ${objectId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId32 ${objectId1}
|
2020-08-06 18:39:36 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId46 ${objectId2}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId12 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId12 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00014
|
2021-02-01 19:16:09 +08:00
|
|
|
|
[Tags] 请求体字串匹配 update policy:请求体
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建请求体
|
2021-02-20 11:38:17 +08:00
|
|
|
|
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ProxydenyTest001401
|
2020-07-22 20:03:57 +08:00
|
|
|
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
|
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*open.node.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
2021-02-01 19:16:09 +08:00
|
|
|
|
Comment 创建请求体2
|
2021-02-20 11:38:17 +08:00
|
|
|
|
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ProxydenyTest001402
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建拦截策略
|
2021-02-22 10:43:44 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_HOST isValid=${0} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00014 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId33 ${objectId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId34 ${objectId1}
|
2021-02-01 19:16:09 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId54 ${objectId2}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId13 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId13 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00015
|
2020-08-10 19:07:01 +08:00
|
|
|
|
[Tags] 应答体字串匹配
|
2020-07-29 20:20:03 +08:00
|
|
|
|
Comment 创建应答体
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=Proxydeny001501 isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=keywords objectSubType=keywords isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2021-02-01 19:16:09 +08:00
|
|
|
|
Comment 创建应答体2
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=Proxydeny001502 isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=keywords objectSubType=keywords isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2020-09-07 19:23:55 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00015 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","message":"涨涨涨涨","code":404,"protocol":"HTTP"} filterList=${objectId}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId35 ${objectId}
|
2021-02-01 19:16:09 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId55 ${objectId1}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_policyId14 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00016
|
2020-08-10 19:07:01 +08:00
|
|
|
|
[Tags] Sub Objects层级
|
|
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=$mt.meipai.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId} AddObjects ${1} ${objectDict}
|
2020-08-10 19:07:01 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*mt.meipai.com/ isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
2021-04-22 15:26:27 +08:00
|
|
|
|
# ${addItemList} Create List ${objectId1}
|
|
|
|
|
|
# ${objectDict1} Create Dictionary objectType=url isValid=${1} subObjectIds=${addItemList}
|
|
|
|
|
|
# ${rescode} ${objectId2} AddObjects ${1} ${objectDict1}
|
2021-02-04 19:54:18 +08:00
|
|
|
|
Comment 创建引用文件
|
2020-08-10 19:07:01 +08:00
|
|
|
|
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
|
|
|
|
|
${profiledId} Get From Dictionary ${response} profileId
|
|
|
|
|
|
Comment Comment 创建拦截策略
|
2021-02-18 16:21:02 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny-0016 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}
|
2020-08-10 19:07:01 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-08-10 19:07:01 +08:00
|
|
|
|
Comment 创建deny策略
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-000016 policyType=pxy_manipulation policyDesc=autotest action=deny userRegion={"method":"block","html_profile":${profiledId},"code":404,"protocol":"HTTP"} filterList=${objectId1}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
|
2020-08-10 19:07:01 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-08-10 19:07:01 +08:00
|
|
|
|
insert_policyId_to_file1 deny_profileId6 ${profiledId}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId47 ${objectId}
|
2021-02-22 10:43:44 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId58 ${objectId1}
|
2021-04-22 15:26:27 +08:00
|
|
|
|
# insert_policyId_to_file1 deny_objectId59 ${objectId2}
|
2020-08-10 19:07:01 +08:00
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId15 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId17 ${policyId2}
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-deny-00017
|
2020-07-22 20:03:57 +08:00
|
|
|
|
[Tags] 最大组合1
|
|
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=*open.node.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_fqdn_Id} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=open isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_url_Id} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建请求头
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=Mozilla/5.0* isHexbin=${0} district=User-Agent
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_qq_Id} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment 创建应答头
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=charset isHexbin=${0} district=Content-Type
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_yd_Id} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建请求体
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=ProxyDenyTest0017 isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=keywords objectSubType=keywords isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_body_Id} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2021-02-18 16:21:02 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00017 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_qq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR,${object_body_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId36 ${object_fqdn_Id}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId37 ${object_url_Id}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId38 ${object_qq_Id}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId39 ${object_yd_Id}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId40 ${object_body_Id}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId15 ${policyId2}
|
|
|
|
|
|
|
2020-08-10 19:07:01 +08:00
|
|
|
|
Proxy-Policy-deny-00018
|
2020-07-22 20:03:57 +08:00
|
|
|
|
[Tags] 最大组合2
|
|
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=$www.umusicpub.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_fqdn_Id} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=sicpub.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_url_Id} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment 创建请求头cookie
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=timezoneoffset isHexbin=${0} district=Cookie
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_qq_Id} AddObjects ${1} ${objectDict}
|
|
|
|
|
|
Comment 创建Set-Cookie
|
|
|
|
|
|
${addItemList1} Create Dictionary keywordArray=Domain=.umusicpub.com isHexbin=${0} district=Set-Cookie
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_yd_Id} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建应答体
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=NOFOLLOW isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=keywords objectSubType=keywords isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_body_Id} AddObjects ${1} ${objectDict}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建拦截策略
|
2021-02-18 16:21:02 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-deny-0018 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}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId1} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId1} Get-Pids ${policyId1}
|
|
|
|
|
|
${policyId1} Set Variable ${policyId1}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
Comment 创建deny策略
|
2021-02-18 16:21:02 +08:00
|
|
|
|
${policyDict} Create Dictionary policyName=Proxy-Policy-deny-00018 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_qq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR,${object_body_Id}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appIdObjects=${HTTP_ID}
|
2020-07-22 20:03:57 +08:00
|
|
|
|
log ${policyDict}
|
|
|
|
|
|
${rescode} ${policyId2} AddPolicies 1 ${policyDict} v2
|
2021-02-01 19:16:09 +08:00
|
|
|
|
${policyId2} Get-Pids ${policyId2}
|
|
|
|
|
|
${policyId2} Set Variable ${policyId2}[0]
|
2020-07-22 20:03:57 +08:00
|
|
|
|
insert_policyId_to_file1 deny_objectId41 ${object_fqdn_Id}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId42 ${object_url_Id}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId43 ${object_qq_Id}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId44 ${object_yd_Id}
|
|
|
|
|
|
insert_policyId_to_file1 deny_objectId45 ${object_body_Id}
|
|
|
|
|
|
insert_policyId_to_file1 intercept_deny_policyId14 ${policyId1}
|
|
|
|
|
|
insert_policyId_to_file1 deny_policyId16 ${policyId2}
|
2021-04-12 14:51:02 +08:00
|
|
|
|
|
2021-04-14 10:51:13 +08:00
|
|
|
|
Proxy-Policy-deny-00019
|
2021-04-12 14:51:02 +08:00
|
|
|
|
[Tags] substring
|
2021-04-14 10:51:13 +08:00
|
|
|
|
Comment 创建fqdn
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=$www.cndns.com isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=fqdn objectSubType=fqdn isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_fqdn_Id} AddObjects ${1} ${objectDict}
|
2021-04-14 10:51:13 +08:00
|
|
|
|
Comment 创建url
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=www.cndns.com/cn/sms/index.aspx isHexbin=${0}
|
|
|
|
|
|
${addItemLists} Create list ${addItemList1}
|
|
|
|
|
|
${objectDict} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
|
|
|
|
|
${rescode} ${object_url_Id} AddObjects ${1} ${objectDict}
|
2021-04-14 10:51:13 +08:00
|
|
|
|
Comment keyword8个子串,创建应答体
|
2021-05-17 13:24:29 +06:00
|
|
|
|
${addItemList1} Create Dictionary keywordArray=美橙短信,短信群发,到达率更强,企业营销类,短信验证,群发服务,正规106网关,联通全面 isHexbin=${0}
|
2021-04-14 10:51:13 +08:00
|
|
|
|
${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}
|
2021-04-20 10:37:27 +08:00
|
|
|
|
|
|
|
|
|
|
# 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}
|
2021-05-17 13:24:29 +06:00
|
|
|
|
|