提交安全策略和代理策略全流程用例
This commit is contained in:
@@ -39,12 +39,12 @@ SecurityPolicy-Deny-HTTP-00001
|
||||
Comment 策略验证
|
||||
#新增策略验证
|
||||
#创建attributes中的字典
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "67"}
|
||||
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||
${attributes} Create List ${app_id} ${ipsource} ${ipdestination}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||
log ${verifyList}
|
||||
@@ -72,7 +72,7 @@ SecurityPolicy-Deny-HTTP-00001
|
||||
Comment 日志验证
|
||||
#日志验证
|
||||
${s} Convert to String ${policyIds}
|
||||
${returnvalue} GetLogList_new security_event_log ${starttime} ${testClentIP} ${s} http_host www.lkong.net
|
||||
${returnvalue} GetLogList_new security_event_log ${starttime} ${testClentIP} ${s} http_host HTTP
|
||||
Should Be Equal As Strings ${returnvalue} true
|
||||
|
||||
SecurityPolicy-Deny-HTTP-00002
|
||||
@@ -103,13 +103,13 @@ SecurityPolicy-Deny-HTTP-00002
|
||||
Comment 策略验证
|
||||
#新增策略验证
|
||||
#创建attributes中的字典
|
||||
${qname_fqdn_id} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "bellaircraftmuseum.org"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||
${qname_fqdn_id} Create Dictionary attributeType=string attributeName=host appId=67 appName=http protocol=http attributeValue={"string": "bellaircraftmuseum.org"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "67"}
|
||||
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${qname_fqdn_id}
|
||||
${attributes} Create List ${app_id} ${ipsource} ${ipdestination} ${qname_fqdn_id}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||
log ${verifyList}
|
||||
@@ -152,8 +152,8 @@ SecurityPolicy-Deny-HTTP-00003
|
||||
${objectids} set Variable ${objectId}
|
||||
|
||||
Comment 创建url
|
||||
${addItemList1} Create Dictionary keywordArray=*/news/ isHexbin=${0}
|
||||
${addItemList2} Create Dictionary keywordArray=$www.icbc.com.cn/ isHexbin=${0}
|
||||
${addItemList1} Create Dictionary keywordArray=news isHexbin=${0}
|
||||
${addItemList2} Create Dictionary keywordArray=www.icbc.com.cn isHexbin=${0}
|
||||
${addItemList3} Create Dictionary keywordArray=www.gotohoroscope* isHexbin=${0}
|
||||
${addItemList4} Create Dictionary keywordArray=indexv isHexbin=${0}
|
||||
${addItemLists} Create list ${addItemList1} ${addItemList2} ${addItemList3} ${addItemList4}
|
||||
@@ -178,13 +178,13 @@ SecurityPolicy-Deny-HTTP-00003
|
||||
Comment 策略验证
|
||||
#新增策略验证
|
||||
#创建attributes中的字典
|
||||
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.icbc.com.cn/"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||
${url} Create Dictionary attributeType=string attributeName=url appId=67 appName=http protocol=http attributeValue={"string": "www.icbc.com.cn/"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "67"}
|
||||
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url}
|
||||
${attributes} Create List ${app_id} ${ipsource} ${ipdestination} ${url}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||
log ${verifyList}
|
||||
@@ -267,13 +267,13 @@ SecurityPolicy-Deny-HTTP-00004
|
||||
Comment 策略验证
|
||||
#新增策略验证
|
||||
#创建attributes中的字典
|
||||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0","district": "User-Agent"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=67 appName=http protocol=http attributeValue={"string": "Mozilla/5.0","district": "User-Agent"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "67"}
|
||||
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${req_hdr_ua}
|
||||
${attributes} Create List ${app_id} ${ipsource} ${ipdestination} ${req_hdr_ua}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||
log ${verifyList}
|
||||
@@ -332,13 +332,13 @@ SecurityPolicy-Deny-HTTP-00005
|
||||
Comment 策略验证
|
||||
#新增策略验证
|
||||
#创建attributes中的字典
|
||||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "utf-8aabnna","district": "Content-Type"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=67 appName=http protocol=http attributeValue={"string": "utf-8","district": "Content-Type"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "67"}
|
||||
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${res_hdr_ct}
|
||||
${attributes} Create List ${app_id} ${ipsource} ${ipdestination} ${res_hdr_ct}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||
log ${verifyList}
|
||||
@@ -396,13 +396,13 @@ SecurityPolicy-Deny-HTTP-00006
|
||||
Comment 策略验证
|
||||
#新增策略验证
|
||||
#创建attributes中的字典
|
||||
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "ipp_uid2","district": "Cookie"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=67 appName=http protocol=http attributeValue={"string": "ipp_uid2","district": "Cookie"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "67"}
|
||||
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${req_hdr_ck}
|
||||
${attributes} Create List ${app_id} ${ipsource} ${ipdestination} ${req_hdr_ck}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||
log ${verifyList}
|
||||
@@ -442,14 +442,14 @@ SecurityPolicy-Deny-HTTP-00007
|
||||
${objectids} set Variable ${objectId}
|
||||
|
||||
Comment Set-Cookie
|
||||
${addItemList1} Create Dictionary keywordArray=CURRENT_CITY_CODE* isHexbin=${0} district=Set-Cookie
|
||||
${addItemList1} Create Dictionary keywordArray=ASP.NET isHexbin=${0} district=Set-Cookie
|
||||
${addItemLists} Create list ${addItemList1}
|
||||
${objectDict} Create Dictionary objectType=http_signature objectSubType=http_signature isValid=${1} addItemList=${addItemLists}
|
||||
${rescode} ${objectId1} AddObjects ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${objectId1}
|
||||
|
||||
Comment 创建Deny策略
|
||||
${policyDict} Create Dictionary policyName=${TEST NAME} policyType=tsg_security action=deny source=${objectId}|TSG_SECURITY_SOURCE_ADDR userRegion={"protocol":"HTTP","method":"drop"} filterList=${objectId}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
||||
${policyDict} Create Dictionary policyName=${TEST NAME} policyType=tsg_security action=deny source=${objectId}|TSG_SECURITY_SOURCE_ADDR userRegion={"protocol":"HTTP","method":"drop"} filterList=${objectId1}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID}
|
||||
${rescode} ${policyId} AddPolicies 1 ${policyDict} v2
|
||||
${policyIds} set Variable ${policyId}[0][policyIds][0]
|
||||
|
||||
@@ -460,13 +460,13 @@ SecurityPolicy-Deny-HTTP-00007
|
||||
Comment 策略验证
|
||||
#新增策略验证
|
||||
#创建attributes中的字典
|
||||
${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "CURRENT_CITY_CODE","district": "Set-Cookie"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||
${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=67 appName=http protocol=http attributeValue={"string": "ASP.NET","district": "Set-Cookie"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "67"}
|
||||
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${res_hdr_sc}
|
||||
${attributes} Create List ${app_id} ${ipsource} ${ipdestination} ${res_hdr_sc}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||
log ${verifyList}
|
||||
@@ -484,8 +484,8 @@ SecurityPolicy-Deny-HTTP-00007
|
||||
Should Be Equal As Strings ${ok} true
|
||||
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00013.bat
|
||||
... ELSE set variable curl --connect-timeout 5 -m 10 www.ziroom.com/life/index -o /dev/null
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00013_1.bat
|
||||
... ELSE set variable curl --connect-timeout 5 -m 10 blog.cnstock.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 000
|
||||
... ELSE Create List timed out
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -494,7 +494,7 @@ SecurityPolicy-Deny-HTTP-00007
|
||||
Comment 日志验证
|
||||
#日志验证
|
||||
${s} Convert to String ${policyIds}
|
||||
${returnvalue} GetLogList_new security_event_log ${starttime} ${testClentIP} ${s} http_host www.ziroom.com
|
||||
${returnvalue} GetLogList_new security_event_log ${starttime} ${testClentIP} ${s} http_host blog.cnstock.com
|
||||
|
||||
SecurityPolicy-Deny-HTTP-00008
|
||||
[Tags] Deny IP HTTP Request Content
|
||||
@@ -524,13 +524,13 @@ SecurityPolicy-Deny-HTTP-00008
|
||||
Comment 策略验证
|
||||
#新增策略验证
|
||||
#创建attributes中的字典
|
||||
${req_body} Create Dictionary attributeType=string attributeName=req_body appId=106 appName=http protocol=http attributeValue={"string": "testDenyHttp0014"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||
${req_body} Create Dictionary attributeType=string attributeName=req_body appId=67 appName=http protocol=http attributeValue={"string": "testDenyHttp0014"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "67"}
|
||||
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${res_body}
|
||||
${attributes} Create List ${app_id} ${ipsource} ${ipdestination} ${req_body}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||
log ${verifyList}
|
||||
@@ -550,8 +550,8 @@ SecurityPolicy-Deny-HTTP-00008
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Deny_HTTP_00014.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"testDenyHttp0014","setcook":"12345678","contenttype": "content-type","responsebody": "testDenyHttp0014"}" http://open.node.com:180/go
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List after
|
||||
... ELSE Create List after
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
|
||||
|
||||
@@ -588,13 +588,13 @@ SecurityPolicy-Deny-HTTP-00009
|
||||
Comment 策略验证
|
||||
#新增策略验证
|
||||
#创建attributes中的字典
|
||||
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "华彤公司"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=67 appName=http protocol=http attributeValue={"string": "华彤公司"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "67"}
|
||||
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${res_body}
|
||||
${attributes} Create List ${app_id} ${ipsource} ${ipdestination} ${res_body}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||
log ${verifyList}
|
||||
@@ -680,17 +680,17 @@ SecurityPolicy-Deny-HTTP-00010
|
||||
Comment 策略验证
|
||||
#新增策略验证
|
||||
#创建attributes中的字典
|
||||
${qname_fqdn_id} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "open.node.com"}
|
||||
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "open.node.com/"}
|
||||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0","district": "User-Agent"}
|
||||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "charset","district": "Content-Type"}
|
||||
${req_body} Create Dictionary attributeType=string attributeName=req_body appId=106 appName=http protocol=http attributeValue={"string": "testDenyHttp0016"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||
${qname_fqdn_id} Create Dictionary attributeType=string attributeName=host appId=67 appName=http protocol=http attributeValue={"string": "open.node.com"}
|
||||
${url} Create Dictionary attributeType=string attributeName=url appId=67 appName=http protocol=http attributeValue={"string": "open.node.com/"}
|
||||
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=67 appName=http protocol=http attributeValue={"string": "Mozilla/5.0","district": "User-Agent"}
|
||||
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=67 appName=http protocol=http attributeValue={"string": "charset","district": "Content-Type"}
|
||||
${req_body} Create Dictionary attributeType=string attributeName=req_body appId=67 appName=http protocol=http attributeValue={"string": "testDenyHttp0016"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "67"}
|
||||
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${qname_fqdn_id} ${url} ${req_hdr_ua} ${res_hdr_ct} ${req_body}
|
||||
${attributes} Create List ${app_id} ${ipsource} ${ipdestination} ${qname_fqdn_id} ${url} ${req_hdr_ua} ${res_hdr_ct} ${req_body}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||
log ${verifyList}
|
||||
@@ -737,7 +737,7 @@ SecurityPolicy-Deny-HTTP-00011
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${objectId1}
|
||||
|
||||
Comment 创建url
|
||||
${addItemList1} Create Dictionary keywordArray=*send-free-sms.aspx isHexbin=${0}
|
||||
${addItemList1} Create Dictionary keywordArray=send-free-sms.aspx isHexbin=${0}
|
||||
${addItemLists} Create list ${addItemList1}
|
||||
${objectDict1} Create Dictionary objectType=url objectSubType=url isValid=${1} addItemList=${addItemLists}
|
||||
${rescode} ${objectId2} AddObjects ${1} ${objectDict1}
|
||||
@@ -776,17 +776,17 @@ SecurityPolicy-Deny-HTTP-00011
|
||||
Comment 策略验证
|
||||
#新增策略验证
|
||||
#创建attributes中的字典
|
||||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "smspunch.net"}
|
||||
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "smspunch.net/send-free-sms.aspx"}
|
||||
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "_ym_isad=2","district": "Cookie"}
|
||||
${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "NET_SessionId","district": "Set-Cookie"}
|
||||
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "Cell No"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||
${fqdn} Create Dictionary attributeType=string attributeName=host appId=67 appName=http protocol=http attributeValue={"string": "smspunch.net"}
|
||||
${url} Create Dictionary attributeType=string attributeName=url appId=67 appName=http protocol=http attributeValue={"string": "smspunch.net/send-free-sms.aspx"}
|
||||
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=67 appName=http protocol=http attributeValue={"string": "_ym_isad=2","district": "Cookie"}
|
||||
${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=67 appName=http protocol=http attributeValue={"string": "NET_SessionId","district": "Set-Cookie"}
|
||||
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=67 appName=http protocol=http attributeValue={"string": "Cell No"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "67"}
|
||||
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${qname_fqdn_id} ${url} ${req_hdr_ua} ${res_hdr_ct} ${req_body}
|
||||
${attributes} Create List ${app_id} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${res_body}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||
log ${verifyList}
|
||||
|
||||
Reference in New Issue
Block a user