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/b_Intercept_Ssl_Tests.robot

63 lines
5.2 KiB
Plaintext
Raw Normal View History

2020-07-06 10:31:24 +08:00
*** Settings ***
Force Tags tsg_adc_wp security_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
2020-07-06 10:31:24 +08:00
*** Test Cases ***
SecurityPolicy-Intercept-Ssl-00001
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Intercept_SSL_00001.bat
... ELSE set variable curl -kv https://www.reviewpro.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List reviewpro Tango Secure Gateway CA
... ELSE Create List reviewpro Tango Secure Gateway CA
2020-07-06 10:31:24 +08:00
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变安全策略
${policyDict} Create Dictionary policyId=${intercept_ssl_policyId} policyName=SecurityPolicy-Intercept-Ssl-00001_1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} source=${intercept_ssl_objectId1}|TSG_SECURITY_SOURCE_LOCATION filterList=${intercept_ssl_objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Intercept_SSL_00001.bat
... ELSE set variable curl -kv https://www.reviewpro.com/
${stringlist} run keyword if '${systemType}'=='Windows' Create List reviewpro Tango Secure Gateway CA
... ELSE Create List reviewpro Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 范围性质的ip做完策略验证后置为失效防止影响其他策略
${policyDict} Create Dictionary policyId=${intercept_ssl_policyId} policyName=SecurityPolicy-Intercept-Ssl-00001_1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} source=${intercept_ssl_objectId1}|TSG_SECURITY_SOURCE_LOCATION filterList=${intercept_ssl_objectId}|TSG_FIELD_SSL_SNI isValid=${0} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
2020-07-06 10:31:24 +08:00
SecurityPolicy-Intercept-Ssl-00002
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Intercept_SSL_00002.bat
... ELSE set variable curl -kv https://fenopy.se/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Fenopy Tango Secure Gateway CA
... ELSE Create List Fenopy Tango Secure Gateway CA
${rescode} SystemCommands ${commandstr} ${stringlist}
SecurityPolicy-Intercept-Http-00003
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Intercept_SSL_00002_2.bat
... ELSE set variable curl -kv https://www.xs8.cn/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 言情小说吧 CA TRUST
... ELSE Create List Book
${rescode} SystemCommands ${commandstr} ${stringlist}
Comment 改变安全策略
${policyDict} Create Dictionary policyId=${intercept_ssl_policyId2} policyName=SecurityPolicy-Intercept-Ssl-00003_1 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":87,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${intercept_ssl_objectId4}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
log ${policyDict}
${rescode} UpdatePolicies 1 ${policyDict} v2 update
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Intercept_SSL_00002_2.bat
... ELSE set variable curl -kv https://www.xs8.cn/
${stringlist} run keyword if '${systemType}'=='Windows' Create List 言情小说吧 CA TRUST
SecurityPolicy-Intercept-Ssl-00004
Comment 功能端验证HTTP验证
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Intercept_SSL_00002_3.bat
... ELSE set variable curl -kv https://worldweapon.info/
${stringlist} run keyword if '${systemType}'=='Windows' Create List Энциклопедия CA TRUST
... ELSE Create List Camp Chippewa for Boys CA TRUST
2020-07-06 10:31:24 +08:00
${rescode} SystemCommands ${commandstr} ${stringlist}