2020-06-23 21:03:54 +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
|
2021-01-29 13:50:43 +08:00
|
|
|
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
|
|
|
|
|
Resource ../../../05-Other/AllFlowCaseVariable.txt
|
2020-06-23 21:03:54 +08:00
|
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
SecurityPolicy-Deny-Ssl-00001
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00001.bat
|
|
|
|
|
... ELSE set variable curl https://www.freestockimages.ru/
|
2020-07-10 19:15:49 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
2021-04-22 15:26:27 +08:00
|
|
|
... ELSE Create List OpenSSL SSL_connect
|
2020-06-23 21:03:54 +08:00
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00001_1.bat
|
|
|
|
|
... ELSE set variable curl \ \ \ https://www.cxwl.com/
|
2020-07-10 19:15:49 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
2021-04-22 15:26:27 +08:00
|
|
|
... ELSE Create List OpenSSL SSL_connect
|
2020-06-23 21:03:54 +08:00
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
2021-01-29 13:50:43 +08:00
|
|
|
Comment 改变阻断策略
|
|
|
|
|
${policyDict} Create Dictionary policyId=${deny_ssl_policyId} source=${deny_ssl_objectId5}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Deny-Ssl-00001_1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SSL","method":"rst"} filterList=${deny_ssl_objectId4}|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_Deny_SSL_00001_1.bat
|
|
|
|
|
... ELSE set variable curl \ \ \ https://www.cxwl.com/
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
2021-04-22 15:26:27 +08:00
|
|
|
... ELSE Create List OpenSSL SSL_connect
|
2021-01-29 13:50:43 +08:00
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
2020-06-23 21:03:54 +08:00
|
|
|
SecurityPolicy-Deny-Ssl-00002
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00002.bat
|
2021-01-29 13:50:43 +08:00
|
|
|
... ELSE set variable curl https://amesweb.info/
|
2020-07-10 19:15:49 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
2021-04-22 15:26:27 +08:00
|
|
|
... ELSE Create List OpenSSL SSL_connect
|
2020-06-23 21:03:54 +08:00
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00002_2.bat
|
2021-01-29 13:50:43 +08:00
|
|
|
... ELSE set variable curl https://rentar.com/
|
2020-07-10 19:15:49 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
2021-04-22 15:26:27 +08:00
|
|
|
... ELSE Create List OpenSSL SSL_connect
|
2020-06-23 21:03:54 +08:00
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Ssl-00003
|
2021-05-17 13:24:29 +06:00
|
|
|
Comment 功能端验证HTTP验证
|
2020-06-23 21:03:54 +08:00
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00003.bat
|
2021-04-22 15:26:27 +08:00
|
|
|
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00003_L.bat
|
2021-02-18 16:21:02 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
|
|
|
|
|
... ELSE Create List timed out
|
2020-06-23 21:03:54 +08:00
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Ssl-00004
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00004.bat
|
2021-04-20 10:37:27 +08:00
|
|
|
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00004_L.bat
|
2021-02-18 16:21:02 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
|
|
|
|
|
... ELSE Create List timed out
|
2020-06-23 21:03:54 +08:00
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
2021-01-29 13:50:43 +08:00
|
|
|
Comment 改变阻断策略
|
|
|
|
|
${policyDict} Create Dictionary policyId=${deny_ssl_policyId3} policyName=SecurityPolicy-Deny-Ssl-00004 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SSL","method":"drop"} filterList=${deny_ssl_objectId6}|TSG_FIELD_SSL_SAN,${deny_ssl_objectId6}|TSG_FIELD_SSL_SNI,${deny_ssl_objectId6}|TSG_FIELD_SSL_CN 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_Deny_SSL_00004.bat
|
2021-04-20 10:37:27 +08:00
|
|
|
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00004_L.bat
|
2021-02-18 16:21:02 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
|
|
|
|
|
... ELSE Create List timed out
|
2021-01-29 13:50:43 +08:00
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
2021-01-29 13:50:43 +08:00
|
|
|
SecurityPolicy-Deny-Ssl-00005
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00005.bat
|
2021-04-20 10:37:27 +08:00
|
|
|
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00005_L.bat
|
2021-02-18 16:21:02 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
|
|
|
|
|
... ELSE Create List timed out
|
2021-01-29 13:50:43 +08:00
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
Comment 改变阻断策略
|
2021-04-22 15:26:27 +08:00
|
|
|
${policyDict} Create Dictionary policyId=${deny_ssl_policyId4} policyName=SecurityPolicy-Deny-Ssl-00005-1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SSL","method":"drop"} filterList=${deny_ssl_objectId7}|TSG_FIELD_SSL_SAN,${deny_ssl_objectId7}|TSG_FIELD_SSL_SNI,${deny_ssl_objectId7}|TSG_FIELD_SSL_CN isValid=${1} appIdObjects=${SSL_ID}
|
2021-01-29 13:50:43 +08:00
|
|
|
log ${policyDict}
|
|
|
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
2021-02-01 18:19:18 +08:00
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00005.bat
|
2021-04-20 10:37:27 +08:00
|
|
|
... ELSE set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00005_L.bat
|
2021-02-18 16:21:02 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List timed out
|
|
|
|
|
... ELSE Create List timed out
|
2021-02-01 18:19:18 +08:00
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
2021-03-01 09:08:49 +08:00
|
|
|
|