|
|
|
|
@@ -693,6 +693,7 @@ SecurityPolicy-Deny-Http-00023
|
|
|
|
|
#日志验证
|
|
|
|
|
${s} Convert to String ${policyId}
|
|
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
|
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00024
|
|
|
|
|
[Tags] selfserver deny http ip+host block
|
|
|
|
|
Comment 创建fqdn
|
|
|
|
|
@@ -1140,19 +1141,16 @@ SecurityPolicy-Deny-Http-00035
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
|
|
|
|
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
|
|
|
|
#创建引用文件
|
|
|
|
|
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
|
|
|
|
${profiledId} Get From Dictionary ${response} profileId
|
|
|
|
|
Comment 创建安全策略
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00035 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00035 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2
|
|
|
|
|
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
|
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
|
|
|
|
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
${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}
|
|
|
|
|
@@ -1162,13 +1160,13 @@ SecurityPolicy-Deny-Http-00035
|
|
|
|
|
${s} Convert to String ${policyId}
|
|
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
|
|
|
|
Comment 修改策略
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00035 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00035 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
|
|
|
|
${rescode} ${policyId} EditPolicy ${policyDict} update
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-HTTP-00017.bat
|
|
|
|
|
... ELSE set variable curl http://open.node.com/
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
${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}
|
|
|
|
|
@@ -1192,15 +1190,15 @@ SecurityPolicy-Deny-Http-00036
|
|
|
|
|
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
|
|
|
|
Comment 创建安全策略
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00036 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"message":"Главная страница"} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00036 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"rst"} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
|
|
|
|
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
|
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
|
|
|
|
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Главная страница
|
|
|
|
|
... ELSE Create List Главная страница
|
|
|
|
|
${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}
|
|
|
|
|
@@ -1210,13 +1208,13 @@ SecurityPolicy-Deny-Http-00036
|
|
|
|
|
${s} Convert to String ${policyId}
|
|
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
|
|
|
|
Comment 修改策略
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00036 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"message":"Главная страница"} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00036 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"rst"} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
|
|
|
|
${rescode} ${policyId} EditPolicy ${policyDict} update
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
|
|
|
|
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Главная страница
|
|
|
|
|
... ELSE Create List Главная страница
|
|
|
|
|
${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}
|
|
|
|
|
@@ -1239,19 +1237,16 @@ SecurityPolicy-Deny-Http-00037
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
|
|
|
|
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
|
|
|
|
#创建引用文件
|
|
|
|
|
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
|
|
|
|
${profiledId} Get From Dictionary ${response} profileId
|
|
|
|
|
Comment 创建安全策略
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00037 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00037 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
|
|
|
|
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
|
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0001.bat
|
|
|
|
|
... ELSE set variable curl http://open.node.com/test/xiaozhu/xiaozhu.html
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
${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}
|
|
|
|
|
@@ -1261,13 +1256,13 @@ SecurityPolicy-Deny-Http-00037
|
|
|
|
|
${s} Convert to String ${policyId}
|
|
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
|
|
|
|
Comment 修改策略
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00037 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00037 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
|
|
|
|
${rescode} ${policyId} EditPolicy ${policyDict} update
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
|
|
|
|
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
${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}
|
|
|
|
|
@@ -1290,19 +1285,16 @@ SecurityPolicy-Deny-Http-00038
|
|
|
|
|
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*5678|Set-Cookie
|
|
|
|
|
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
|
|
|
|
#创建引用文件
|
|
|
|
|
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
|
|
|
|
${profiledId} Get From Dictionary ${response} profileId
|
|
|
|
|
Comment 创建安全策略
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00038 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00038 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"rst"} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
|
|
|
|
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
|
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat
|
|
|
|
|
... ELSE set variable curl \ http://open.node.com/test/youtube/youtube.html
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
${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}
|
|
|
|
|
@@ -1312,13 +1304,13 @@ SecurityPolicy-Deny-Http-00038
|
|
|
|
|
${s} Convert to String ${policyId}
|
|
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
|
|
|
|
Comment 修改策略
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00038 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00038 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"rst"} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
|
|
|
|
${rescode} ${policyId} EditPolicy ${policyDict} update
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
|
|
|
|
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
${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}
|
|
|
|
|
@@ -1345,19 +1337,16 @@ SecurityPolicy-Deny-Http-00039
|
|
|
|
|
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Ұлттық
|
|
|
|
|
${rescode} ${object_yq_Id} AddObject2 ${1} ${objectDict}
|
|
|
|
|
${objectids} Catenate SEPARATOR=, ${objectids} ${object_yq_Id}
|
|
|
|
|
#创建引用文件
|
|
|
|
|
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
|
|
|
|
${profiledId} Get From Dictionary ${response} profileId
|
|
|
|
|
Comment 创建安全策略
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00039 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_RQ_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appObjectIdArray=2
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00039 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${object_RQ_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appObjectIdArray=2
|
|
|
|
|
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
|
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
|
|
|
|
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
|
|
|
${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}
|
|
|
|
|
@@ -1367,7 +1356,7 @@ SecurityPolicy-Deny-Http-00039
|
|
|
|
|
${s} Convert to String ${policyId}
|
|
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
|
|
|
|
Comment 修改策略
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00039 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_CK_Id}|TSG_FIELD_HTTP_REQ_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_yq_Id}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
|
|
|
|
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00039 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${object_CK_Id}|TSG_FIELD_HTTP_REQ_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_yq_Id}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
|
|
|
|
${rescode} ${policyId} EditPolicy ${policyDict} update
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0012.bat
|
|
|
|
|
@@ -1381,6 +1370,7 @@ SecurityPolicy-Deny-Http-00039
|
|
|
|
|
${endtime} Get Time
|
|
|
|
|
#日志验证
|
|
|
|
|
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
|
|
|
|
|
|
|
|
|
SecurityPolicy-Deny-Http-00040
|
|
|
|
|
[Tags] selfserver ip+请求体and关系
|
|
|
|
|
Comment 创建目标IP
|
|
|
|
|
@@ -1397,7 +1387,7 @@ SecurityPolicy-Deny-Http-00040
|
|
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0024.bat
|
|
|
|
|
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
|
|
|
|
... ELSE Create List Connection reset by peer
|
|
|
|
|
@@ -1426,7 +1416,7 @@ SecurityPolicy-Deny-Http-00041
|
|
|
|
|
#删除策略
|
|
|
|
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
|
|
|
|
Comment 功能端验证HTTP验证
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
|
|
|
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0024.bat
|
|
|
|
|
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
|
|
|
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
|
|
|
|
... ELSE Create List Connection reset by peer
|
|
|
|
|
|