补充代理策略重定向24和25用例自建网站执行命令文件,添加安全策略多对象自动化用例
This commit is contained in:
@@ -5,7 +5,6 @@ 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
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
@@ -5,14 +5,13 @@ 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
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Allow-Ssl-00001
|
||||
[Tags] fqdn
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$ok.ru
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$homebank.kz
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-Ssl-00001 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SSL"} filterList=${objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=3
|
||||
|
||||
@@ -287,3 +287,19 @@ SecurityPolicy-Deny-Http-00017
|
||||
insert_policyId_to_file1 deny_http_objectId31 ${object_yd_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId32 ${object_body_Id}
|
||||
insert_policyId_to_file1 deny_http_policyId16 ${policyId}
|
||||
|
||||
SecurityPolicy-Deny-Http-00018
|
||||
[Tags] 多ip对象
|
||||
Comment 创建第二个源IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.40.18|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.hebbank.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00001 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} filterList=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=2 source=${objectId}|TSG_SECURITY_SOURCE_ADDR
|
||||
log ${policyDict}
|
||||
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
|
||||
insert_policyId_to_file1 deny_http_objectId33 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_objectId34 ${object_fqdn_Id}
|
||||
insert_policyId_to_file1 deny_http_policyId17 ${policyId}
|
||||
|
||||
@@ -11,9 +11,9 @@ SecurityPolicy-Allow-Ssl-00001
|
||||
[Tags] fqdn
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_SSL_00001.bat
|
||||
... ELSE set variable curl https://ok.ru/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Развлекате
|
||||
... ELSE Create List Развлекате
|
||||
... ELSE set variable curl https://homebank.kz/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Бесплатная
|
||||
... ELSE Create List Бесплатная
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
|
||||
@@ -310,3 +310,17 @@ SecurityPolicy-Deny-Http-00017
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
insert_time_to_file1 deny_http_starttime22 ${starttime} deny_http_endtime22 ${endtime}
|
||||
|
||||
SecurityPolicy-Deny-Http-00018
|
||||
[Tags] 多ip对象
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00018.bat
|
||||
... ELSE set variable curl http://www.hebbank.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
insert_time_to_file1 deny_http_starttime23 ${starttime} deny_http_endtime23 ${endtime}
|
||||
|
||||
@@ -12,7 +12,7 @@ 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/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List failed to receive handshake
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
@@ -23,7 +23,7 @@ SecurityPolicy-Deny-Ssl-00001
|
||||
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 failed to receive handshake
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
@@ -37,7 +37,7 @@ SecurityPolicy-Deny-Ssl-00002
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00002.bat
|
||||
... ELSE set variable curl https://www.berkeleygroup.co.uk/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List failed to receive handshake
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
@@ -48,7 +48,7 @@ SecurityPolicy-Deny-Ssl-00002
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00002_2.bat
|
||||
... ELSE set variable curl https://www.vip.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List failed to receive handshake
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
@@ -62,7 +62,7 @@ SecurityPolicy-Deny-Ssl-00003
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00003.bat
|
||||
... ELSE set variable curl https://www.nastol.com.ua/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List failed to receive handshake
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
@@ -73,7 +73,7 @@ SecurityPolicy-Deny-Ssl-00003
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_SSL_00003_3.bat
|
||||
... ELSE set variable curl https://www.pulitzer.org/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List failed to receive handshake
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
|
||||
@@ -23,8 +23,8 @@ SecurityPolicy-Monitor-Ssl-00001
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Monitor_SSL_00001_1.bat
|
||||
... ELSE set variable curl \ https://freecountry.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Celebrate Summer and our Free Country
|
||||
... ELSE Create List Celebrate Summer and our Free Country
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Twitter Icon
|
||||
... ELSE Create List Twitter Icon
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
|
||||
@@ -1 +1 @@
|
||||
curl https://ok.ru/ | iconv -f utf-8 -t gbk
|
||||
curl https://homebank.kz/ | iconv -f utf-8 -t gbk
|
||||
1
05-Other/curl/command/SecurityPolicy_Deny_HTTP_00018.bat
Normal file
1
05-Other/curl/command/SecurityPolicy_Deny_HTTP_00018.bat
Normal file
@@ -0,0 +1 @@
|
||||
curl http://www.hebbank.com/ | iconv -f utf-8 -t gbk
|
||||
@@ -0,0 +1 @@
|
||||
curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Body" -kv http://open.node.com/action | iconv -f utf-8 -t gbk
|
||||
@@ -0,0 +1 @@
|
||||
curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Body" -kv https://open.node.com/action | iconv -f utf-8 -t gbk
|
||||
Reference in New Issue
Block a user