diff --git a/01-TestCase/tsg_adc/selfserver/Api_Security/Intercept_Http_Tests.robot b/01-TestCase/tsg_adc/selfserver/Api_Security/Intercept_Http_Tests.robot index af5b461..b144fe8 100644 --- a/01-TestCase/tsg_adc/selfserver/Api_Security/Intercept_Http_Tests.robot +++ b/01-TestCase/tsg_adc/selfserver/Api_Security/Intercept_Http_Tests.robot @@ -13,14 +13,14 @@ ${policyIds} ${EMPTY} ${objectids} ${EMPTY} *** Test Cases *** -SecurityPolicy-Allow-Http-00001 +SecurityPolicy-Intercept-Http-00001 [Tags] ip Selfserver Intercept HTTP Comment 创建目标IP ${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0 ${rescode} ${objectId} AddObject2 ${1} ${objectDict} ${objectids} set Variable ${objectId} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=allow effectiveRange= userRegion=protocol: HTTP referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion=protocol: HTTP referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} #删除策略 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]} @@ -38,7 +38,7 @@ SecurityPolicy-Allow-Http-00001 ${s} Convert to String ${policyId} GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com -SecurityPolicy-Allow-Http-00002 +SecurityPolicy-Intercept-Http-00002 [Tags] Selfserver Intercept HTTP ip+cat右匹配 Comment 创建目标IP ${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0 @@ -49,7 +49,7 @@ SecurityPolicy-Allow-Http-00002 ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} ${objectids} set Variable ${objectId},${object_fqdn_Id} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-HTTP-00002 policyType=tsg_security policyDesc=autotest userTags= action=allow effectiveRange= userRegion=protocol:HTTP referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00002 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion=protocol:HTTP referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2 ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} #删除策略 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]} @@ -67,7 +67,7 @@ SecurityPolicy-Allow-Http-00002 ${s} Convert to String ${policyId} GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com -SecurityPolicy-Allow-Http-00003 +SecurityPolicy-Intercept-Http-00003 [Tags] Selfserver Intercept HTTP ip+fqdn完整匹配 Comment 创建目标IP ${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0 @@ -78,7 +78,7 @@ SecurityPolicy-Allow-Http-00003 ${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict} ${objectids} set Variable ${objectId},${object_fqdn_Id} Comment 创建安全策略 - ${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-HTTP-00003 policyType=tsg_security policyDesc=autotest userTags= action=allow effectiveRange= userRegion=protocol:HTTP referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2 + ${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00003 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion=protocol:HTTP referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2 ${rescode} ${policyId} AddPolicy2 ${1} ${policyDict} #删除策略 ${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]} @@ -96,3 +96,4 @@ SecurityPolicy-Allow-Http-00003 ${s} Convert to String ${policyId} GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com +