2020-06-23 21:05:01 +08:00
|
|
|
*** Settings ***
|
|
|
|
|
Test Teardown DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
|
|
|
|
Force Tags tsg_adc_wp adc_log 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 ../../../05-Other/AllFlowCaseVariable.txt
|
|
|
|
|
Resource ../../../02-Keyword/tsg_adc/FileOperation.robot
|
|
|
|
|
Resource ../../../05-Other/AllFlowCaseVariable1.txt
|
|
|
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
|
${policyIds} ${EMPTY}
|
|
|
|
|
${objectids} ${EMPTY}
|
|
|
|
|
${url} /v1/policy/profile/responsepages
|
|
|
|
|
${profiledId} ${EMPTY}
|
|
|
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
SecurityPolicy-Deny-Http-00001
|
|
|
|
|
#删除对象
|
|
|
|
|
${objectids} set Variable ${deny_http_objectId}
|
|
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host webalta.ru
|
2020-06-23 21:05:01 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00002
|
|
|
|
|
#删除对象
|
|
|
|
|
${objectids} set Variable ${deny_http_objectId1}
|
|
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId1}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId1}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host nymbler.com
|
2020-06-23 21:05:01 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00003
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除文件
|
|
|
|
|
${profiledId} set Variable ${deny_http_profiledId}
|
2020-06-23 21:05:01 +08:00
|
|
|
#删除对象
|
|
|
|
|
${objectids} set Variable ${deny_http_objectId2}
|
|
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId2}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId2}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.icbc.com.cn
|
|
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host ccb.com
|
|
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host gotohoroscope.com
|
|
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host government.ru
|
2020-06-23 21:05:01 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00004
|
|
|
|
|
#删除对象
|
|
|
|
|
${objectids} set Variable ${deny_http_objectId3}
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId4}
|
2020-06-23 21:05:01 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId3}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId3}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host tsutmb.ru
|
2020-06-23 21:05:01 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00005
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId5}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId6}
|
2020-06-23 21:05:01 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId4}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId4}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host abchina.com
|
2020-06-23 21:05:01 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00006
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId7}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId8}
|
2020-06-23 21:05:01 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId5}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId5}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host egypt.travel
|
2020-06-23 21:05:01 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00007
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除文件
|
|
|
|
|
${profiledId} set Variable ${deny_http_profiledId1}
|
2020-06-23 21:05:01 +08:00
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId9}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId10}
|
2020-06-23 21:05:01 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId6}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId6}
|
2020-08-18 09:32:49 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.gw.com.cn
|
2020-06-28 19:19:39 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00008
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId11}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId12}
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId7}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId7}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host cmbchina.com
|
2020-06-28 19:19:39 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00009
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId13}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId14}
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId8}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId8}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.skycn.com
|
2020-06-28 19:19:39 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00010
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId15}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId16}
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId9}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId9}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.avaxsearch.com
|
2020-06-28 19:19:39 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00011
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId17}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId18}
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId10}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId10}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.finestquotes.com
|
2020-06-28 19:19:39 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00012
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId19}
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId11}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId11}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.universalmusic.ru
|
2020-06-28 19:19:39 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00013
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId20}
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId12}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId12}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host ziroom.com
|
2020-08-27 11:41:27 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host blog.cnstock.com
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host sinovision.net
|
|
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host nlr.ru
|
2020-06-28 19:19:39 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00014
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId21}
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId13}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId13}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
2020-06-28 19:19:39 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00015
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId22}
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId14}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId14}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host huatonggs.com
|
2020-06-28 19:19:39 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00016
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId23}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId24}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId25}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId26}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId27}
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId15}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId15}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
2020-06-28 19:19:39 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00017
|
|
|
|
|
#删除对象
|
2020-07-02 14:47:29 +08:00
|
|
|
${objectids} set Variable ${deny_http_objectId28}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId29}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId30}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId31}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId32}
|
2020-06-28 19:19:39 +08:00
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId16}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId16}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host smspunch.net
|
2020-07-16 20:33:19 +08:00
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00018
|
|
|
|
|
#删除对象
|
|
|
|
|
${objectids} set Variable ${deny_http_objectId33}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${deny_http_objectId34}
|
|
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${deny_http_policyId17}]}
|
|
|
|
|
${s} Convert to String ${deny_http_policyId17}
|
2020-08-10 19:07:01 +08:00
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host www.hebbank.com
|