http协议补充用例
This commit is contained in:
@@ -38,7 +38,7 @@ SecurityPolicy-Deny-Http-00002
|
||||
SecurityPolicy-Deny-Http-00003
|
||||
[Tags] url
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*/news/,$http://www.icbc.com.cn/icbc/,www.gotohoroscope*,indexv
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*/news/,$www.icbc.com.cn/icbc/,www.gotohoroscope*,indexv
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
#创建引用文件
|
||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages
|
||||
@@ -105,30 +105,41 @@ SecurityPolicy-Deny-Http-00007
|
||||
|
||||
SecurityPolicy-Deny-Http-00008
|
||||
[Tags] 应答头
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*index.aspx
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*utf-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00008 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"rst"} referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00008 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"rst"} referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
log ${policyDict}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
insert_policyId_to_file1 deny_http_objectId7 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_objectId7 ${object_url_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId8 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_policyId7 ${policyId}
|
||||
|
||||
SecurityPolicy-Deny-Http-00009
|
||||
[Tags] 应答头
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*default.shtml
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=utf-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00009 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"alert","code":204,"message":"123456"} referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00009 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"alert","code":204,"message":"123456"} referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
log ${policyDict}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
insert_policyId_to_file1 deny_http_objectId8 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_objectId9 ${object_url_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId10 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_policyId8 ${policyId}
|
||||
|
||||
SecurityPolicy-Deny-Http-00010
|
||||
[Tags] 应答头
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*hot_news.html
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -136,15 +147,19 @@ SecurityPolicy-Deny-Http-00010
|
||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00010 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"alert","code":204,"html_profile":${profiledId}} referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00010 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"alert","code":204,"html_profile":${profiledId}} referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
log ${policyDict}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
insert_policyId_to_file1 deny_http_objectId9 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_objectId11 ${object_url_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId12 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_policyId9 ${policyId}
|
||||
insert_policyId_to_file1 deny_http_profiledId2 ${profiledId}
|
||||
|
||||
SecurityPolicy-Deny-Http-00011
|
||||
[Tags] 应答头
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=about
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -152,10 +167,11 @@ SecurityPolicy-Deny-Http-00011
|
||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00011 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"block","code":404,"html_profile":${profiledId}} referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00011 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"block","code":404,"html_profile":${profiledId}} referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
log ${policyDict}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
insert_policyId_to_file1 deny_http_objectId10 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_objectId13 ${object_url_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId14 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_policyId10 ${policyId}
|
||||
insert_policyId_to_file1 deny_http_profiledId3 ${profiledId}
|
||||
|
||||
@@ -168,7 +184,7 @@ SecurityPolicy-Deny-Http-00012
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00012 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"block","code":404,"message":"马上到周末"} referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appObjectIdArray=2
|
||||
log ${policyDict}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
insert_policyId_to_file1 deny_http_objectId11 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_objectId15 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_policyId11 ${policyId}
|
||||
|
||||
SecurityPolicy-Deny-Http-00013
|
||||
@@ -180,41 +196,85 @@ SecurityPolicy-Deny-Http-00013
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00013 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"alert","code":200,"message":"Главная страница"} referenceObject=${objectId}|TSG_FIELD_SSL_SAN,${objectId}|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=2
|
||||
log ${policyDict}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
insert_policyId_to_file1 deny_http_objectId12 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_objectId16 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_policyId12 ${policyId}
|
||||
|
||||
SecurityPolicy-Deny-Http-00014
|
||||
[Tags] 请求体
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*mail.ru
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00014 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SSL","method":"drop"} referenceObject=${objectId}|TSG_FIELD_SSL_SAN,${objectId}|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=2
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00014 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appObjectIdArray=2
|
||||
log ${policyDict}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
insert_policyId_to_file1 deny_http_objectId13 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_objectId17 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_policyId13 ${policyId}
|
||||
|
||||
SecurityPolicy-Deny-Http-00015
|
||||
[Tags] 应答体
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*mail.ru
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=About
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00015 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SSL","method":"drop"} referenceObject=${objectId}|TSG_FIELD_SSL_SAN,${objectId}|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=2
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00015 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appObjectIdArray=2
|
||||
log ${policyDict}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
insert_policyId_to_file1 deny_http_objectId14 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_objectId18 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_policyId14 ${policyId}
|
||||
|
||||
SecurityPolicy-Deny-Http-00016
|
||||
[Tags] 最大组合
|
||||
[Tags] 最大组合1
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*mail.ru
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*action
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${object_qq_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*utf-8|Content-Type
|
||||
${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=qazxsw
|
||||
${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00016 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"SSL","method":"drop"} referenceObject=${objectId}|TSG_FIELD_SSL_SAN,${objectId}|TSG_FIELD_SSL_SNI,${objectId}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=2
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00016 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_qq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR,${object_body_Id}|TSG_FIELD_HTTP_REQ_CONTE isValid=${1} appObjectIdArray=2
|
||||
log ${policyDict}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
insert_policyId_to_file1 deny_http_objectId15 ${objectId}
|
||||
insert_policyId_to_file1 deny_http_objectId19 ${object_fqdn_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId20 ${object_url_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId21 ${object_qq_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId22 ${object_yd_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId23 ${object_body_Id}
|
||||
insert_policyId_to_file1 deny_http_policyId15 ${policyId}
|
||||
|
||||
SecurityPolicy-Deny-Http-00017
|
||||
[Tags] 最大组合2
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*smspunch.net
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*send-free-sms.aspx
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${object_qq_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=NET_SessionId|Set-Cookie
|
||||
${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Cell No
|
||||
${rescode} ${object_body_Id} AddObject2 ${1} ${objectDict}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Http-00017 policyType=tsg_security policyDesc=autotest action=deny userRegion={"protocol":"HTTP","method":"drop"} referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_qq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR,${object_body_Id}|TSG_FIELD_HTTP_REQ_CONTE isValid=${1} appObjectIdArray=2
|
||||
log ${policyDict}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
insert_policyId_to_file1 deny_http_objectId24 ${object_fqdn_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId25 ${object_url_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId26 ${object_qq_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId27 ${object_yd_Id}
|
||||
insert_policyId_to_file1 deny_http_objectId28 ${object_body_Id}
|
||||
insert_policyId_to_file1 deny_http_policyId16 ${policyId}
|
||||
|
||||
Reference in New Issue
Block a user