diff --git a/01-TestCase/tsg_adc/multi_step/a_Allow_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Allow_Http_Tests.robot index 043e9a2..32abd1c 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Allow_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Allow_Http_Tests.robot @@ -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 *** diff --git a/01-TestCase/tsg_adc/multi_step/a_Allow_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Allow_Ssl_Tests.robot index c5a8c9f..68aea35 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Allow_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Allow_Ssl_Tests.robot @@ -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 diff --git a/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot index b573cd7..05ee89c 100644 --- a/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/a_Deny_Http_Tests.robot @@ -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} diff --git a/01-TestCase/tsg_adc/multi_step/b_Allow_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Allow_Ssl_Tests.robot index 0104a9d..5923e72 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Allow_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Allow_Ssl_Tests.robot @@ -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} diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot index 839c5b3..b1d9086 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Http_Tests.robot @@ -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} diff --git a/01-TestCase/tsg_adc/multi_step/b_Deny_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Deny_Ssl_Tests.robot index ec6c375..10960b3 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Deny_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Deny_Ssl_Tests.robot @@ -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 diff --git a/01-TestCase/tsg_adc/multi_step/b_Monitor_Ssl_Tests.robot b/01-TestCase/tsg_adc/multi_step/b_Monitor_Ssl_Tests.robot index 01a65e2..29dc180 100644 --- a/01-TestCase/tsg_adc/multi_step/b_Monitor_Ssl_Tests.robot +++ b/01-TestCase/tsg_adc/multi_step/b_Monitor_Ssl_Tests.robot @@ -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} diff --git a/05-Other/curl/command/SecurityPolicy_Allow_SSL_00001.bat b/05-Other/curl/command/SecurityPolicy_Allow_SSL_00001.bat index cc1b550..b16579a 100644 --- a/05-Other/curl/command/SecurityPolicy_Allow_SSL_00001.bat +++ b/05-Other/curl/command/SecurityPolicy_Allow_SSL_00001.bat @@ -1 +1 @@ -curl https://ok.ru/ | iconv -f utf-8 -t gbk \ No newline at end of file +curl https://homebank.kz/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/command/SecurityPolicy_Deny_HTTP_00018.bat b/05-Other/curl/command/SecurityPolicy_Deny_HTTP_00018.bat new file mode 100644 index 0000000..3c7aa9e --- /dev/null +++ b/05-Other/curl/command/SecurityPolicy_Deny_HTTP_00018.bat @@ -0,0 +1 @@ +curl http://www.hebbank.com/ | iconv -f utf-8 -t gbk \ No newline at end of file diff --git a/05-Other/curl/selfserver/ProxyPolicy-Redirect-HTTP-0024.bat b/05-Other/curl/selfserver/ProxyPolicy-Redirect-HTTP-0024.bat new file mode 100644 index 0000000..254b763 --- /dev/null +++ b/05-Other/curl/selfserver/ProxyPolicy-Redirect-HTTP-0024.bat @@ -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 diff --git a/05-Other/curl/selfserver/ProxyPolicy-Redirect-SSL-0024.bat b/05-Other/curl/selfserver/ProxyPolicy-Redirect-SSL-0024.bat new file mode 100644 index 0000000..e22723f --- /dev/null +++ b/05-Other/curl/selfserver/ProxyPolicy-Redirect-SSL-0024.bat @@ -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