180 lines
16 KiB
Plaintext
180 lines
16 KiB
Plaintext
*** Settings ***
|
|
Force Tags tsg_adc_wp proxy_policy adc_verify
|
|
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
|
|
Resource ../../../05-Other/AllFlowCaseVariable.txt
|
|
|
|
*** Test Cases ***
|
|
Proxy-Policy-insert-00001
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00001.bat
|
|
... ELSE set variable curl -kv https://www.costcotravel.com/Vacation-Packages
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List X-TG-Construct-By: tfe Tango Secure Gateway CA
|
|
... ELSE Create List X-TG-Construct-By: tfe Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
Comment 改变拦截策略
|
|
${policyDict} Create Dictionary policyId=${intercept_insert_policyId} source=${insert_objectId41}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Intercept-insert-1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${insert_objectId42}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
|
|
log ${policyDict}
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
Comment 改变Insert策略
|
|
${policyDict} Create Dictionary policyId=${insert_policyId} source=${insert_objectId41}|TSG_SECURITY_SOURCE_LOCATION policyName=Proxy-Policy-insert-00001-1 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${insert_profileId},"protocol":"HTTP"} filterList=${insert_objectId42}|TSG_FIELD_HTTP_HOST,${insert_objectId39}|TSG_FIELD_HTTP_URL isValid=${1} appIdObjects=${HTTP_ID}
|
|
log ${policyDict}
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00001.bat
|
|
... ELSE set variable curl -kv https://www.costcotravel.com/Vacation-Packages
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List X-TG-Construct-By: tfe Tango Secure Gateway CA
|
|
... ELSE Create List X-TG-Construct-By: tfe Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
Comment 失效拦截策略
|
|
${policyDict} Create Dictionary policyId=${intercept_insert_policyId} source=${insert_objectId41}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Intercept-insert-1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${insert_objectId42}|TSG_FIELD_SSL_SNI isValid=${0} appIdObjects=${SSL_ID}
|
|
log ${policyDict}
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
Comment 失效Insert策略
|
|
${policyDict} Create Dictionary policyId=${insert_policyId} source=${insert_objectId41}|TSG_SECURITY_SOURCE_LOCATION policyName=Proxy-Policy-insert-00001-1 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${insert_profileId},"protocol":"HTTP"} filterList=${insert_objectId42}|TSG_FIELD_HTTP_HOST,${insert_objectId39}|TSG_FIELD_HTTP_URL isValid=${0} appIdObjects=${HTTP_ID}
|
|
log ${policyDict}
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
|
|
Proxy-Policy-insert-00002
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00002.bat
|
|
... ELSE set variable curl -kv https://www.meilleurmobile.com/
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List alert Tango Secure Gateway CA
|
|
... ELSE Create List alert Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
Proxy-Policy-insert-00003
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00003.bat
|
|
... ELSE set variable curl -kv https://scottsdalepublicart.org/
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List alert Tango Secure Gateway CA
|
|
... ELSE Create List alert Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00003_1.bat
|
|
... ELSE set variable curl -kv https://www.troop508.org/
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List alert Tango Secure Gateway CA
|
|
... ELSE Create List Troop Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00003_2.bat
|
|
... ELSE set variable curl -kv https://dreamdayoncapecod.wordpress.com/
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List alert Tango Secure Gateway CA
|
|
... ELSE Create List alert Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00003_3.bat
|
|
... ELSE set variable curl -kv https://www.doctorpoo.net/
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List alert Tango Secure Gateway CA
|
|
... ELSE Create List alert Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
Proxy-Policy-insert-00004
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00004.bat
|
|
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.viator.com/login?login_redirect=%2Faccount%2Fbookings
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List select_language Tango Secure Gateway CA
|
|
... ELSE Create List select_language Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
Comment 改变Insert策略
|
|
${policyDict} Create Dictionary policyId=${insert_policyId3} policyName=Proxy-Policy-insert-00004-1 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${insert_profileId3},"protocol":"HTTP"} filterList=${insert_objectId43}|TSG_FIELD_HTTP_URL,${insert_objectId44}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
|
log ${policyDict}
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00004.bat
|
|
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.viator.com/login?login_redirect=%2Faccount%2Fbookings
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List select_language Tango Secure Gateway CA
|
|
... ELSE Create List select_language Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
Proxy-Policy-insert-00005
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00005.bat
|
|
... ELSE set variable curl -kv -L --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://matadornetwork.com/destinations/north-america/united-states/
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Roboto Tango Secure Gateway CA
|
|
... ELSE Create List Roboto Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
Proxy-Policy-insert-00006
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00006.bat
|
|
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.farecompare.com/hotels/
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List farecompare Tango Secure Gateway CA
|
|
... ELSE Create List farecompare Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
Proxy-Policy-insert-00007
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00007.bat
|
|
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.tripit.com/web
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Supported Booking Tango Secure Gateway CA
|
|
... ELSE Create List Supported Booking Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
Proxy-Policy-insert-00008
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00008.bat
|
|
... ELSE set variable curl -kv http://www.waikikibeachwalk.com/Shops.htm
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00008.bat
|
|
... ELSE set variable curl -kv http://www.waikikibeachwalk.com/Shops.htm
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List alert
|
|
... ELSE Create List alert
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
Comment 改变Insert策略
|
|
${policyDict} Create Dictionary policyId=${insert_policyId7} policyName=Proxy-Policy-insert-00008-1 policyType=pxy_manipulation policyDesc=autotest action=manipulation userRegion={"method":"insert","insert_profile":${insert_profileId7},"protocol":"HTTP"} filterList=${insert_objectId17}|TSG_FIELD_HTTP_URL,${insert_objectId45}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
|
log ${policyDict}
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
sleep 5
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00008.bat
|
|
... ELSE set variable curl -kv http://www.waikikibeachwalk.com/Shops.htm
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00008.bat
|
|
... ELSE set variable curl -kv http://www.waikikibeachwalk.com/Shops.htm
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List alert
|
|
... ELSE Create List alert
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
Proxy-Policy-insert-00009
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00009.bat
|
|
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_insert_00009_L.bat
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List X-TG-Construct-By: tfe
|
|
... ELSE Create List X-TG-Construct-By: tfe
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
Proxy-Policy-insert-00010
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00010.bat
|
|
... ELSE set variable ${curlbatpath}/command/ProxyPolicy_insert_00010_L.bat
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List tfe/4.5.01-91facad
|
|
... ELSE Create List tfe/4.3.30
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
Proxy-Policy-insert-00011
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00011.bat
|
|
... ELSE set variable curl -kv http://otc.newone.com.cn/cwyw
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List X-TG-Construct-By: tfe
|
|
... ELSE Create List X-TG-Construct-By: tfe
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
Proxy-Policy-insert-00012
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00012.bat
|
|
... ELSE set variable curl -kv --cookie "lQfQ_2132_saltkey=t8WY1oPe; lQfQ_2132_lastvisit=1595381790; lQfQ_2132_sid=vqXOg6; lQfQ_2132_lastact=1595385400%09forum.php%09image" --referer 'https://www.baidu.com/' \ https://petapixel.com/topic/equipment/
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List petapixel Tango Secure Gateway CA
|
|
... ELSE Create List petapixel Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
Proxy-Policy-insert-00013
|
|
Comment 功能端验证HTTP验证
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_insert_00014.bat
|
|
... ELSE set variable curl -kv \ --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" \ --cookie "__cfduid=d5c21129d57e7124b729fd86dc82abdcd1596020306; __stripe_sid=2940d4d5-6822-4daf-8b38-9cd18d745beb; __stripe_mid=dd118cd8-845c-4b6e-98ce-81e8d5bdd52c" --referer 'https://www.baidu.com/' \ https://www.intervalworld.com/web/my/home
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List alert Tango Secure Gateway CA
|
|
... ELSE Create List alert Tango Secure Gateway CA
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|