2020-06-23 21:04:14 +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
|
|
|
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
SecurityPolicy-Deny-Dns-00001
|
|
|
|
|
[Tags] fqdn
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.facebook.com
|
|
|
|
|
... ELSE set variable nslookup www.facebook.com
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 超时
|
|
|
|
|
... ELSE Create List canonical name = www.facebook.com
|
|
|
|
|
${starttime} Get Time
|
|
|
|
|
Sleep ${policyVerificationSleepSeconds}s
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
Sleep ${policyLogVerificationSleepSeconds}s
|
|
|
|
|
${endtime} Get Time
|
|
|
|
|
insert_time_to_file1 deny_dns_starttime ${starttime} deny_dns_endtime ${endtime}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
2020-07-06 10:29:21 +08:00
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d rutube.ru
|
|
|
|
|
... ELSE set variable nslookup -d rutube.ru
|
2020-06-23 21:04:14 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 超时
|
2020-07-06 10:29:21 +08:00
|
|
|
... ELSE Create List canonical name = rutube.ru
|
2020-06-23 21:04:14 +08:00
|
|
|
${starttime} Get Time
|
|
|
|
|
Sleep ${policyVerificationSleepSeconds}s
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
Sleep ${policyLogVerificationSleepSeconds}s
|
|
|
|
|
${endtime} Get Time
|
|
|
|
|
insert_time_to_file1 deny_dns_starttime1 ${starttime} deny_dns_endtime1 ${endtime}
|
|
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Dns-00002
|
|
|
|
|
[Tags] cat
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.yhd.com
|
|
|
|
|
... ELSE set variable nslookup -debug -query=A \ www.yhd.com
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 192.168.41.186 www.jd.com ttl = 500
|
|
|
|
|
... ELSE Create List 192.168.41.186 www.jd.com ttl = 500
|
|
|
|
|
${starttime} Get Time
|
|
|
|
|
Sleep ${policyVerificationSleepSeconds}s
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
Sleep ${policyLogVerificationSleepSeconds}s
|
|
|
|
|
${endtime} Get Time
|
|
|
|
|
insert_time_to_file1 deny_dns_starttime2 ${starttime} deny_dns_endtime2 ${endtime}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.vk.com
|
|
|
|
|
... ELSE set variable nslookup -debug -query=A \ www.vk.com
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 192.168.41.186 www.jd.com ttl = 500
|
|
|
|
|
... ELSE Create List 192.168.41.186 www.jd.com ttl = 500
|
|
|
|
|
${starttime} Get Time
|
|
|
|
|
Sleep ${policyVerificationSleepSeconds}s
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
Sleep ${policyLogVerificationSleepSeconds}s
|
|
|
|
|
${endtime} Get Time
|
|
|
|
|
insert_time_to_file1 deny_dns_starttime3 ${starttime} deny_dns_endtime3 ${endtime}
|
|
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Dns-00003
|
|
|
|
|
[Tags] cat
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d ya.ru
|
|
|
|
|
... ELSE set variable nslookup -debug -query=AAAA ya.ru
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List fc00::2:11 www.taobao.com ttl = 400
|
|
|
|
|
... ELSE Create List fc00::2:11 www.taobao.com ttl = 400
|
|
|
|
|
${starttime} Get Time
|
|
|
|
|
Sleep ${policyVerificationSleepSeconds}s
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
Sleep ${policyLogVerificationSleepSeconds}s
|
|
|
|
|
${endtime} Get Time
|
|
|
|
|
insert_time_to_file1 deny_dns_starttime4 ${starttime} deny_dns_endtime4 ${endtime}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d ya.ru
|
|
|
|
|
... ELSE set variable nslookup -debug -query=AAAA ya.ru
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List fc00::2:11 www.taobao.com ttl = 400
|
|
|
|
|
... ELSE Create List fc00::2:11 www.taobao.com ttl = 400
|
|
|
|
|
${starttime} Get Time
|
|
|
|
|
Sleep ${policyVerificationSleepSeconds}s
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
Sleep ${policyLogVerificationSleepSeconds}s
|
|
|
|
|
${endtime} Get Time
|
|
|
|
|
insert_time_to_file1 deny_dns_starttime5 ${starttime} deny_dns_endtime5 ${endtime}
|
|
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Dns-00004
|
|
|
|
|
[Tags] 最大重定向
|
|
|
|
|
Comment 功能端验证HTTP验证
|
2020-07-06 10:29:21 +08:00
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.twitch.tv
|
|
|
|
|
... ELSE set variable nslookup -debug -query=A www.twitch.tv
|
2020-06-23 21:04:14 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 192.168.40.110 www.facebook.com ttl = 400 www.ok.ru fc00::2:22
|
|
|
|
|
... ELSE Create List 192.168.40.110 www.ok.ru ttl = 400
|
2020-07-06 10:29:21 +08:00
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.twitch.tv
|
|
|
|
|
... ELSE set variable nslookup -debug -query=AAAA www.twitch.tv
|
2020-06-23 21:04:14 +08:00
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List fc00::2:22 www.facebook.com ttl = 400 www.ok.ru 192.168.40.110
|
|
|
|
|
... ELSE Create List ttl = 400 www.facebook.com fc00::2:22
|
|
|
|
|
${starttime} Get Time
|
|
|
|
|
Sleep ${policyVerificationSleepSeconds}s
|
|
|
|
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
|
|
|
Sleep ${policyLogVerificationSleepSeconds}s
|
|
|
|
|
${endtime} Get Time
|
|
|
|
|
insert_time_to_file1 deny_dns_starttime6 ${starttime} deny_dns_endtime6 ${endtime}
|