2020-06-24 18:52:11 +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
|
|
|
|
|
Library Custometest
|
2021-02-02 20:44:21 +08:00
|
|
|
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
|
2021-02-01 18:19:18 +08:00
|
|
|
Resource ../../../03-Variable/ApplicationID.txt
|
|
|
|
|
Resource ../../../05-Other/AllFlowCaseVariable.txt
|
2020-06-24 18:52:11 +08:00
|
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
SecurityPolicy-Deny-Ftp-00001
|
|
|
|
|
Comment 功能端验证
|
2021-02-09 10:38:33 +08:00
|
|
|
${FTP} FTP_login ftp://192.168.40.158/123456.txt -u ftpuser:111111 123456789qwertyuiop
|
2020-06-24 18:52:11 +08:00
|
|
|
should contain ${FTP} ftp_fail
|
2021-02-01 18:19:18 +08:00
|
|
|
Comment 改变阻断策略
|
|
|
|
|
${policyDict} Create Dictionary policyId=${deny_ftp_policyId} source=${deny_ftp_objectId12}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Deny-FTP-00001-1 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"FTP","method":"drop"} filterList=${deny_ftp_objectId13}|TSG_FIELD_FTP_ACCOUNT,${deny_ftp_objectId15}|TSG_FIELD_FTP_CONTENT,${deny_ftp_objectId14}|TSG_FIELD_FTP_URI isValid=${1} appIdObjects=${FTP_ID}
|
|
|
|
|
log ${policyDict}
|
|
|
|
|
${rescode} UpdatePolicies 1 ${policyDict} v2 update
|
|
|
|
|
Comment 功能端验证
|
2021-02-09 10:38:33 +08:00
|
|
|
${FTP} FTP_login ftp://192.168.40.158/123456.txt -u ftpuser:111111 123456789qwertyuiop
|
2021-02-01 18:19:18 +08:00
|
|
|
should contain ${FTP} ftp_fail
|
|
|
|
|
|
2020-06-24 18:52:11 +08:00
|
|
|
SecurityPolicy-Deny-Ftp-00002
|
|
|
|
|
Comment 功能端验证
|
2021-02-09 10:38:33 +08:00
|
|
|
${FTP} FTP_login ftp://192.168.40.158/test.txt -u ftpuser:111111 中文test
|
2020-06-24 18:52:11 +08:00
|
|
|
should contain ${FTP} ftp_fail
|
|
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Ftp-00003
|
|
|
|
|
Comment 功能端验证
|
2021-02-09 10:38:33 +08:00
|
|
|
${FTP} FTP_login ftp://192.168.40.158/wlcsy.txt -u ftpuser:111111 中文文件内容
|
2020-06-24 18:52:11 +08:00
|
|
|
should contain ${FTP} ftp_fail
|
|
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Ftp-00004
|
|
|
|
|
Comment 功能端验证
|
2021-02-09 10:38:33 +08:00
|
|
|
${FTP} FTP_login ftp://192.168.40.158/aewn.txt -u ftpuser:111111 завезенными
|
2020-06-24 18:52:11 +08:00
|
|
|
should contain ${FTP} ftp_fail
|