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_Intercept_Ssl_Tests.robot

38 lines
2.3 KiB
Plaintext
Raw Normal View History

2020-07-01 17:29:16 +08:00
*** Settings ***
Force Tags tsg_adc_wp adc_api security_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_adc/FileOperation.robot
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
Resource ../../../03-Variable/ApplicationID.txt
2020-07-01 17:29:16 +08:00
2020-07-06 10:31:24 +08:00
*** Variables ***
2020-07-01 17:29:16 +08:00
*** Test Cases ***
2020-07-06 10:31:24 +08:00
SecurityPolicy-Intercept-Ssl-00001
[Tags] fqdn完整匹配
2020-07-01 17:29:16 +08:00
Comment 创建fqdn
2020-07-06 10:31:24 +08:00
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.reviewpro.com
2020-07-01 17:29:16 +08:00
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Ssl-00001 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-01 17:29:16 +08:00
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
2020-07-06 10:31:24 +08:00
insert_policyId_to_file1 intercept_ssl_objectId ${objectId}
insert_policyId_to_file1 intercept_ssl_policyId ${policyId}
2020-07-01 17:29:16 +08:00
2020-07-06 10:31:24 +08:00
SecurityPolicy-Intercept-Ssl-00002
[Tags] cat右匹配
2020-07-06 10:31:24 +08:00
Comment 创建cat
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*momondo.ru
2020-07-01 17:29:16 +08:00
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
Comment 创建安全策略
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-Ssl-00002 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-01 17:29:16 +08:00
log ${policyDict}
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
2020-07-06 10:31:24 +08:00
insert_policyId_to_file1 intercept_ssl_objectId1 ${objectId}
insert_policyId_to_file1 intercept_ssl_policyId1 ${policyId}